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