flat: 暂存,rules 表单 显示隐藏
This commit is contained in:
@@ -5,22 +5,15 @@
|
||||
<div class="login-title">{{ $t('login.phoneLogin') }}</div>
|
||||
<el-form :model="loginForm" :rules="loginRules" ref="loginForm" class="login-form">
|
||||
<el-form-item prop="username">
|
||||
<el-input size="small" style="margin-top: 20px; margin-bottom:10px;"
|
||||
@keyup.enter.native="handleLogin"
|
||||
v-model="loginForm.username"
|
||||
:auto-complete="off"
|
||||
placeholder="请输入您的账号">
|
||||
<i slot="prefix" class="icon-yonghu"/>
|
||||
<el-input size="small" style="margin-top: 20px; margin-bottom:10px;" @keyup.enter.native="handleLogin"
|
||||
v-model="loginForm.username" :auto-complete="off" placeholder="请输入您的账号">
|
||||
<i slot="prefix" class="icon-yonghu" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input size="small" style="margin-top: 20px; margin-bottom:10px;"
|
||||
type="password"
|
||||
@keyup.enter.native="handleLogin"
|
||||
v-model="loginForm.password"
|
||||
:auto-complete="off"
|
||||
placeholder="请输入您的密码">
|
||||
<i slot="prefix" class="icon-mima"/>
|
||||
<el-input size="small" style="margin-top: 20px; margin-bottom:10px;" type="password"
|
||||
@keyup.enter.native="handleLogin" v-model="loginForm.password" :auto-complete="off" placeholder="请输入您的密码">
|
||||
<i slot="prefix" class="icon-mima" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item v-if="this.website.captchaMode" prop="code">-->
|
||||
@@ -37,12 +30,8 @@
|
||||
<!-- </div>-->
|
||||
<!-- </el-form-item>-->
|
||||
<div>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
@click.native.prevent="handleLogin"
|
||||
class="login-submit"
|
||||
>{{ $t('login.submit') }}
|
||||
<el-button size="small" type="primary" @click.native.prevent="handleLogin" class="login-submit">{{
|
||||
$t('login.submit') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
@@ -51,14 +40,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters} from "vuex";
|
||||
import { mapGetters } from "vuex";
|
||||
import topLang from "@/page/index/top/top-lang";
|
||||
// import { info } from "@/api/system/tenant";
|
||||
import {getCaptcha} from "@/api/user";
|
||||
import { getCaptcha } from "@/api/user";
|
||||
|
||||
console.log('是否跳转', /(^http)(s?):\/\/([a-z0-9].+)\/manage(\/)?$/i.test(location.href), location.href)
|
||||
if (/(^http)(s?):\/\/([a-z0-9].+)\/manage(\/)?$/i.test(location.href)) {
|
||||
window.location.href = process.env.VUE_APP_LOGIN_NEXT
|
||||
// window.location.href = process.env.VUE_APP_LOGIN_NEXT
|
||||
}
|
||||
if (/(\/login\?)(.*)/ig.test(location.href)) {
|
||||
const obj = {}
|
||||
@@ -99,11 +88,11 @@ export default {
|
||||
},
|
||||
loginRules: {
|
||||
username: [
|
||||
{required: true, message: "请输入用户名", trigger: "blur"}
|
||||
{ required: true, message: "请输入用户名", trigger: "blur" }
|
||||
],
|
||||
password: [
|
||||
{required: true, message: "请输入密码", trigger: "blur"},
|
||||
{min: 1, message: "密码长度最少为6位", trigger: "blur"}
|
||||
{ required: true, message: "请输入密码", trigger: "blur" },
|
||||
{ min: 1, message: "密码长度最少为6位", trigger: "blur" }
|
||||
]
|
||||
},
|
||||
passwordType: "password",
|
||||
@@ -115,7 +104,7 @@ export default {
|
||||
watch: {},
|
||||
created() {
|
||||
// this.getTenant();
|
||||
const {ticket} = JSON.parse(window.sessionStorage.getItem('query_session') || "{}")
|
||||
const { ticket } = JSON.parse(window.sessionStorage.getItem('query_session') || "{}")
|
||||
window.sessionStorage.removeItem('query_session')
|
||||
console.log(ticket)
|
||||
if (ticket) {
|
||||
@@ -135,7 +124,7 @@ export default {
|
||||
props: [],
|
||||
methods: {
|
||||
handelGoReg() {
|
||||
this.$router.push({path: "/reg"});
|
||||
this.$router.push({ path: "/reg" });
|
||||
},
|
||||
refreshCode() {
|
||||
getCaptcha().then(res => {
|
||||
@@ -178,7 +167,7 @@ export default {
|
||||
}
|
||||
this.$store.dispatch("LoginByUsername", obj).then(() => {
|
||||
this.$store.dispatch('jlHelpShow', false)
|
||||
this.$router.push({path: this.tagWel.value});
|
||||
this.$router.push({ path: this.tagWel.value });
|
||||
loading.close();
|
||||
this.proLoading = false
|
||||
}).catch(() => {
|
||||
|
||||
Reference in New Issue
Block a user