From 576be8c8d9978b3d8d432d01f8da2cbf43a556ca Mon Sep 17 00:00:00 2001
From: liangjin <liangjin@finlean.com>
Date: Tue, 16 Mar 2021 17:55:04 +0800
Subject: [PATCH] 重构

---
 pages/forgetPassword/forgetPassword.js |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/pages/forgetPassword/forgetPassword.js b/pages/forgetPassword/forgetPassword.js
index 1c9b612..dfadcb7 100644
--- a/pages/forgetPassword/forgetPassword.js
+++ b/pages/forgetPassword/forgetPassword.js
@@ -21,7 +21,7 @@
       return 
     }
     $api.ajax(
-      '/sib/user/sendMsg',
+      '/zic/user/sendMsg',
       'POST',
       (res)=>{
         
@@ -50,11 +50,11 @@
       })
     }else if(code == 2){
       this.setData({
-        'info.newPwd':md5.hex_md5(e.detail.value) 
+        'info.newPwd':e.detail.value
       })
     }else{
       this.setData({
-        newPwdTwo: md5.hex_md5(e.detail.value)
+        newPwdTwo:e.detail.value
       })
     }
   },
@@ -89,7 +89,14 @@
     }
     if(!validator.checkPassword(this.data.info.newPwd)){
       my.showToast({
-        content: '密码为8-16数字字母组合',
+        content: '新密码为8-16数字字母组合',
+        duration: 2000
+      })
+      return
+    }
+    if(!this.data.newPwdTwo){
+      my.showToast({
+        content: '请再次输入新密码',
         duration: 2000
       })
       return
@@ -102,7 +109,7 @@
       return
     }
     $api.ajax(
-      '/sib/user/forgetPwd',
+      '/zic/user/forgetPwd',
       'POST',
       res=>{
         my.showToast({
@@ -118,7 +125,9 @@
       err=>{},
       false,
       {
-        ...this.data.info
+        mblNo:this.data.info.mblNo,
+        verCode:this.data.info.verCode,
+        newPwd: md5.hex_md5(this.data.info.mblNo+this.data.info.newPwd)
       }
     )
   }

--
Gitblit v1.8.0