Files
ChowBox/miniapp/utils/storage.js
王鹏 802b4ba229 fix: 修复 VoiceController Map.of 兼容性 + ExploreController 参数不匹配
- VoiceController: Map.of() -> Collections.singletonMap() 兼容 Java 8
- ExploreController: 补齐 takeoutService.roll() 缺失的 taste/priceRange/allergies 参数

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-08 20:02:27 +08:00

19 lines
337 B
JavaScript

function get(key, defaultValue) {
try {
const value = wx.getStorageSync(key);
return value !== '' ? value : defaultValue;
} catch (e) {
return defaultValue;
}
}
function set(key, value) {
wx.setStorageSync(key, value);
}
function remove(key) {
wx.removeStorageSync(key);
}
module.exports = { get, set, remove };