乡村相册登录适应
This commit is contained in:
@@ -32,9 +32,11 @@ export default {
|
||||
target() {
|
||||
return decodeURIComponent(this.$route.query.back) || ""
|
||||
},
|
||||
currentApp() {
|
||||
return this.apps.find(e => this.target.indexOf(e.libPath) > -1) || {}
|
||||
},
|
||||
appPath() {
|
||||
let app = this.apps.find(e => this.target.indexOf(e.libPath) > -1)
|
||||
return app?.label || ""
|
||||
return this.currentApp?.label || ""
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -48,7 +50,8 @@ export default {
|
||||
handleLogin() {
|
||||
this.$refs.loginForm.validate(v => {
|
||||
if (v) {
|
||||
this.getToken(this.form).then(() => {
|
||||
let {name: module} = this.currentApp
|
||||
this.getToken({...this.form, module}).then(() => {
|
||||
this.target ? uni.reLaunch({url: this.target}) : uni.navigateBack({})
|
||||
}).catch(() => 0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user