yangan
2024-04-25 ffc2eddb1c4f534075fdc5787cbca06e847c576c
pages/login/resetPassword/resetPassword.vue
@@ -107,13 +107,34 @@
            }
         }
      },
      computed: {
         roleType() {
            return uni.getStorageSync('roleType')
         }
      },
      onLoad(params) {
         this.userInfo = JSON.parse(params.userInfo)
         if (this.roleType === 3) {
            this.userInfo = JSON.parse(params.userInfo)
         } else {
            const query = JSON.parse(params.userInfo)
            this.getUserInfo( query.phone, query.idCard)
         }
      },
      onReady() {
         this.$refs.uForm.setRules(this.rules)
      },
      methods: {
         getUserInfo(phone, idCard) {
            this.$reqGet('phoneAndCard', { phone, idCard }).then(res => {
               if (res.code === 0) {
                  this.userInfo = res.data
               } else {
                  uni.$u.toast('加载失败')
               }
            })
         },
         checkChange(name) {
            this.inputType = name.length === 0 ? 'password' : ''
            this.isFocus = true