Ver código fonte

修改驻场

xiaozhen 6 anos atrás
pai
commit
5b56a876c2
1 arquivos alterados com 9 adições e 7 exclusões
  1. 9 7
      pages/job/_id.vue

+ 9 - 7
pages/job/_id.vue

@@ -100,24 +100,26 @@
                     }
                 })
             },
-            login(){
+            login() {
                 location.href = `https://www.proginn.com/?loginbox=show`
             },
             apply() {
-                if (this.applying){
+                if (this.applying) {
                     return false;
                 }
-                this.applying=true;
+                this.applying = true;
                 this.$axios.$post('/api/present_job/apply', {id: this.$route.params.id}).then(res => {
-                    if (res.code === 1) {
+                    if (res.status === 1) {
+                        alert(1);
                         this.$message.success(res.info);
                         this.getData();
                     } else {
                         this.$message.error(res.info);
+                        this.getData();
                     }
-                    this.applying=false;
-                }).catch(res=>{
-                    this.applying=false;
+                    this.applying = false;
+                }).catch(res => {
+                    this.applying = false;
                 })
             }
         }