[fix][V]:完善登陆逻辑

master
Romesum 5 years ago
parent d0af2873d6
commit d0d37d9e89

@ -17,10 +17,12 @@
</el-select>
</el-form-item>
<el-form-item label="账号:" required prop="account">
<el-input type="text" v-model="ruleForm.account" placeholder="请输入您的账号" prefix-icon="el-icon-user-solid" class="required"></el-input>
<el-input type="text" v-model="ruleForm.account" placeholder="请输入您的账号"
prefix-icon="el-icon-user-solid" class="required"></el-input>
</el-form-item>
<el-form-item label="密码:" required prop="psw">
<el-input type="password" v-model="ruleForm.psw" placeholder="请输入您的密码" prefix-icon="el-icon-s-goods"></el-input>
<el-input type="password" v-model="ruleForm.psw" placeholder="请输入您的密码"
prefix-icon="el-icon-s-goods"></el-input>
</el-form-item>
<el-link class="phoneMessage link">手机短信登陆</el-link>
<el-link class="forgetPsw link" @click="dialogVisible = true">忘记密码</el-link>
@ -59,17 +61,16 @@
},
character: [{
label: '超级管理员',
value:'supAdmister'
value: '3'
},
{
label: '管理员',
value:'admister'
value: '2'
},
{
label: '老师',
value:'teacher'
value: '1'
}
],
rules: {
account: [{
@ -87,52 +88,24 @@
dialogVisible: false
}
},
mounted() {
console.log('This is login')
},
methods: {
aaa:function(){
console.log('aaaa')
},
submitForm:function(formName) {
this.$refs[formName].validate((valid) => {
submitForm (formName) {
this.$refs[formName].validate(async (valid) => {
if (valid) {
console.log(this.ruleForm.identity)
console.log(this.ruleForm.account)
console.log(this.ruleForm.psw)
get('login',{
identity: this.ruleForm.identity,
account: this.ruleForm.account,
psw: this.ruleForm.psw
await post('lb/user/login', {
auth: this.ruleForm.identity,
username: this.ruleForm.account,
password: this.ruleForm.psw
})
post('login',{
identity: this.ruleForm.identity,
account: this.ruleForm.account,
psw: this.ruleForm.psw
})
// axios.post('/login', {
// identity: this.identity,
// account: this.account,
// psw: this.psw
// })
// .then(function (response) { //
// console.log(response);
// this.$router.push('/')
// })
//
} else {
console.log('error submit!!');
return false;
}
});
},
},
async mounted() {
const data = await post('weapp/login',{
code:"123456"
})
console.log(data)
}
}
</script>
@ -140,10 +113,12 @@
#demo1 {
background-color: aquamarine;
}
#login {
width: 400px;
/*z-index:2*/
}
.card {
position: absolute;
top: 25%;
@ -155,6 +130,7 @@
position: relative;
left: 28%;
}
.phoneMessage {
position: relative;
left: 25%;

Loading…
Cancel
Save