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