flat: 123
This commit is contained in:
@@ -301,6 +301,7 @@ const news = {
|
||||
commit,
|
||||
dispatch
|
||||
}) {
|
||||
console.log('触发2')
|
||||
dispatch('newsInit').then(() => {
|
||||
startRefreshToken(dispatch);
|
||||
})
|
||||
|
||||
@@ -283,6 +283,7 @@ const news = {
|
||||
stopRefreshToken();
|
||||
},
|
||||
startRefreshNewsTimer({ state, commit, dispatch }) {
|
||||
console.log('触发1')
|
||||
dispatch("newsInit").then(() => {
|
||||
startRefreshToken(dispatch);
|
||||
});
|
||||
|
||||
@@ -75,7 +75,7 @@ const user = {
|
||||
}, userInfo) {
|
||||
return new Promise((resolve, reject) => {
|
||||
loginByUsername(userInfo.tenantId, userInfo.username, md5(userInfo.password), userInfo.type, userInfo.key,
|
||||
userInfo.code).then(res => {
|
||||
userInfo.code, userInfo.token).then(res => {
|
||||
const data = res.data;
|
||||
if (data.error_description) {
|
||||
uni.showToast({
|
||||
@@ -88,6 +88,7 @@ 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