Commit 9ce7f426 authored by 姬鋆屾's avatar 姬鋆屾

tui

parent 16729f38
......@@ -3,23 +3,33 @@
<template>
<div class="page page-login flex flex-v">
<div class="form-wrap flex flex-1">
<el-form @submit.prevent='onSubmit' ref="form" :model="form" label-width="80px" size="small">
<h1>智慧大厅精细化管理平台</h1>
<el-form
@submit.prevent="onSubmit"
ref="form"
:model="form"
label-width="80px"
size="small"
>
<h1>{{ title }}</h1>
<el-form-item label="用户名">
<el-input v-model="form.loginName"></el-input>
</el-form-item>
<el-form-item label="密码">
<el-input v-model="form.password" type='password'></el-input>
<el-input v-model="form.password" type="password"></el-input>
</el-form-item>
<el-form-item size="large">
<el-button type="primary" native-type='submit' :loading='loading' @click='onSubmit'>登录</el-button>
<el-button
type="primary"
native-type="submit"
:loading="loading"
@click="onSubmit"
>登录</el-button
>
</el-form-item>
</el-form>
</div>
<div class="footer">
</div>
<div class="footer"></div>
</div>
</template>
......@@ -41,6 +51,9 @@ export default {
// });
// window.location.href=process.env.VUE_APP_PORTAL_URL=='undefined'?'http://192.168.0.98:11072':process.env.VUE_APP_PORTAL_URL
localStorage.getItem("sysName")
? (this.title = localStorage.getItem("sysName"))
: (this.title = "智慧大厅精细化管理平台");
},
methods: {
login() {
......@@ -51,7 +64,7 @@ export default {
},
loginSuccess({ data }) {
console.log("userData", data);
console.log("redirect",this.redirect)
console.log("redirect", this.redirect);
this.$store.commit("setUserData", data);
this.$router.replace({
path: this.redirect,
......@@ -92,6 +105,7 @@ export default {
loginName: "",
password: "",
},
title: "",
};
},
};
......@@ -140,4 +154,3 @@ export default {
}
}
</style>
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