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

feat:修改登录

parent f7fa3bbb
#开发环境
NODE_ENV = "development"
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://192.168.0.252:11089
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
\ No newline at end of file
......@@ -7,7 +7,7 @@
</div>
<div class="desc">智慧政务先行者</div>
</div>
<div class="login">
<!-- <div class="login">
<a-form @submit="onSubmit" :form="form">
<a-tabs
size="large"
......@@ -69,10 +69,7 @@
</a-form-item>
</a-tab-pane>
</a-tabs>
<div>
<!-- <a-checkbox :checked="true">自动登录</a-checkbox> -->
<!-- <a style="float: right">忘记密码</a> -->
</div>
<div></div>
<a-form-item>
<a-button
:loading="logging"
......@@ -84,7 +81,7 @@
>
</a-form-item>
</a-form>
</div>
</div> -->
</common-layout>
</template>
......@@ -107,6 +104,14 @@ export default {
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: {
systemName() {
return this.$store.state.setting.systemName;
......
......@@ -35,7 +35,7 @@ const loginGuard = (to, from, next) => {
next();
} else {
// 再次判断防止死循环
if (to.path === "/jump") {
if (to.path === "/jump" || to.path === "/login") {
next();
} else {
location.href = process.env.VUE_APP_API_portal_URL;
......
......@@ -13,6 +13,11 @@ VueRouter.prototype.push = function push(location) {
};
const routes = [
{
path: "/login",
name: "跳转页面",
component: () => import("@/pages/login/Login"),
},
{
path: "/jump",
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