Browse Source

故障维修表单提示信息

q 1 year ago
parent
commit
1b72c5c6cd
1 changed files with 8 additions and 17 deletions
  1. 8 17
      webmain/we/ying/yingyong/meet/repair_fault.html

+ 8 - 17
webmain/we/ying/yingyong/meet/repair_fault.html

@@ -146,10 +146,6 @@
 
     <script>
         // import { showToast } from 'vant';
-
-
-
-
         new Vue({
             el:'#app',
             data(){
@@ -193,17 +189,6 @@
                         other_info:this.other,
                         pic:this.id_list
                     }
-                    console.log(data)
-
-                    // 	const formData = new FormData();
-                    //                 formData.append('site', this.describe);
-                    //                 formData.append('reporter', this.people);
-                    //                 formData.append('mobile', this.phone);
-                    //                 formData.append('other_info', this.other);
-                    //                 formData.append('pic', this.id_list);
-
-                    // 	axios.post('http://oa.test/api.php?m=openRepairFault&a=add&openkey=d9302364e2a2d9fdcab2707a46fbab5a',data)
-
                     axios({
                         method: 'post',
                         url: 'http://zq.oa.nxjiewei.com:8011/api.php?m=openRepairFault&a=add&openkey=d9302364e2a2d9fdcab2707a46fbab5a',
@@ -213,10 +198,16 @@
                         }
                     })
                         .then(function (res) {
-                            console.log(res)
+                            if (res.data['code'] == 200) {
+                                vant.Toast('提交成功');
+                                // window.history.back();
+                            } else {
+                                vant.Toast(res.data['msg']);
+                            }
                         })
                         .catch(function (error) {
-                            console.log(error);
+                            vant.Toast('网络错误');
+                            // console.log(error);
                         });
                 },
                 uploadImage(file) {