flat:暂存
This commit is contained in:
@@ -91,6 +91,16 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
if(location.href.indexOf('?') !== -1) {
|
||||
const obj = {}
|
||||
const query = location.href.split('?')[1].replace(/\?/, '').split('&')
|
||||
query.forEach((item) => { const a = item.split('='); obj[a[0]] = a[1]})
|
||||
window.sessionStorage.setItem('query_session', JSON.stringify(obj))
|
||||
} else {
|
||||
window.sessionStorage.removeItem('query_session')
|
||||
}
|
||||
</script>
|
||||
<script src="<%= BASE_URL %>cdn/tinymce5.6.2/tinymce.min.js"></script>
|
||||
<!-- built files will be auto injected -->
|
||||
<script src="<%= BASE_URL %>util/aes.js" charset="utf-8"></script>
|
||||
|
||||
@@ -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];
|
||||
// // 临时指定域名,方便测试
|
||||
|
||||
@@ -26,8 +26,9 @@ module.exports = {
|
||||
// target: 'http://localhost:8000', // 本地服务接口地址
|
||||
// target: "http://39.98.184.58:8000", // 阿里云后台地址
|
||||
// target: "http://192.168.3.104:8000", // 本地
|
||||
target: 'http://192.168.3.120:8000',
|
||||
// target: 'http://192.168.1.106:8000',
|
||||
// target: 'http://192.168.3.173:8000',
|
||||
target: 'http://10.165.0.173:8000',
|
||||
ws: true,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
|
||||
Reference in New Issue
Block a user