瀏覽代碼

重新优化暂存逻辑

sandm 1 年之前
父節點
當前提交
fffa32319f
共有 1 個文件被更改,包括 17 次插入28 次删除
  1. 17 28
      public/themes/default/views/app/recruit/sign_up.blade.php

+ 17 - 28
public/themes/default/views/app/recruit/sign_up.blade.php

@@ -2001,40 +2001,29 @@
                 },
                 save(formName){
                     this.user.operation = 1;
-                    this.$refs[formName].validate((valid,object) => {
-                        if (valid) {
-                            this.loading = this.$loading({
-                                lock: false,
-                                text: '加载中',
-                                spinner: 'el-icon-loading',
-                                background: 'rgba(0, 0, 0, 0.7)'
-                            });
+                    this.loading = this.$loading({
+                        lock: false,
+                        text: '加载中',
+                        spinner: 'el-icon-loading',
+                        background: 'rgba(0, 0, 0, 0.7)'
+                    });
 
-                            this.user._token = '{{csrf_token()}}';
+                    this.user._token = '{{csrf_token()}}';
 
-                            axios.post("{{route('recruit.save_sign_up')}}",Qs.stringify(this.user)).then(response => {
-                                if(response.data.status){
-                                    this.$alert(response.data.msg, '提交成功', {
-                                        confirmButtonText: '确定',
-                                        callback: action => {
-                                            window.location.reload();
-                                        }
-                                    });
-                                }else{
-                                    this.$message.error(response.data.msg);
-                                    this.loading.close();
-                                    return false;
+                    axios.post("{{route('recruit.save_sign_up')}}",Qs.stringify(this.user)).then(response => {
+                        if(response.data.status){
+                            this.$alert(response.data.msg, '提交成功', {
+                                confirmButtonText: '确定',
+                                callback: action => {
+                                    window.location.reload();
                                 }
                             });
-                        } else {
-                            for(let key in object){
-                                this.$message.error(object[key][0].message);
-                                return false;
-                            }
-
+                        }else{
+                            this.$message.error(response.data.msg);
+                            this.loading.close();
                             return false;
                         }
-                    })
+                    });
                 },
                 submit(formName){
                     this.user.operation = 2;