1
This commit is contained in:
@@ -14,13 +14,6 @@
|
||||
</span>
|
||||
</Input>
|
||||
</FormItem>
|
||||
<FormItem prop="tenantCode">
|
||||
<Input v-model="form.tenantCode" placeholder="租户编码,默认 default">
|
||||
<span slot="prepend">
|
||||
<Icon :size="14" type="ios-briefcase"></Icon>
|
||||
</span>
|
||||
</Input>
|
||||
</FormItem>
|
||||
<FormItem>
|
||||
<Button style="margin-top:20px;" size="large" @click="handleSubmit" type="primary" long>登录</Button>
|
||||
</FormItem>
|
||||
@@ -47,8 +40,7 @@ export default {
|
||||
return {
|
||||
form: {
|
||||
userName: '',
|
||||
password: '',
|
||||
tenantCode: 'default'
|
||||
password: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -56,8 +48,7 @@ export default {
|
||||
rules() {
|
||||
return {
|
||||
userName: this.userNameRules,
|
||||
password: this.passwordRules,
|
||||
tenantCode: [{ required: false }]
|
||||
password: this.passwordRules
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -67,8 +58,7 @@ export default {
|
||||
if (valid) {
|
||||
this.$emit('on-success-valid', {
|
||||
userName: this.form.userName,
|
||||
password: this.form.password,
|
||||
tenantCode: (this.form.tenantCode || '').trim() || 'default'
|
||||
password: this.form.password
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</div>
|
||||
|
||||
<div class="login-con">
|
||||
<Card icon="log-in" title="欢迎登录" style="width:350px;height:300px;" :bordered="false">
|
||||
<Card icon="log-in" title="欢迎登录" style="width:350px;height:260px;" :bordered="false">
|
||||
<div class="form-con">
|
||||
<login-form @on-success-valid="handleSubmit"></login-form>
|
||||
</div>
|
||||
@@ -43,12 +43,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
...mapActions('user', ['handleLogin']),
|
||||
async handleSubmit({ userName, password, tenantCode }) {
|
||||
async handleSubmit({ userName, password }) {
|
||||
try {
|
||||
let userFrom = {
|
||||
name: userName,
|
||||
password: password,
|
||||
tenant_code: tenantCode || 'default'
|
||||
password: password
|
||||
}
|
||||
await this.handleLogin({
|
||||
userFrom,
|
||||
|
||||
Reference in New Issue
Block a user