zcy 3 年之前
父节点
当前提交
b1a6c2d71b
共有 1 个文件被更改,包括 3 次插入5 次删除
  1. 3 5
      src/layout/components/UserPassword.vue

+ 3 - 5
src/layout/components/UserPassword.vue

@@ -41,7 +41,7 @@
           label="确认新密码"
         >
           <a-input
-            v-decorator="[ 'confirmpassword', validatorRules.confirmpassword]"
+            v-decorator="[ 'confirmPassword', validatorRules.confirmPassword]"
             type="password"
             placeholder="请确认新密码"
           />
@@ -76,7 +76,7 @@ export default {
             validator: this.validateToNextPassword
           }]
         },
-        confirmpassword: {
+        confirmPassword: {
           rules: [{
             required: true, message: '请确认新密码!'
           }, {
@@ -124,7 +124,7 @@ export default {
       this.form.validateFields((err, values) => {
         if (!err) {
           that.confirmLoading = true
-          const params = Object.assign({ username: this.username }, values)
+          const params = Object.assign({ userName: this.username }, values)
           console.log('修改密码提交数据', params)
           httpAction(this.url, params, 'put').then((res) => {
             that.confirmLoading = false
@@ -140,8 +140,6 @@ export default {
     },
     validateToNextPassword(rule, value, callback) {
       const pattern = /^(?![A-Za-z0-9]+$)(?![a-z0-9\W]+$)(?![A-Za-z\W]+$)(?![A-Z0-9\W]+$)[a-zA-Z0-9\W]{8,}$/
-      console.log(pattern.test(value))
-      console.log(value)
       if (value && !pattern.test(value)) {
         callback('请输入8位以上大小写字母、数字、特殊符号组合')
       } else {