mini-program/store/index.js
@@ -53,13 +53,22 @@ uni.setStorageSync('userInfo', val); }, setShopInfo(state, val) { state.setShopInfo = val uni.setStorageSync('setShopInfo', val); state.shopInfo = val uni.setStorageSync('shopInfo', val); }, // 设置当前位置信息 setPosition(state, val) { state.position = val }, // 退出 clear(state) { state.userInfo = '' state.token = '' state.openid = '' uni.removeStorageSync('userInfo'); uni.removeStorageSync('token'); uni.removeStorageSync('openid'); } }, actions: {