vuex模块化 登录,oauth,agentSign模块

This commit is contained in:
aixianling
2022-06-13 17:21:40 +08:00
parent 0b157621ca
commit 4520a74627
4 changed files with 144 additions and 153 deletions

View File

@@ -46,7 +46,7 @@ export default {
}
},
methods: {
...mapActions(['getToken']),
...mapActions(['getToken','getAccount']),
...mapMutations(['login', 'logout']),
handleLogin() {
this.$refs.loginForm.validate(v => {
@@ -59,7 +59,11 @@ export default {
corpId = 'ww2a667717a70164f1'
module = 'wangge'
}
this.getToken({...this.form, module, corpId}).then(() => {
this.getToken({...this.form, module, corpId}).then(token => {
this.login(token)
if( module != 'AppCountryAlbum'){
this.getAccount({module})
}
this.target ? uni.reLaunch({url: this.target}) : uni.navigateBack({})
}).catch(() => 0)
}