Commit dfd27b57 authored by Facius's avatar Facius

feat: 自动登录之后首页刷新

parent 393e866b
Pipeline #6651 canceled with stages
......@@ -282,6 +282,10 @@ export default {
this.initInfo();
}, 1500);
});
uni.$on('login-success', res => {
this.initInfo();
});
this.systemInfo = uni.getSystemInfoSync();
},
onShow() {
......@@ -303,6 +307,7 @@ export default {
},
onUnload() {
uni.$off('bill-list-reload');
uni.$off('login-success');
},
methods: {
getShareUserId(q) {
......
......@@ -194,6 +194,7 @@ const actions = {
} = res.data
let timestamp=res.timestamp
setToken(token)
uni.$emit('login-success');
setRefreshToken(refreshToken)
dispatch("Set_auto_login",true)
await dispatch('Get_UserInfo')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment