Commit 5feebf8d by yanju

Merge branch 'yoona' into 'master'

修改账号安全因保存密码自动填写与增加提示

See merge request pigbigbig/beyond-clouds-front!62
parents d48cebfd 62ba94f6
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<div class="login-input__container"> <div class="login-input__container">
<label> <label>
<input <input
:autocomplete="autocomplete"
:class="{active: errMessage !== ''}" :class="{active: errMessage !== ''}"
:type="type" :type="type"
:placeholder="placeholder" :placeholder="placeholder"
...@@ -39,6 +40,10 @@ export default { ...@@ -39,6 +40,10 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
autocomplete: {
type: String,
default: 'on'
},
placeholder: String, placeholder: String,
errorMessage: String, // 错误信息 errorMessage: String, // 错误信息
value: String value: String
......
...@@ -111,17 +111,21 @@ ...@@ -111,17 +111,21 @@
</card-container> </card-container>
<card-container style="margin-top: 16px;padding-bottom: 32px" title="修改登录密码" :label="disabled === 'auto' ? '返回':'修改'" @listenCardConLabel="handleRevise"> <card-container style="margin-top: 16px;padding-bottom: 32px" title="修改登录密码" :label="disabled === 'auto' ? '返回':'修改'" @listenCardConLabel="handleRevise">
<div class="bind-account-item__wrap"> <div class="bind-account-item__wrap">
<div :title="titleMsg">
<login-input <login-input
:style="{pointerEvents: disabled, width: '334px'}" :style="{pointerEvents: disabled, width: '334px'}"
:error-message="newPasswordMsg" :error-message="newPasswordMsg"
placeholder="请输入新的密码" placeholder="请输入新的密码"
input-type="2" input-type="2"
type="password" type="password"
autocomplete="new-password"
v-model="newPassword" v-model="newPassword"
@handleCheck="handleCheckPassword" @handleCheck="handleCheckPassword"
@cancelCheck="newPasswordMsg = ''" @cancelCheck="newPasswordMsg = ''"
@keyup.enter.native="savePassword" @keyup.enter.native="savePassword"
></login-input> ></login-input>
</div>
<div :title="titleMsg">
<login-input <login-input
:style="{pointerEvents: disabled, width: '334px'}" :style="{pointerEvents: disabled, width: '334px'}"
v-model="verifyCode2" v-model="verifyCode2"
...@@ -135,6 +139,7 @@ ...@@ -135,6 +139,7 @@
@keyup.enter.native="savePassword" @keyup.enter.native="savePassword"
></login-input> ></login-input>
</div> </div>
</div>
<p class="submit-button" @click="savePassword" v-if="disabled === 'auto'">保存</p> <p class="submit-button" @click="savePassword" v-if="disabled === 'auto'">保存</p>
</card-container> </card-container>
...@@ -213,7 +218,8 @@ ...@@ -213,7 +218,8 @@
newPasswordMsg: '', newPasswordMsg: '',
verifyCode2: '', verifyCode2: '',
verify2ErrMsg: '', verify2ErrMsg: '',
disabled: 'none' disabled: 'none',
titleMsg: '功能在点击修改后启用'
} }
}, },
methods: { methods: {
...@@ -383,6 +389,8 @@ ...@@ -383,6 +389,8 @@
// 取消时 清空输入框 错误提示 // 取消时 清空输入框 错误提示
if (this.disabled === 'none') { if (this.disabled === 'none') {
Object.assign(this.$data, this.$options.data()); Object.assign(this.$data, this.$options.data());
} else {
this.titleMsg = '';
} }
}, },
async savePassword() { async savePassword() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment