瀏覽代碼

Merge branch 'Test' into 'master'

Test

See merge request crowd-2019/crowd-test-service-front!130
郭超 5 年之前
父節點
當前提交
d0ab93847f

+ 0 - 1
src/components/task/Task.vue

@@ -428,7 +428,6 @@
         });
         this.currType = type[0] ? type[0] : {};
         if (this.currType.type === 0) {
-          this.task.participantCount = 1
           this.$refs.task.clearValidate('endPoint');
         }
       },

+ 0 - 1
src/components/task/TaskCreate.vue

@@ -270,7 +270,6 @@
         });
         this.currType = type[0] ? type[0] : {};
         if (this.currType.type === 0) {
-          this.task.participantCount = 1
           this.$refs.task.clearValidate('endPoint');
         }else{
           this.task.resource = '2'

+ 2 - 2
src/pages/UserCenter/BindingMail.vue

@@ -105,11 +105,11 @@
             Http.put('/api/user/email',params).then(res=>{
               this.hideLoading();
               if(res.msg == "ERROR"){
-                notify('error', '重新绑定失败:' + res.data);
+                notify('error', '绑定失败:' + res.data);
                 this.codeTime = 60;
                 this.hasVerifyCode = false;
               }else{
-                notify('success', '重新绑定成功');
+                notify('success', '绑定成功');
                 this.$router.push({path:'/personal/mailBinding'});
               }
             }).catch(err=> {

+ 2 - 2
src/pages/UserCenter/BindingMobile.vue

@@ -92,14 +92,14 @@
 
         Http.put('/api/user/mobile', params).then(res => {
           if (res.msg == "ERROR") {
-            notify('error', '重新绑定失败:' + res.data);
+            notify('error', '绑定失败:' + res.data);
             this.active = 1;
             this.phoneBindingForm.phone = '';
             this.phoneBindingForm.verifyCode = '';
             this.codeTime = 60;
             this.hasVerifyCode = false;
           } else {
-            notify('success', '重新绑定成功');
+            notify('success', '绑定成功');
             this.$router.push({path: '/personal/phoneBinding'});
           }
         }).catch(err => {

+ 6 - 2
src/pages/UserCenter/EnterpriseAuth.vue

@@ -93,7 +93,7 @@
           <el-input :disabled="!canEdit" v-model="enterpriseForm.legalPersonName"
                     ></el-input>
         </el-form-item>
-        <el-form-item label="性别" prop="gender" required>
+        <el-form-item label="性别" prop="gender">
           <el-radio-group v-model="enterpriseForm.gender" :disabled="!canEdit">
             <el-radio label="男"></el-radio>
             <el-radio label="女"></el-radio>
@@ -182,7 +182,7 @@
       </div>
     </div>
     <div class="enterprise-btn-wrapper">
-      <button class="enterprise-btn previousBtn" style="cursor: pointer" @click="active--" v-if="active>0">上一步</button>
+      <button class="enterprise-btn previousBtn" style="cursor: pointer" @click="preStep" v-if="active>0">上一步</button>
       <button class="enterprise-btn nextBtn" style="cursor: pointer" @click="nextStep" v-if="active===0">下一步</button>
       <button class="enterprise-btn nextBtn" style="cursor: pointer" @click="submitEnterpriseAuth"
               v-if="active===1 && authType === 0">提交审核
@@ -261,6 +261,10 @@
       }
     },
     methods: {
+      preStep() {
+        this.$refs['enterpriseForm'].clearValidate();
+        this.active --;
+      },
       nextStep() {
         this.$refs['enterpriseForm1'].validate(valid => {
           if (!valid) {

+ 17 - 12
src/pages/UserCenter/ReBindingMail.vue

@@ -78,11 +78,11 @@
         Http.put('/api/user/email', params).then((res) => {
           this.hideLoading();
           if (res.msg == "ERROR") {
-            notify('error', '重新绑定失败:' + res.data);
+            notify('error', '绑定失败:' + res.data);
             this.codeTime = 60;
             this.hasVerifyCode = false;
           } else {
-            // notify('success', '重新绑定成功');
+            // notify('success', '绑定成功');
             window.alert('邮箱修改成功, 请重新登录');
             logout().then((res) => {
               window.location.href = process.env.LOGIN_URL;
@@ -98,17 +98,22 @@
           email: this.emailBindingForm.email
         }
         Http.put('/api/verify/email', params).then((res) => {
-          this.hasVerifyCode = true;
           let _this = this;
-          let codeTimer = setInterval(function () {
-            if (_this.codeTime > 0) {
-              _this.codeTime--;
-            } else {
-              clearInterval(codeTimer);
-              _this.hasVerifyCode = false;
-              this.codeTime = 10;
-            }
-          }, 1000)
+          if (res.msg == "ERROR") {
+            notify('error', '验证码获取失败:' + res.data);
+          }else{
+            this.hasVerifyCode = true;
+            notify('success', res.data);
+            let codeTimer = setInterval(function () {
+              if (_this.codeTime > 0) {
+                _this.codeTime--;
+              } else {
+                clearInterval(codeTimer);
+                _this.hasVerifyCode = false;
+                this.codeTime = 10;
+              }
+            }, 1000)
+          }
         }).catch(err => {
           notify('error', '获取验证码失败:' + err.data);
         })

+ 34 - 24
src/pages/UserCenter/ReBindingMobile.vue

@@ -112,17 +112,16 @@
           Http.put('/api/user/mobile', params).then(res => {
             this.hideLoading();
             if (res.msg == "ERROR") {
-              notify('error', '重新绑定失败:' + res.data);
+              notify('error', '绑定失败:' + res.data);
             } else {
-              notify('success', '重新绑定成功');
+              notify('success', '绑定成功');
               this.$router.push({path: '/personal/phoneBinding'});
             }
           }).catch(err => {
             this.hideLoading();
-            notify('error', '重新绑定失败:' + err.data);
+            notify('error', '绑定失败:' + err.data);
           })
         }
-
       },
       getVerifyCode() {
         if (this.active === 0) {
@@ -132,17 +131,22 @@
             mobile: this.phoneBindingForm.phone
           }
           Http.put('/api/verify/mobile', params).then((res) => {
-            this.hasVerifyCode = true;
             let _this = this;
-            let codeTimer = setInterval(function () {
-              if (_this.codeTime > 0) {
-                _this.codeTime--;
-              } else {
-                clearInterval(codeTimer);
-                _this.hasVerifyCode = false;
-                this.codeTime = 10;
-              }
-            }, 1000)
+            if(res.msg == 'ERROR'){
+              notify('error', '验证码获取失败:' + res.data);
+            }else{
+              this.hasVerifyCode = true;
+              notify('success', res.data);
+              let codeTimer = setInterval(function () {
+                if (_this.codeTime > 0) {
+                  _this.codeTime--;
+                } else {
+                  clearInterval(codeTimer);
+                  _this.hasVerifyCode = false;
+                  this.codeTime = 10;
+                }
+              }, 1000)
+            }
           }).catch(err => {
             notify('error', '获取验证码失败:' + err.data);
           })
@@ -154,17 +158,23 @@
           }
 
           Http.put('/api/verify/mobile', params).then((res) => {
-            this.hasVerifyCode = true;
             let _this = this;
-            let codeTimer = setInterval(function () {
-              if (_this.codeTime > 0) {
-                _this.codeTime--;
-              } else {
-                clearInterval(codeTimer);
-                _this.hasVerifyCode = false;
-                this.codeTime = 10;
-              }
-            }, 1000)
+            if (res.msg == "ERROR") {
+              notify('error', '验证码获取失败:' + res.data);
+            }else{
+              this.hasVerifyCode = true;
+              notify('success', res.data);
+              let codeTimer = setInterval(function () {
+                if (_this.codeTime > 0) {
+                  _this.codeTime--;
+                } else {
+                  clearInterval(codeTimer);
+                  _this.hasVerifyCode = false;
+                  this.codeTime = 10;
+                }
+              }, 1000)
+            }
+
           }).catch(err => {
             notify('error', '获取验证码失败:' + err.data);
           })