diff --git a/public/index.html b/public/index.html
index 5616061..fc9eaf3 100644
--- a/public/index.html
+++ b/public/index.html
@@ -91,6 +91,16 @@
+
diff --git a/src/page/login/userlogin.vue b/src/page/login/userlogin.vue
index 1cbc859..af20a10 100644
--- a/src/page/login/userlogin.vue
+++ b/src/page/login/userlogin.vue
@@ -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];
// // 临时指定域名,方便测试
diff --git a/vue.config.js b/vue.config.js
index 7457695..280ea46 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -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: {