Commit b7e5dd2e authored by Damon's avatar Damon

fix: 机构切换清除登录

parent 5141f95d
...@@ -7,7 +7,11 @@ export default { ...@@ -7,7 +7,11 @@ export default {
questionList: [] questionList: []
}, },
onLaunch: function(options) { onLaunch: function(options) {
this.$u.vuex('orgId', options?.query?.orgId || -1) const orgId = options?.query?.orgId || -1
if (orgId !== this.orgId) {
this.logout()
}
this.$u.vuex('orgId', orgId)
// 版本更新 // 版本更新
this.updateApp() this.updateApp()
}, },
...@@ -76,6 +80,11 @@ export default { ...@@ -76,6 +80,11 @@ export default {
}) })
} }
}, },
logout() {
this.$u.vuex('vuex_token', '')
this.$u.vuex('openId', '')
this.$u.vuex('userInfo', {})
}
}, },
} }
</script> </script>
......
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