|
|
@@ -6,7 +6,6 @@
|
|
|
<el-page-header @back="register = false" title="登录" style="width: 380px; line-height: 55px">
|
|
|
<div class="register-title" slot="content">注册账号</div>
|
|
|
</el-page-header>
|
|
|
-
|
|
|
<el-form :model="registerInfo" :rules="registerRule" style="width: 460px" ref="registerForm">
|
|
|
<el-form-item
|
|
|
prop="username"
|
|
|
@@ -145,7 +144,7 @@
|
|
|
prop="username"
|
|
|
:rules="{ required: true, message: '请输入用户名', trigger: 'blur' }"
|
|
|
>
|
|
|
- <el-input v-model="userInfo.username" placeholder="用户名"> </el-input>
|
|
|
+ <el-input v-model="userInfo.username" placeholder="用户名/手机号"> </el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item
|
|
|
prop="password"
|
|
|
@@ -165,9 +164,11 @@
|
|
|
</el-form-item> -->
|
|
|
<el-form-item label="">
|
|
|
<el-checkbox v-model="rememberMe">7天内免登录 </el-checkbox>
|
|
|
- <el-button type="text" style="float: right" @click="register = true"
|
|
|
- >注册账号
|
|
|
- </el-button>
|
|
|
+
|
|
|
+ <!-- <el-button type="text" @click="register = true">注册账号 </el-button> -->
|
|
|
+ <!-- <div @click="isShow = true">忘记密码</div> -->
|
|
|
+ <el-button class="bbb" type="text" @click="isShow = true">忘记密码 </el-button>
|
|
|
+ <el-button type="text" @click="register = true">注册账号 </el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</el-tab-pane>
|
|
|
@@ -219,6 +220,66 @@
|
|
|
</el-tabs>
|
|
|
</div>
|
|
|
</transition>
|
|
|
+ <el-dialog title="忘记密码" center :visible.sync="isShow" :before-close="handleClose" @close="closeDialog">
|
|
|
+ <el-form
|
|
|
+ :model="ruleForm"
|
|
|
+ status-icon
|
|
|
+ :rules="rules2"
|
|
|
+ ref="ruleForm"
|
|
|
+ label-width="100px"
|
|
|
+ class="demo-ruleForm"
|
|
|
+ >
|
|
|
+ <el-form-item label="企业全称" prop="name">
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入企业全称"
|
|
|
+ type="text"
|
|
|
+ style="width: 300px"
|
|
|
+ v-model="ruleForm.name"
|
|
|
+ autocomplete="off"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="统一社会信用代码" prop="ucss">
|
|
|
+ <el-input
|
|
|
+ type="text"
|
|
|
+ placeholder="请输入统一社会信用代码"
|
|
|
+ style="width: 300px"
|
|
|
+ v-model="ruleForm.ucss"
|
|
|
+ autocomplete="off"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="手机号" prop="phone">
|
|
|
+ <el-input
|
|
|
+ type="txet"
|
|
|
+ placeholder="请输入手机号"
|
|
|
+ style="width: 300px"
|
|
|
+ v-model="ruleForm.phone"
|
|
|
+ autocomplete="off"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="密码" prop="password">
|
|
|
+ <el-input
|
|
|
+ style="width: 300px"
|
|
|
+ type="password"
|
|
|
+ v-model="ruleForm.password"
|
|
|
+ placeholder="请输入新密码,8-16位字母数字组合"
|
|
|
+ autocomplete="off"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="确认密码" prop="checkPass">
|
|
|
+ <el-input
|
|
|
+ style="width: 300px"
|
|
|
+ type="password"
|
|
|
+ v-model="ruleForm.checkPass"
|
|
|
+ placeholder="请再次输出新密码"
|
|
|
+ autocomplete="off"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="submitForm('ruleForm')">提交</el-button>
|
|
|
+ <el-button @click="isShow = false">返回</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -226,7 +287,9 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
rememberMe: false,
|
|
|
+ isShow: false,
|
|
|
loading: false,
|
|
|
+ ruleForm: {},
|
|
|
userInfo: {
|
|
|
username: '',
|
|
|
password: '',
|
|
|
@@ -241,6 +304,21 @@ export default {
|
|
|
businessLicense: '',
|
|
|
districtCode: ''
|
|
|
},
|
|
|
+ rules2: {
|
|
|
+ checkPass: [
|
|
|
+ {
|
|
|
+ validator: (rule, value, callback) => {
|
|
|
+ if (value !== this.ruleForm.password) {
|
|
|
+ callback(new Error('两次密码输入不一致'));
|
|
|
+ } else {
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ trigger: 'blur'
|
|
|
+ },
|
|
|
+ { required: true, message: '请再次输入密码', trigger: 'blur' }
|
|
|
+ ]
|
|
|
+ },
|
|
|
activeName: 'first',
|
|
|
time: 0,
|
|
|
sending: false,
|
|
|
@@ -324,6 +402,31 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleClose() {
|
|
|
+ this.isShow = false;
|
|
|
+ },
|
|
|
+ closeDialog() {},
|
|
|
+ submitForm(formName) {
|
|
|
+ this.$refs[formName].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ let form = { ...this.ruleForm };
|
|
|
+ delete form.ucss;
|
|
|
+ delete form.checkPass;
|
|
|
+ console.log(form);
|
|
|
+ this.$http
|
|
|
+ .post('/auth/forgetPW', {
|
|
|
+ ...form
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ this.$message.success('修改成功');
|
|
|
+ this.isShow = false;
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ this.$message.error(e.error);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
login() {
|
|
|
this.$refs.form.validate(valid => {
|
|
|
if (valid) {
|
|
|
@@ -469,6 +572,16 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|
|
|
+/deep/ .el-dialog {
|
|
|
+ height: 500px;
|
|
|
+ width: 500px;
|
|
|
+}
|
|
|
+.demo-ruleForm {
|
|
|
+ width: 400px;
|
|
|
+}
|
|
|
+/deep/ .el-checkbox {
|
|
|
+ margin-right: 152px;
|
|
|
+}
|
|
|
.container {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
@@ -557,7 +670,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
/deep/ .el-button--text {
|
|
|
- margin-left: 220px;
|
|
|
+ // margin-left: 70px;
|
|
|
}
|
|
|
/deep/ .el-form-item__label {
|
|
|
width: 110px;
|