| | |
| | | label="密码" |
| | | required |
| | | borderBottom> |
| | | <u--input v-model="modelForm.password" |
| | | <u-input v-if='inputType==="password"' |
| | | v-model="modelForm.password" |
| | | border="surround" |
| | | placeholder="请输入密码" |
| | | type='password'></u--input> |
| | | placeholder="请输入密码(仅支持数字字母下划线)" |
| | | :type='inputType' /> |
| | | <u-input v-else |
| | | v-model="modelForm.password" |
| | | border="surround" |
| | | placeholder="请输入密码(仅支持数字字母下划线)" |
| | | :type='inputType' /> |
| | | </u-form-item> |
| | | <u-form-item prop="secondPassword" |
| | | label="二次确认" |
| | | required |
| | | borderBottom> |
| | | <u--input v-model="modelForm.secondPassword" |
| | | <u-input v-if='inputType==="password"' |
| | | v-model="modelForm.secondPassword" |
| | | border="surround" |
| | | placeholder="请再次输入密码" |
| | | type='password'></u--input> |
| | | placeholder="请再次输入密码(仅支持数字字母下划线)" |
| | | type='password' /> |
| | | <u-input v-else |
| | | v-model="modelForm.secondPassword" |
| | | border="surround" |
| | | placeholder="请再次输入密码(仅支持数字字母下划线)" |
| | | type='text' /> |
| | | </u-form-item> |
| | | <u-form-item> |
| | | <view class="process-button"> |
| | |
| | | :loading="processLoading" |
| | | @click.stop="process"></u-button> |
| | | </view> |
| | | </u-form-item> |
| | | <u-form-item prop="checkboxValue"> |
| | | <u-checkbox-group v-model="checkboxValue" |
| | | @change="checkChange"> |
| | | <u-checkbox label="显示密码" |
| | | name="显示" |
| | | iconSize="32" |
| | | label-size="32" |
| | | size="40" |
| | | shape="circle"> |
| | | </u-checkbox> |
| | | </u-checkbox-group> |
| | | </u-form-item> |
| | | </u-form> |
| | | </view> |
| | |
| | | data() { |
| | | return { |
| | | userInfo: {}, |
| | | checkboxValue: [], |
| | | inputType: 'password', |
| | | isFocus: false, |
| | | modelForm: { |
| | | password: '', |
| | | secondPassword: '' |
| | |
| | | this.$refs.uForm.setRules(this.rules) |
| | | }, |
| | | methods: { |
| | | checkChange(name) { |
| | | this.inputType = name.length === 0 ? 'password' : '' |
| | | this.isFocus = true |
| | | }, |
| | | process() { |
| | | if (this.modelForm.password !== this.modelForm.secondPassword) return uni.$u.toast('密码不一致,请检查') |
| | | this.userInfo.password = this.modelForm.secondPassword; |