Browse Source

静态页面

xcx 4 years ago
parent
commit
f5a014efc5
1 changed files with 6 additions and 5 deletions
  1. 6
    5
      src/pages/ResetPassword/index.vue

+ 6
- 5
src/pages/ResetPassword/index.vue View File

@@ -50,6 +50,7 @@
50 50
 </template>
51 51
 
52 52
 <script>
53
+import md5 from 'js-md5'
53 54
 import { createNamespacedHelpers } from 'vuex'
54 55
 const { mapActions: mapUserActions } = createNamespacedHelpers('user')
55 56
 export default {
@@ -88,19 +89,19 @@ export default {
88 89
         this.Toast('手机号格式错误')
89 90
         return false
90 91
       }
91
-      if (!this.IsPhone(this.Code === '')) {
92
+      if (this.Code === '') {
92 93
         this.Toast('请输入验证码')
93 94
         return false
94 95
       }
95
-      if (!this.IsPhone(this.Password === '')) {
96
+      if (this.Password === '') {
96 97
         this.Toast('请输入新密码')
97 98
         return false
98 99
       }
99
-      if (!this.IsPhone(this.PasswordAgain === '')) {
100
+      if (this.PasswordAgain === '') {
100 101
         this.Toast('请确认新密码')
101 102
         return false
102 103
       }
103
-      if (!this.IsPhone(this.Password !== this.PasswordAgain)) {
104
+      if (this.Password !== this.PasswordAgain) {
104 105
         this.Toast('两次密码输入不一致')
105 106
         return false
106 107
       }
@@ -109,7 +110,7 @@ export default {
109 110
       this.ResetPassword({
110 111
         data: {
111 112
           captcha: this.Code,
112
-          password: this.Password,
113
+          password: md5(this.Password),
113 114
           phone: this.Phone
114 115
         }
115 116
       }).then(() => {