msb_beta
ch 2 years ago
parent 42946899a0
commit fc01a7bc02

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-22 18:28:52 * @Date: 2022-03-22 18:28:52
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-28 18:05:32 * @LastEditTime: 2022-04-28 18:43:18
* @Description: file content * @Description: file content
*/ */
import Vue from 'vue' import Vue from 'vue'
@ -15,7 +15,9 @@ const
// 用户信息 // 用户信息
USER_INFO = 'ui', USER_INFO = 'ui',
// 地址列表 // 地址列表
ADDRESS = 'ads'; ADDRESS = 'ads',
// oppenId
OPPED_ID = 'oi';
export default new Vuex.Store({ export default new Vuex.Store({
state : { state : {
@ -24,7 +26,7 @@ export default new Vuex.Store({
address : JSON.parse(uni.getStorageSync(ADDRESS) || '[]'), address : JSON.parse(uni.getStorageSync(ADDRESS) || '[]'),
sessionData : [], sessionData : [],
sessionMsgCount : 0, sessionMsgCount : 0,
openId : '' openId : uni.getStorageSync(OPPED_ID) || ''
}, },
mutations:{ mutations:{
SET_TOKEN (state, token = ''){ SET_TOKEN (state, token = ''){
@ -47,6 +49,7 @@ export default new Vuex.Store({
}, },
SET_OPEN_ID (state, data){ SET_OPEN_ID (state, data){
state.openId = data; state.openId = data;
uni.setStorageSync(OPPED_ID, data);
} }
}, },
actions : { actions : {

Loading…
Cancel
Save