flat:暂存
This commit is contained in:
@@ -100,15 +100,12 @@ export default {
|
||||
},
|
||||
created () {
|
||||
// this.getTenant();
|
||||
const {username, password} = this.$route.query
|
||||
console.log(username, password)
|
||||
const {username, password } = JSON.parse(window.sessionStorage.getItem('query_session'))
|
||||
if(username && password) {
|
||||
this.proLoading = true
|
||||
this.loginForm.username = username
|
||||
this.loginForm.password = password
|
||||
this.$nextTick(() => {
|
||||
this.handleLogin()
|
||||
})
|
||||
this.handleLogin()
|
||||
} else {
|
||||
this.refreshCode();
|
||||
}
|
||||
@@ -137,41 +134,30 @@ export default {
|
||||
},
|
||||
handleLogin () {
|
||||
if(this.proLoading) {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '登录中,请稍后。。。',
|
||||
spinner: "el-icon-loading"
|
||||
});
|
||||
this.$store.dispatch("LoginByUsername", {
|
||||
...this.loginForm, code: '0000'
|
||||
}).then(() => {
|
||||
this.$store.dispatch('jlHelpShow', false)
|
||||
this.$router.push({ path: this.tagWel.value });
|
||||
loading.close();
|
||||
}).catch(() => {
|
||||
loading.close();
|
||||
this.refreshCode();
|
||||
});
|
||||
this.ByUsernameCallback()
|
||||
return
|
||||
}
|
||||
this.$refs.loginForm.validate(valid => {
|
||||
if (valid) {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '登录中,请稍后。。。',
|
||||
spinner: "el-icon-loading"
|
||||
});
|
||||
this.$store.dispatch("LoginByUsername", this.loginForm).then(() => {
|
||||
this.$store.dispatch('jlHelpShow', false)
|
||||
this.$router.push({ path: this.tagWel.value });
|
||||
loading.close();
|
||||
}).catch(() => {
|
||||
loading.close();
|
||||
this.refreshCode();
|
||||
});
|
||||
this.ByUsernameCallback()
|
||||
}
|
||||
});
|
||||
},
|
||||
ByUsernameCallback() {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '登录中,请稍后。。。',
|
||||
spinner: "el-icon-loading"
|
||||
});
|
||||
this.$store.dispatch("LoginByUsername", this.loginForm).then(() => {
|
||||
this.$store.dispatch('jlHelpShow', false)
|
||||
this.$router.push({ path: this.tagWel.value });
|
||||
loading.close();
|
||||
}).catch(() => {
|
||||
loading.close();
|
||||
this.refreshCode();
|
||||
});
|
||||
}
|
||||
// getTenant () {
|
||||
// let domain = window.location.href.split("/#/")[0];
|
||||
// // 临时指定域名,方便测试
|
||||
|
||||
Reference in New Issue
Block a user