|  |  | 
 |  |  | try { | 
 |  |  |   components = { | 
 |  |  |     uPopup: function () { | 
 |  |  |       return Promise.all(/*! import() | node-modules/uview-ui/components/u-popup/u-popup */[__webpack_require__.e("common/vendor"), __webpack_require__.e("node-modules/uview-ui/components/u-popup/u-popup")]).then(__webpack_require__.bind(null, /*! uview-ui/components/u-popup/u-popup.vue */ 255)) | 
 |  |  |       return Promise.all(/*! import() | node-modules/uview-ui/components/u-popup/u-popup */[__webpack_require__.e("common/vendor"), __webpack_require__.e("node-modules/uview-ui/components/u-popup/u-popup")]).then(__webpack_require__.bind(null, /*! uview-ui/components/u-popup/u-popup.vue */ 265)) | 
 |  |  |     }, | 
 |  |  |   } | 
 |  |  | } catch (e) { | 
 |  |  | 
 |  |  |         phone: '', | 
 |  |  |         typeId: '' | 
 |  |  |       }, | 
 |  |  |       problemList: [] | 
 |  |  |       problemList: [], | 
 |  |  |       isEnd: true | 
 |  |  |     }; | 
 |  |  |   }, | 
 |  |  |   computed: _objectSpread({}, (0, _vuex.mapState)(['userInfo'])), | 
 |  |  | 
 |  |  |     }, | 
 |  |  |     // 提交 | 
 |  |  |     submit: function submit() { | 
 |  |  |       if (this.from.problemId == '') { | 
 |  |  |         uni.showToast({ | 
 |  |  |           title: '车辆问题不能为空', | 
 |  |  |           icon: 'none', | 
 |  |  |           duration: 2000 | 
 |  |  |         }); | 
 |  |  |         return; | 
 |  |  |       } | 
 |  |  |       this.$u.api.saveRepair({ | 
 |  |  |         addr: this.from.address, | 
 |  |  |         bikeCode: this.from.code, | 
 |  |  |         binkeId: this.binkeId, | 
 |  |  |         content: this.from.info, | 
 |  |  |         fileUrlList: this.from.files.map(function (item) { | 
 |  |  |           return item.imgaddr; | 
 |  |  |         }), | 
 |  |  |         latitude: this.from.latitude, | 
 |  |  |         linkname: this.from.contacts, | 
 |  |  |         linkphone: this.from.phone, | 
 |  |  |         longitude: this.from.longitude, | 
 |  |  |         param: this.from.problemName, | 
 |  |  |         paramId: this.from.problemId, | 
 |  |  |         typeId: this.from.typeId | 
 |  |  |       }).then(function (res) { | 
 |  |  |         if (res.code === 200) { | 
 |  |  |       var _this2 = this; | 
 |  |  |       if (this.isEnd) { | 
 |  |  |         if (this.from.problemId == '') { | 
 |  |  |           uni.showToast({ | 
 |  |  |             title: '上报成功', | 
 |  |  |             icon: 'success', | 
 |  |  |             title: '车辆问题不能为空', | 
 |  |  |             icon: 'none', | 
 |  |  |             duration: 2000 | 
 |  |  |           }); | 
 |  |  |           setTimeout(function () { | 
 |  |  |             uni.navigateBack({ | 
 |  |  |               delta: 1 | 
 |  |  |             }); | 
 |  |  |           }, 2000); | 
 |  |  |           return; | 
 |  |  |         } | 
 |  |  |       }); | 
 |  |  |         this.isEnd = false; | 
 |  |  |         this.$u.api.saveRepair({ | 
 |  |  |           addr: this.from.address, | 
 |  |  |           bikeCode: this.from.code, | 
 |  |  |           binkeId: this.binkeId, | 
 |  |  |           content: this.from.info, | 
 |  |  |           fileUrlList: this.from.files.map(function (item) { | 
 |  |  |             return item.imgaddr; | 
 |  |  |           }), | 
 |  |  |           latitude: this.from.latitude, | 
 |  |  |           linkname: this.from.contacts, | 
 |  |  |           linkphone: this.from.phone, | 
 |  |  |           longitude: this.from.longitude, | 
 |  |  |           param: this.from.problemName, | 
 |  |  |           paramId: this.from.problemId, | 
 |  |  |           typeId: this.from.typeId | 
 |  |  |         }).then(function (res) { | 
 |  |  |           if (res.code === 200) { | 
 |  |  |             uni.showToast({ | 
 |  |  |               title: '上报成功', | 
 |  |  |               icon: 'success', | 
 |  |  |               duration: 2000 | 
 |  |  |             }); | 
 |  |  |             _this2.isEnd = true; | 
 |  |  |             setTimeout(function () { | 
 |  |  |               uni.navigateBack({ | 
 |  |  |                 delta: 1 | 
 |  |  |               }); | 
 |  |  |             }, 2000); | 
 |  |  |           } | 
 |  |  |         }); | 
 |  |  |       } | 
 |  |  |     }, | 
 |  |  |     // 拨打电话 | 
 |  |  |     calling: function calling(mobile) { | 
 |  |  | 
 |  |  |     }, | 
 |  |  |     // 获取首页信息 | 
 |  |  |     getHomeInfo: function getHomeInfo() { | 
 |  |  |       var _this2 = this; | 
 |  |  |       var _this3 = this; | 
 |  |  |       this.$u.api.home().then(function (res) { | 
 |  |  |         if (res.code === 200) { | 
 |  |  |           _this2.phone = res.data.serverPhone; | 
 |  |  |           _this3.phone = res.data.serverPhone; | 
 |  |  |         } | 
 |  |  |       }); | 
 |  |  |     }, | 
 |  |  | 
 |  |  |     }, | 
 |  |  |     // 上传 | 
 |  |  |     uploadImg: function uploadImg() { | 
 |  |  |       var _this3 = this; | 
 |  |  |       var _this4 = this; | 
 |  |  |       uni.chooseImage({ | 
 |  |  |         success: function success(res) { | 
 |  |  |           uni.showLoading({ | 
 |  |  | 
 |  |  |           }); | 
 |  |  |           res.tempFilePaths.forEach(function (item, index) { | 
 |  |  |             uni.uploadFile({ | 
 |  |  |               url: _this3.$baseUrl + 'public/uploadLocal', | 
 |  |  |               url: _this4.$baseUrl + 'public/uploadLocal', | 
 |  |  |               filePath: item, | 
 |  |  |               name: 'file', | 
 |  |  |               formData: { | 
 |  |  | 
 |  |  |               }, | 
 |  |  |               success: function success(res1) { | 
 |  |  |                 var data = JSON.parse(JSON.parse(JSON.stringify(res1)).data); | 
 |  |  |                 _this3.from.files.push(data.data); | 
 |  |  |                 _this4.from.files.push(data.data); | 
 |  |  |                 if (index + 1 === res.tempFilePaths.length) { | 
 |  |  |                   uni.hideLoading(); | 
 |  |  |                   uni.showToast({ | 
 |  |  | 
 |  |  |     }, | 
 |  |  |     // 获取车辆问题 | 
 |  |  |     getProblem: function getProblem() { | 
 |  |  |       var _this4 = this; | 
 |  |  |       var _this5 = this; | 
 |  |  |       this.$u.api.baseParamList({ | 
 |  |  |         type: 0 | 
 |  |  |       }).then(function (res) { | 
 |  |  | 
 |  |  |             item.active = false; | 
 |  |  |           }); | 
 |  |  |           console.log(res.data); | 
 |  |  |           _this4.problemList = res.data; | 
 |  |  |           _this5.problemList = res.data; | 
 |  |  |         } | 
 |  |  |       }); | 
 |  |  |     }, | 
 |  |  | 
 |  |  |     }, | 
 |  |  |     // 判断是否授权了位置信息 | 
 |  |  |     authVerification: function authVerification() { | 
 |  |  |       var _this5 = this; | 
 |  |  |       var _this6 = this; | 
 |  |  |       uni.getSetting({ | 
 |  |  |         success: function success(res) { | 
 |  |  |           if (res.authSetting['scope.userLocation']) { | 
 |  |  |             /* 用户授权成功时走这里 */ | 
 |  |  |             _this5.handerChooseLocation(); | 
 |  |  |             _this6.handerChooseLocation(); | 
 |  |  |           } else if (res.authSetting['scope.userLocation'] === undefined) { | 
 |  |  |             /* 用户未授权时走这里 */ | 
 |  |  |             _this5.handleOpenSetting(); | 
 |  |  |             _this6.handleOpenSetting(); | 
 |  |  |           } else { | 
 |  |  |             /* 用户拒绝了授权后走这里 */ | 
 |  |  |             _this5.handleOpenSetting(); | 
 |  |  |             _this6.handleOpenSetting(); | 
 |  |  |           } | 
 |  |  |         } | 
 |  |  |       }); | 
 |  |  |     }, | 
 |  |  |     // 选择位置 | 
 |  |  |     handerChooseLocation: function handerChooseLocation() { | 
 |  |  |       var _this6 = this; | 
 |  |  |       var _this7 = this; | 
 |  |  |       uni.chooseLocation({ | 
 |  |  |         latitude: this.latitude, | 
 |  |  |         longitude: this.longitude, | 
 |  |  |         success: function success(res) { | 
 |  |  |           _this6.from.address = res.address; | 
 |  |  |           _this6.from.latitude = res.latitude; | 
 |  |  |           _this6.from.longitude = res.longitude; | 
 |  |  |           _this7.from.address = res.address; | 
 |  |  |           _this7.from.latitude = res.latitude; | 
 |  |  |           _this7.from.longitude = res.longitude; | 
 |  |  |         }, | 
 |  |  |         fail: function fail(err) { | 
 |  |  |           console.log('取消按钮', err); | 
 |  |  | 
 |  |  |       }); | 
 |  |  |     }, | 
 |  |  |     handleOpenSetting: function handleOpenSetting() { | 
 |  |  |       var _this7 = this; | 
 |  |  |       var _this8 = this; | 
 |  |  |       wx.openSetting({ | 
 |  |  |         success: function success(res) { | 
 |  |  |           if (res.authSetting["scope.userLocation"]) { | 
 |  |  |             _this7.handerChooseLocation(); | 
 |  |  |             _this8.handerChooseLocation(); | 
 |  |  |           } | 
 |  |  |         } | 
 |  |  |       }); |