flat: 登陆
This commit is contained in:
@@ -31,7 +31,8 @@ const auth = {
|
||||
}) || false,
|
||||
authInfo: getStore({
|
||||
name: 'authInfo'
|
||||
}) || []
|
||||
}) || [],
|
||||
loginType: 0, // 0
|
||||
},
|
||||
actions: {
|
||||
//刷新token
|
||||
@@ -109,6 +110,9 @@ const auth = {
|
||||
}
|
||||
},
|
||||
mutations: {
|
||||
changeLoginType(state, payload) {
|
||||
state.loginType = payload
|
||||
},
|
||||
SET_AUTH_LABOR: (state, status) => {
|
||||
state.laborState = status
|
||||
setStore({
|
||||
|
||||
@@ -76,6 +76,7 @@ const user = {
|
||||
return new Promise((resolve, reject) => {
|
||||
loginByUsername(userInfo.tenantId, userInfo.username, md5(userInfo.password), userInfo.type, userInfo.key,
|
||||
userInfo.code, userInfo.token).then(res => {
|
||||
|
||||
const data = res.data;
|
||||
if (data.error_description) {
|
||||
uni.showToast({
|
||||
@@ -88,7 +89,6 @@ const user = {
|
||||
commit('SET_TENANT_ID', data.tenant_id);
|
||||
commit('SET_USER_INFO', data);
|
||||
dispatch('refreshAuthState')
|
||||
cons.log('开始1')
|
||||
dispatch('startRefreshNewsTimer')
|
||||
startRefreshToken();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user