"0430 登陆页面"

master
aiyadc 5 years ago
parent cb7fe32184
commit 06b44f9629

@ -6,7 +6,7 @@
<h2 >登录</h2>
</div>
<el-form ref="ruleForm" :rules="rules" :model="ruleForm" label-position="left" label-width="70px" >
<el-form-item label="身份:" align="left" prop="identity" style="width: 100%">
<el-form-item label="身份:" align="left" prop="name" style="width: 100%">
<el-select v-model="ruleForm.identity" placeholder="请选择您的身份" style="width:100% ">
<el-option
v-for="item in character"
@ -16,14 +16,14 @@
</el-option>
</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-form-item label="账号:" required prop="username">
<el-input type="text" v-model="ruleForm.username" 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-form-item label="密码:" required prop="password">
<el-input type="password" v-model="ruleForm.password" 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>
<el-link class="forgetpassword link" @click="dialogVisible = true">忘记密码</el-link>
<el-divider></el-divider>
</el-form>
<el-button type="primary" @click="submitForm('ruleForm')" style="width: 100%">登录</el-button>
@ -31,7 +31,7 @@
</el-card>
</div>
<div id="forgetPsw">
<div id="forgetpassword">
<el-dialog
title="提示"
:visible.sync="dialogVisible"
@ -54,8 +54,8 @@
return{
ruleForm: {
identity:'',
account:'',
psw:'',
username:'',
password:'',
},
character:[{
label:'超级管理员',
@ -72,10 +72,10 @@
],
rules: {
account: [{
username: [{
required: true, message: '请输入您的账号', trigger: 'blur'
}],
psw:[
password:[
{
required:true,message:'请输入您的密码',trigger: 'blur'
}
@ -97,28 +97,11 @@
submitForm:function(formName) {
this.$refs[formName].validate((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
})
post('login',{
identity: this.ruleForm.identity,
account: this.ruleForm.account,
psw: this.ruleForm.psw
username: this.ruleForm.username,
password: this.ruleForm.password
})
// 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;
@ -151,7 +134,7 @@
width: 30%;
}
.forgetPsw{
.forgetpassword{
position: relative;
left: 28%;
}

Loading…
Cancel
Save