|
@@ -15,7 +15,7 @@ try{
|
|
}
|
|
}
|
|
|
|
|
|
// 需要永久存储,且下次APP启动需要取出的,在state中的变量名
|
|
// 需要永久存储,且下次APP启动需要取出的,在state中的变量名
|
|
-let saveStateKeys = ['vuex_carBrandList'];
|
|
|
|
|
|
+let saveStateKeys = ['vuex_carBrandList','vuex_userInfo'];
|
|
|
|
|
|
// 保存变量到本地存储中
|
|
// 保存变量到本地存储中
|
|
const saveLifeData = function(key, value){
|
|
const saveLifeData = function(key, value){
|
|
@@ -50,6 +50,7 @@ const store = new Vuex.Store({
|
|
vuex_allLookUp: [], // 数据字典
|
|
vuex_allLookUp: [], // 数据字典
|
|
vuex_paymentTypeList: [], // 支付方式
|
|
vuex_paymentTypeList: [], // 支付方式
|
|
vuex_userInfo: null, // 用户信息
|
|
vuex_userInfo: null, // 用户信息
|
|
|
|
+ vuex_userPhoto: null, // 用户头像
|
|
vuex_permCodes: [], // 权限码
|
|
vuex_permCodes: [], // 权限码
|
|
vuex_openid: "",
|
|
vuex_openid: "",
|
|
vuex_nowStaffData: null, // 员工临时数据
|
|
vuex_nowStaffData: null, // 员工临时数据
|
|
@@ -68,6 +69,7 @@ const store = new Vuex.Store({
|
|
console.log(data,'-----loginSucees-----')
|
|
console.log(data,'-----loginSucees-----')
|
|
state.hasLogin = true;
|
|
state.hasLogin = true;
|
|
state.vuex_userInfo = data.auth_user;
|
|
state.vuex_userInfo = data.auth_user;
|
|
|
|
+ state.vuex_userPhoto = data.auth_user.extInfo&&data.auth_user.extInfo.userExtInfo ? data.auth_user.extInfo.userExtInfo.headImage : ''
|
|
// VISITOR:游客,EMPLOYEE:雇员
|
|
// VISITOR:游客,EMPLOYEE:雇员
|
|
data.auth_user['identifyType'] = data.sysUserFlag == '0' ? 'VISITOR' : 'EMPLOYEE';
|
|
data.auth_user['identifyType'] = data.sysUserFlag == '0' ? 'VISITOR' : 'EMPLOYEE';
|
|
data.auth_user['sysUserFlag'] = data.sysUserFlag;
|
|
data.auth_user['sysUserFlag'] = data.sysUserFlag;
|
|
@@ -86,6 +88,7 @@ const store = new Vuex.Store({
|
|
uni.removeStorageSync('permCodes')
|
|
uni.removeStorageSync('permCodes')
|
|
state.vuex_storeShelf = null
|
|
state.vuex_storeShelf = null
|
|
state.vuex_userInfo = null
|
|
state.vuex_userInfo = null
|
|
|
|
+ state.vuex_userPhoto = null
|
|
state.vuex_permCodes = null
|
|
state.vuex_permCodes = null
|
|
},
|
|
},
|
|
openId(state,id) {
|
|
openId(state,id) {
|
|
@@ -133,7 +136,7 @@ const store = new Vuex.Store({
|
|
console.log(res)
|
|
console.log(res)
|
|
context.commit('setStoreAuthInfo',res.data || null)
|
|
context.commit('setStoreAuthInfo',res.data || null)
|
|
if(res.status == 200){
|
|
if(res.status == 200){
|
|
- if(res.data.auditStatus=='PASS'){
|
|
|
|
|
|
+ if(res.data&&res.data.auditStatus=='PASS'){
|
|
uni.showModal({
|
|
uni.showModal({
|
|
title: '提示',
|
|
title: '提示',
|
|
content: '门店认证审核已通过,请重新登录!',
|
|
content: '门店认证审核已通过,请重新登录!',
|