|
@@ -15,7 +15,7 @@ try{
|
|
|
}
|
|
|
|
|
|
// 需要永久存储,且下次APP启动需要取出的,在state中的变量名
|
|
|
-let saveStateKeys = ['vuex_carBrandList','vuex_userInfo'];
|
|
|
+let saveStateKeys = ['vuex_carBrandList'];
|
|
|
|
|
|
// 保存变量到本地存储中
|
|
|
const saveLifeData = function(key, value){
|
|
@@ -49,7 +49,7 @@ const store = new Vuex.Store({
|
|
|
vuex_shelfChoosePart: [], // 数字货架临配选择配件
|
|
|
vuex_allLookUp: [], // 数据字典
|
|
|
vuex_paymentTypeList: [], // 支付方式
|
|
|
- vuex_userInfo: null, // 用户信息
|
|
|
+ vuex_userInfo: null, // 用户信息
|
|
|
vuex_userPhoto: null, // 用户头像
|
|
|
vuex_permCodes: [], // 权限码
|
|
|
vuex_openid: "",
|
|
@@ -70,6 +70,7 @@ const store = new Vuex.Store({
|
|
|
state.hasLogin = true;
|
|
|
state.vuex_userInfo = data.auth_user;
|
|
|
state.vuex_userPhoto = data.auth_user.extInfo&&data.auth_user.extInfo.userExtInfo ? data.auth_user.extInfo.userExtInfo.headImage : ''
|
|
|
+ uni.setStorageSync('userPhoto', state.vuex_userPhoto);
|
|
|
// VISITOR:游客,EMPLOYEE:雇员
|
|
|
data.auth_user['identifyType'] = data.sysUserFlag == '0' ? 'VISITOR' : 'EMPLOYEE';
|
|
|
data.auth_user['sysUserFlag'] = data.sysUserFlag;
|
|
@@ -86,6 +87,7 @@ const store = new Vuex.Store({
|
|
|
uni.removeStorageSync('token')
|
|
|
uni.removeStorageSync('userInfo')
|
|
|
uni.removeStorageSync('permCodes')
|
|
|
+ uni.removeStorageSync('userPhoto')
|
|
|
state.vuex_storeShelf = null
|
|
|
state.vuex_userInfo = null
|
|
|
state.vuex_userPhoto = null
|