| | |
| | | const shopInfo = uni.getStorageSync('shopInfo'); |
| | | const openid = uni.getStorageSync('openid'); |
| | | const token = uni.getStorageSync('token'); |
| | | const recuserid = uni.getStorageSync('recuserid'); |
| | | const recshopid = uni.getStorageSync('recshopid'); |
| | | const shopToken = uni.getStorageSync('shopToken'); |
| | | |
| | | |
| | |
| | | token: token || '', |
| | | shopToken: shopToken || '', |
| | | openid: openid || '', |
| | | position: null |
| | | position: null, |
| | | recuserid:recuserid||'', |
| | | recshopid:recshopid||'', |
| | | }, |
| | | mutations: { |
| | | // 设置导航栏高度 |
| | |
| | | state.openid = openid |
| | | uni.setStorageSync('openid', openid); |
| | | }, |
| | | setRecUserId(state, recuserid) { |
| | | state.recuserid = recuserid |
| | | uni.setStorageSync('recuserid', recuserid); |
| | | }, |
| | | setRecShopId(state, recshopid) { |
| | | state.recshopid = recshopid |
| | | uni.setStorageSync('recshopid', recshopid); |
| | | }, |
| | | // 设置用户信息 |
| | | setUserInfo(state, val) { |
| | | state.userInfo = val |
| | |
| | | uni.removeStorageSync('userInfo'); |
| | | uni.removeStorageSync('token'); |
| | | uni.removeStorageSync('openid'); |
| | | uni.removeStorageSync('recshopid'); |
| | | uni.removeStorageSync('recshopid'); |
| | | } |
| | | }, |
| | | |