qingyiay
2023-10-17 2adce788c1a411959b81f08d5569d92861c7f300
pages/login/resetPassword/resetPassword.vue
@@ -9,19 +9,31 @@
            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">
@@ -30,6 +42,18 @@
                  :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>
@@ -40,6 +64,9 @@
      data() {
         return {
            userInfo: {},
            checkboxValue: [],
            inputType: 'password',
            isFocus: false,
            modelForm: {
               password: '',
               secondPassword: ''
@@ -68,6 +95,10 @@
         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;