|
@@ -155,12 +155,32 @@
|
|
|
></el-input>
|
|
|
</div>
|
|
|
<div class="input_box">
|
|
|
- <span>修改密码</span>
|
|
|
- <el-input
|
|
|
- class="input"
|
|
|
- v-model="password"
|
|
|
- placeholder="请输入修改密码"
|
|
|
- ></el-input>
|
|
|
+ <span>输入新密码</span>
|
|
|
+ <div style="position: relative">
|
|
|
+ <el-input
|
|
|
+ :type="isLook ? 'type' : 'password'"
|
|
|
+ class="input"
|
|
|
+ v-model="password"
|
|
|
+ placeholder="请输入修改密码"
|
|
|
+ ></el-input>
|
|
|
+ <div class="eye" @click="changeEye">
|
|
|
+ <img :src="isLook ? eye : eyeOff" alt="" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="input_box">
|
|
|
+ <span>再次输入新密码</span>
|
|
|
+ <div style="position: relative">
|
|
|
+ <el-input
|
|
|
+ :type="isLook ? 'type' : 'password'"
|
|
|
+ class="input"
|
|
|
+ v-model="password1"
|
|
|
+ placeholder="请再次输入修改密码"
|
|
|
+ ></el-input>
|
|
|
+ <div class="eye" @click="changeEye">
|
|
|
+ <img :src="isLook ? eye : eyeOff" alt="" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="input_box">
|
|
|
<span></span>
|
|
@@ -212,6 +232,10 @@ export default {
|
|
|
},
|
|
|
opassword: "",
|
|
|
password: "",
|
|
|
+ password1: "",
|
|
|
+ isLook: false,
|
|
|
+ eyeOff: require("../../assets/icon/eyeOff.png"),
|
|
|
+ eye: require("../../assets/icon/eye.png"),
|
|
|
tx: require("../../assets/avatar.png"),
|
|
|
userinfo: "",
|
|
|
schoolJuri: [],
|
|
@@ -255,6 +279,9 @@ export default {
|
|
|
console.error(err);
|
|
|
});
|
|
|
},
|
|
|
+ changeEye() {
|
|
|
+ this.isLook = !this.isLook;
|
|
|
+ },
|
|
|
getOrg() {
|
|
|
this.isLoading = true;
|
|
|
this.ajax
|
|
@@ -334,6 +361,9 @@ export default {
|
|
|
if (this.password.length < 6) {
|
|
|
this.$message.error("密码长度不少于6位");
|
|
|
return;
|
|
|
+ } else if (this.password != this.password1) {
|
|
|
+ this.$message.error("两次新密码不相同");
|
|
|
+ return;
|
|
|
}
|
|
|
let params = [
|
|
|
{
|
|
@@ -482,4 +512,18 @@ export default {
|
|
|
.input_box + .input_box {
|
|
|
margin-top: 20px;
|
|
|
}
|
|
|
+
|
|
|
+.eye {
|
|
|
+ position: absolute;
|
|
|
+ right: 10px;
|
|
|
+ top: 8px;
|
|
|
+ width: 25px;
|
|
|
+ height: 25px;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+
|
|
|
+.eye > img {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+}
|
|
|
</style>
|