| | |
| | | const store = new Vuex.Store({ |
| | | |
| | | state: { |
| | | imgUrl: 'https://www.duijiaoniwo.com', // 服务器资源前缀 |
| | | imgUrl: 'https://mall.dynometacn.com/dmmall_web_api/', // 服务器资源前缀 |
| | | navHeight: navHeight || '', |
| | | statusbarHeight: statusbarHeight || '', |
| | | userInfo: userInfo || '', // 用户信息 |
| | |
| | | uni.removeStorageSync('token'); |
| | | uni.removeStorageSync('openid'); |
| | | uni.removeStorageSync('recshopid'); |
| | | uni.removeStorageSync('recuserid'); |
| | | }, |
| | | // 登录过期 |
| | | guoqi(state) { |
| | | state.userInfo = '' |
| | | state.token = '' |
| | | state.openid = '' |
| | | state.shopInfo = '' |
| | | state.shopToken = '' |
| | | state.recshopid = '' |
| | | state.recuserid = '' |
| | | |
| | | uni.removeStorageSync('userInfo'); |
| | | uni.removeStorageSync('token'); |
| | | uni.removeStorageSync('openid'); |
| | | uni.removeStorageSync('shopInfo'); |
| | | uni.removeStorageSync('shopToken'); |
| | | uni.removeStorageSync('recshopid'); |
| | | uni.removeStorageSync('recuserid'); |
| | | } |
| | | }, |
| | | |