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,29 +111,34 @@ ...@@ -111,29 +111,34 @@
</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">
<login-input <div :title="titleMsg">
:style="{pointerEvents: disabled, width: '334px'}" <login-input
:error-message="newPasswordMsg" :style="{pointerEvents: disabled, width: '334px'}"
placeholder="请输入新的密码" :error-message="newPasswordMsg"
input-type="2" placeholder="请输入新的密码"
type="password" input-type="2"
v-model="newPassword" type="password"
@handleCheck="handleCheckPassword" autocomplete="new-password"
@cancelCheck="newPasswordMsg = ''" v-model="newPassword"
@keyup.enter.native="savePassword" @handleCheck="handleCheckPassword"
></login-input> @cancelCheck="newPasswordMsg = ''"
<login-input @keyup.enter.native="savePassword"
:style="{pointerEvents: disabled, width: '334px'}" ></login-input>
v-model="verifyCode2" </div>
input-type="3" <div :title="titleMsg">
placeholder="请输入验证码" <login-input
:error-message="verify2ErrMsg" :style="{pointerEvents: disabled, width: '334px'}"
:is-count="isCount" v-model="verifyCode2"
@handleCheck="handleCheckVerifyCode('password')" input-type="3"
@cancelCheck="verify2ErrMsg = ''" placeholder="请输入验证码"
@sendSms="sendVerifyCode('password')" :error-message="verify2ErrMsg"
@keyup.enter.native="savePassword" :is-count="isCount"
></login-input> @handleCheck="handleCheckVerifyCode('password')"
@cancelCheck="verify2ErrMsg = ''"
@sendSms="sendVerifyCode('password')"
@keyup.enter.native="savePassword"
></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>
...@@ -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