vuex模块化 登录,oauth,agentSign模块
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user