From d889eaf990af99c06970e51f2bc421ac0015489c Mon Sep 17 00:00:00 2001
From: ZZJ <zzjdsg2300@163.com>
Date: 星期四, 05 五月 2022 13:30:31 +0800
Subject: [PATCH] bug修复

---
 src/views/register/components/ResetPassword.vue |   24 +++++++++++++++++-------
 1 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/src/views/register/components/ResetPassword.vue b/src/views/register/components/ResetPassword.vue
index 372ef35..135a0b1 100644
--- a/src/views/register/components/ResetPassword.vue
+++ b/src/views/register/components/ResetPassword.vue
@@ -15,7 +15,7 @@
             <div class="phoneNum">
               <el-input
                 placeholder="璇疯緭鍏ユ敞鍐屾墜鏈哄彿"
-                v-model="formData.phoneNum"
+                v-model.trim="formData.phoneNum"
                 class="input-with-select"
               >
               </el-input>
@@ -43,22 +43,22 @@
           </el-form-item>
 
           <el-form-item prop="password">
-            <el-input
+            <PwInput
               show-password
               v-model="formData.password"
               placeholder="璇疯缃�6-14浣嶇櫥褰曞瘑鐮�"
             >
-            </el-input>
+            </PwInput>
             <div class="iconfont">&#xe608;</div>
           </el-form-item>
 
           <el-form-item prop="repassword">
-            <el-input
+            <PwInput
               show-password
               v-model="formData.repassword"
               placeholder="纭瀵嗙爜"
             >
-            </el-input>
+            </PwInput>
             <div class="iconfont">&#xe608;</div>
           </el-form-item>
 
@@ -90,7 +90,7 @@
 </template>
 
 <script>
-import { getVerifyCode } from "@/api/login";
+import { getVerifyCode, forgetPwd } from "@/api/login";
 import { isPhone, validPassword } from "@/scripts/validate"; // 姝e垯鏂囦欢
 
 export default {
@@ -181,7 +181,17 @@
         }
       });
     },
-    submit() {
+    async submit() {
+      const res = await forgetPwd({
+        phoneNum: this.formData.phoneNum,
+        newPwd: this.formData.password,
+      });
+      if (res && res.success) {
+        this.$notify({
+          type: "success",
+          message: "閲嶇疆鎴愬姛",
+        });
+      }
       this.isReseted = true;
     },
   },

--
Gitblit v1.8.0