|
@@ -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) {
|