const setters = { clearDeviceToy() { wx.removeStorageSync('deviceId') wx.removeStorageSync('deviceSn') wx.removeStorageSync('serviceId') wx.removeStorageSync('is_new') // wx.removeStorageSync('characteristicId') }, //setter模块 setDeviceId(deviceId) { wx.setStorageSync('deviceId', deviceId) }, setDeviceSn(deviceSn) { wx.setStorageSync('deviceSn', deviceSn) }, setServiceId(serviceId) { wx.setStorageSync('serviceId', serviceId) }, setGameStatus(status) { wx.setStorageSync('game_status', status) }, setGameCloseStatus(status) { wx.setStorageSync('game_close_status', status) }, setToyList(toy_list) { wx.setStorageSync('toy_list', toy_list) }, setToyHex(toy_hex) { wx.setStorageSync('toy_hex', toy_hex) }, removeToyHex() { wx.removeStorageSync('toy_hex') }, setMode(mode) { wx.setStorageSync('mode', mode) }, setGameRecordId(param) { wx.setStorageSync('game_record_id', param) }, // 游玩类型的时间30分钟或10分钟 setOverPlayTime(param) { wx.setStorageSync('over_play_time', param) }, setPlayTime(param) { wx.setStorageSync('play_time', param) }, setPlayedTime(param) { wx.setStorageSync('played_time', param) }, // 记录推到后台得时间 setHideStatus($param) { wx.setStorageSync('hide_status', $param) }, // 记录推到后台得时间 setHideTime($param) { wx.setStorageSync('hide_time', $param) }, //记录游戏数据 setGameAttMedDatas($param) { wx.setStorageSync('game_data', $param) }, setIsNew($param) { wx.setStorageSync('is_new', $param) }, // 脑机LED灯 setLED(bool) { wx.setStorageSync('led_status', bool) }, } const getters = { getDeviceId() { return wx.getStorageSync('deviceId') }, getDeviceSn() { return wx.getStorageSync('deviceSn') }, getServiceId() { return wx.getStorageSync('serviceId') }, getGameStatus() { return wx.getStorageSync('game_status') }, getGameCloseStatus() { return wx.getStorageSync('game_close_status') }, getToyList() { return wx.getStorageSync('toy_list') }, getToyHex() { return wx.getStorageSync('toy_hex') }, getMode() { return wx.getStorageSync('mode') }, getGameRecordId() { return wx.getStorageSync('game_record_id') }, // 游玩类型的时间30分钟或10分钟 getOverPlayTime() { return wx.getStorageSync('over_play_time') }, //该局游戏剩余可以游玩的时间 getPlayTime() { return wx.getStorageSync('play_time') }, //完了多长时间 getPlayedTime() { return wx.getStorageSync('played_time') }, // 获取一开始隐藏的时间 getHideStatus() { return wx.getStorageSync('hide_status') }, // 获取一开始隐藏的时间 getHideTime() { return wx.getStorageSync('hide_time') }, //记录游戏数据 getGameAttMedDatas() { return wx.getStorageSync('game_data') }, //记录游戏数据 getIsNew() { return wx.getStorageSync('is_new') }, // 脑机LED灯 getLED() { return wx.getStorageSync('led_status') }, } const remover = { rmGameAttMedDatas() { wx.removeStorageSync('game_data') }, rmHideTime() { wx.removeStorageSync('hide_time') }, rmHideStatus() { wx.removeStorageSync('hide_status') } } export default { setters, getters, remover }