From fc01a7bc029438dd19f97fc58c80cf05a5fa18e4 Mon Sep 17 00:00:00 2001 From: ch Date: Thu, 28 Apr 2022 18:49:41 +0800 Subject: [PATCH] appid --- common/store/index.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/common/store/index.js b/common/store/index.js index 264ad57..cfca25d 100644 --- a/common/store/index.js +++ b/common/store/index.js @@ -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 : {