|
|
|
@ -11,8 +11,7 @@ |
|
|
|
v-model="loginForm.tenantId" |
|
|
|
v-model="loginForm.tenantId" |
|
|
|
auto-complete="off" |
|
|
|
auto-complete="off" |
|
|
|
:placeholder="$t('login.tenantId')"> |
|
|
|
:placeholder="$t('login.tenantId')"> |
|
|
|
<i slot="prefix" |
|
|
|
<i slot="prefix" class="icon-quanxian"/> |
|
|
|
class="icon-quanxian"></i> |
|
|
|
|
|
|
|
</el-input> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="username"> |
|
|
|
<el-form-item prop="username"> |
|
|
|
@ -21,8 +20,7 @@ |
|
|
|
v-model="loginForm.username" |
|
|
|
v-model="loginForm.username" |
|
|
|
auto-complete="off" |
|
|
|
auto-complete="off" |
|
|
|
:placeholder="$t('login.username')"> |
|
|
|
:placeholder="$t('login.username')"> |
|
|
|
<i slot="prefix" |
|
|
|
<i slot="prefix" class="icon-yonghu"/> |
|
|
|
class="icon-yonghu"></i> |
|
|
|
|
|
|
|
</el-input> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="password"> |
|
|
|
<el-form-item prop="password"> |
|
|
|
@ -32,11 +30,8 @@ |
|
|
|
v-model="loginForm.password" |
|
|
|
v-model="loginForm.password" |
|
|
|
auto-complete="off" |
|
|
|
auto-complete="off" |
|
|
|
:placeholder="$t('login.password')"> |
|
|
|
:placeholder="$t('login.password')"> |
|
|
|
<i class="el-icon-view el-input__icon" |
|
|
|
<i class="el-icon-view el-input__icon" slot="suffix" @click="showPassword"/> |
|
|
|
slot="suffix" |
|
|
|
<i slot="prefix" class="icon-mima"/> |
|
|
|
@click="showPassword"></i> |
|
|
|
|
|
|
|
<i slot="prefix" |
|
|
|
|
|
|
|
class="icon-mima"></i> |
|
|
|
|
|
|
|
</el-input> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item> |
|
|
|
@ -51,6 +46,7 @@ |
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
import website from '@/config/website'; |
|
|
|
import website from '@/config/website'; |
|
|
|
|
|
|
|
import {info} from "@/api/system/tenant"; |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
name: "userlogin", |
|
|
|
name: "userlogin", |
|
|
|
@ -78,7 +74,9 @@ export default { |
|
|
|
passwordType: "password" |
|
|
|
passwordType: "password" |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
created() {}, |
|
|
|
created() { |
|
|
|
|
|
|
|
this.getTenant(); |
|
|
|
|
|
|
|
}, |
|
|
|
mounted() {}, |
|
|
|
mounted() {}, |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
|
...mapGetters(["tagWel"]) |
|
|
|
...mapGetters(["tagWel"]) |
|
|
|
@ -86,7 +84,7 @@ export default { |
|
|
|
props: [], |
|
|
|
props: [], |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
showPassword() { |
|
|
|
showPassword() { |
|
|
|
this.passwordType == "" |
|
|
|
this.passwordType === "" |
|
|
|
? (this.passwordType = "password") |
|
|
|
? (this.passwordType = "password") |
|
|
|
: (this.passwordType = ""); |
|
|
|
: (this.passwordType = ""); |
|
|
|
}, |
|
|
|
}, |
|
|
|
@ -106,6 +104,17 @@ export default { |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
getTenant() { |
|
|
|
|
|
|
|
let domain = window.location.href.replace("/#/login", ""); |
|
|
|
|
|
|
|
info(domain).then(res => { |
|
|
|
|
|
|
|
const data = res.data; |
|
|
|
|
|
|
|
if (data.success && data.data.tenantId) { |
|
|
|
|
|
|
|
this.tenantMode = false; |
|
|
|
|
|
|
|
this.loginForm.tenantId = data.data.tenantId; |
|
|
|
|
|
|
|
this.$parent.$refs.login.style.backgroundImage = `url(${data.data.backgroundUrl})`; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|