- VoiceController: Map.of() -> Collections.singletonMap() 兼容 Java 8 - ExploreController: 补齐 takeoutService.roll() 缺失的 taste/priceRange/allergies 参数 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
19 lines
337 B
JavaScript
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 };
|