819527061@qq.com
2024-06-11 7f482f8e9e8b4900a890b571c75a02efc1bd25cc
pages/login/resetPassword/resetPassword.vue
@@ -14,12 +14,12 @@
          <u-input v-if='inputType==="password"'
                   v-model="modelForm.originalPassword"
                   border="surround"
                   placeholder="请输入密码(仅支持数字字母下划线)"
                   placeholder="密码应由8-16位数字、字母、符号组成。"
                   :type='inputType' />
          <u-input v-else
                   v-model="modelForm.originalPassword"
                   border="surround"
                   placeholder="请输入密码(仅支持数字字母下划线)"
                   placeholder="密码应由8-16位数字、字母、符号组成。"
                   :type='inputType' />
        </u-form-item>
      </template>
@@ -30,12 +30,12 @@
            <u-input v-if='inputType==="password"'
               v-model="modelForm.password"
               border="surround"
               placeholder="请输入密码(仅支持数字字母下划线)"
               placeholder="密码应由8-16位数字、字母、符号组成。"
               :type='inputType' />
            <u-input v-else
               v-model="modelForm.password"
               border="surround"
               placeholder="请输入密码(仅支持数字字母下划线)"
               placeholder="密码应由8-16位数字、字母、符号组成。"
               :type='inputType' />
         </u-form-item>
      <view class="intensity">
@@ -60,12 +60,12 @@
            <u-input v-if='inputType==="password"'
               v-model="modelForm.secondPassword"
               border="surround"
               placeholder="请再次输入密码(仅支持数字字母下划线)"
               placeholder="请再次输入密码"
               type='password' />
            <u-input v-else
               v-model="modelForm.secondPassword"
               border="surround"
               placeholder="请再次输入密码(仅支持数字字母下划线)"
               placeholder="请再次输入密码"
               type='text' />
         </u-form-item>
         <u-form-item>
@@ -181,7 +181,8 @@
          originalPassword:'',  //原始密码
               password: '',  //新密码
               secondPassword: '',  //二次确认密码
          username:''
          username:'',
          userId:''
            },
            processLoading: false,
            rules: {
@@ -210,6 +211,9 @@
            return uni.getStorageSync('roleType')
         },
      userId() {
        if(uni.getStorageSync('userId')) {
          this.modelForm.userId = uni.getStorageSync('userId')
        }
        return uni.getStorageSync('userId')
      }
      },
@@ -222,6 +226,7 @@
      if(params.userInfo) {
        console.log(JSON.parse(params.userInfo),'userInfo====')
        this.modelForm.username = JSON.parse(params.userInfo).username
        this.modelForm.userId = JSON.parse(params.userInfo).userId.toString()   //userId
        if(JSON.parse(params.userInfo).isShowPassword) {
          this.isShowPassword = false
        }else {
@@ -264,9 +269,7 @@
        }
            this.$refs.uForm.validate().then(res => {
          this.processLoading = true;
          let params = Object.assign({},this.modelForm, {userId:this.userId.toString()})
          console.log(params,'params=====')
          this.$reqAllJson('appUpdateById', params, { method: 'PUT', 'Content-type': 'application/json' }).then(res => {
          this.$reqAllJson('appUpdateById', this.modelForm, { method: 'PUT', 'Content-type': 'application/json' }).then(res => {
            this.processLoading = false;
            if (res.code === 0) {
              this.$u.toast('修改成功,即将回到首页')