瀏覽代碼

静态页面

xcx 4 年之前
父節點
當前提交
f5a014efc5
共有 1 個文件被更改,包括 6 次插入5 次删除
  1. 6
    5
      src/pages/ResetPassword/index.vue

+ 6
- 5
src/pages/ResetPassword/index.vue 查看文件

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