Commit e4fa6373 authored by 姬鋆屾's avatar 姬鋆屾

feat:修改登录

parent f7fa3bbb
#开发环境 #开发环境
NODE_ENV = "development" NODE_ENV = "development"
VUE_APP_API_BASE_URL=http://192.168.0.98:11078 VUE_APP_API_BASE_URL=http://192.168.0.252:11089
VUE_APP_API_IMG_URL=http://192.168.0.98:11078/ VUE_APP_API_IMG_URL=http://192.168.0.252:11089/
# VUE_APP_API_BASE_URL=http://192.168.0.98:11078
# VUE_APP_API_IMG_URL=http://192.168.0.98:11078/
#VUE_APP_API_BASE_URL=http://10.12.185.213:11071 #VUE_APP_API_BASE_URL=http://10.12.185.213:11071
\ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</div> </div>
<div class="desc">智慧政务先行者</div> <div class="desc">智慧政务先行者</div>
</div> </div>
<div class="login"> <!-- <div class="login">
<a-form @submit="onSubmit" :form="form"> <a-form @submit="onSubmit" :form="form">
<a-tabs <a-tabs
size="large" size="large"
...@@ -69,10 +69,7 @@ ...@@ -69,10 +69,7 @@
</a-form-item> </a-form-item>
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
<div> <div></div>
<!-- <a-checkbox :checked="true">自动登录</a-checkbox> -->
<!-- <a style="float: right">忘记密码</a> -->
</div>
<a-form-item> <a-form-item>
<a-button <a-button
:loading="logging" :loading="logging"
...@@ -84,7 +81,7 @@ ...@@ -84,7 +81,7 @@
> >
</a-form-item> </a-form-item>
</a-form> </a-form>
</div> </div> -->
</common-layout> </common-layout>
</template> </template>
...@@ -107,6 +104,14 @@ export default { ...@@ -107,6 +104,14 @@ export default {
form: this.$form.createForm(this), form: this.$form.createForm(this),
}; };
}, },
created() {
if (this.$route.query.loginName) {
const userName = this.$route.query.loginName;
// this.form.password = 'admin';
const password = "xhxADMIN8@a";
login(userName, password).then(this.afterLogin);
}
},
computed: { computed: {
systemName() { systemName() {
return this.$store.state.setting.systemName; return this.$store.state.setting.systemName;
......
...@@ -35,7 +35,7 @@ const loginGuard = (to, from, next) => { ...@@ -35,7 +35,7 @@ const loginGuard = (to, from, next) => {
next(); next();
} else { } else {
// 再次判断防止死循环 // 再次判断防止死循环
if (to.path === "/jump") { if (to.path === "/jump" || to.path === "/login") {
next(); next();
} else { } else {
location.href = process.env.VUE_APP_API_portal_URL; location.href = process.env.VUE_APP_API_portal_URL;
......
...@@ -13,6 +13,11 @@ VueRouter.prototype.push = function push(location) { ...@@ -13,6 +13,11 @@ VueRouter.prototype.push = function push(location) {
}; };
const routes = [ const routes = [
{
path: "/login",
name: "跳转页面",
component: () => import("@/pages/login/Login"),
},
{ {
path: "/jump", path: "/jump",
name: "跳转页面", name: "跳转页面",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment