From f9691d544e62d6c04dbfe45d05a6c7bc5e004291 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 29 十二月 2023 11:52:29 +0800
Subject: [PATCH] 服务商

---
 bicycle/unpackage/dist/dev/mp-weixin/pages/problemReporting/problemReporting.js |  114 ++++++++++++++++++++++++++++++++-------------------------
 1 files changed, 64 insertions(+), 50 deletions(-)

diff --git a/bicycle/unpackage/dist/dev/mp-weixin/pages/problemReporting/problemReporting.js b/bicycle/unpackage/dist/dev/mp-weixin/pages/problemReporting/problemReporting.js
index 06622d0..552966b 100644
--- a/bicycle/unpackage/dist/dev/mp-weixin/pages/problemReporting/problemReporting.js
+++ b/bicycle/unpackage/dist/dev/mp-weixin/pages/problemReporting/problemReporting.js
@@ -103,7 +103,7 @@
 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) {
@@ -200,7 +200,8 @@
         phone: '',
         typeId: ''
       },
-      problemList: []
+      problemList: [],
+      isEnd: true
     };
   },
   computed: _objectSpread({}, (0, _vuex.mapState)(['userInfo'])),
@@ -227,43 +228,56 @@
     },
     // 鎻愪氦
     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 () {
+          return;
+        }
+        if (this.from.info.length < 10) {
+          uni.showToast({
+            title: '鏈�灏戝瓧鏁颁笉鑳戒綆浜�10涓瓧',
+            icon: 'none',
+            duration: 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(() => {
             uni.navigateBack({
               delta: 1
             });
-          }, 2000);
-        }
-      });
+            // }, 2000)
+          }
+        });
+      }
     },
     // 鎷ㄦ墦鐢佃瘽
     calling: function calling(mobile) {
@@ -275,10 +289,10 @@
     },
     // 鑾峰彇棣栭〉淇℃伅
     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;
         }
       });
     },
@@ -287,7 +301,7 @@
     },
     // 涓婁紶
     uploadImg: function uploadImg() {
-      var _this3 = this;
+      var _this4 = this;
       uni.chooseImage({
         success: function success(res) {
           uni.showLoading({
@@ -295,7 +309,7 @@
           });
           res.tempFilePaths.forEach(function (item, index) {
             uni.uploadFile({
-              url: _this3.$baseUrl + 'public/uploadLocal',
+              url: _this4.$baseUrl + 'public/uploadLocal',
               filePath: item,
               name: 'file',
               formData: {
@@ -303,7 +317,7 @@
               },
               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({
@@ -350,7 +364,7 @@
     },
     // 鑾峰彇杞﹁締闂
     getProblem: function getProblem() {
-      var _this4 = this;
+      var _this5 = this;
       this.$u.api.baseParamList({
         type: 0
       }).then(function (res) {
@@ -359,7 +373,7 @@
             item.active = false;
           });
           console.log(res.data);
-          _this4.problemList = res.data;
+          _this5.problemList = res.data;
         }
       });
     },
@@ -497,32 +511,32 @@
     },
     // 鍒ゆ柇鏄惁鎺堟潈浜嗕綅缃俊鎭�
     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);
@@ -530,11 +544,11 @@
       });
     },
     handleOpenSetting: function handleOpenSetting() {
-      var _this7 = this;
+      var _this8 = this;
       wx.openSetting({
         success: function success(res) {
           if (res.authSetting["scope.userLocation"]) {
-            _this7.handerChooseLocation();
+            _this8.handerChooseLocation();
           }
         }
       });

--
Gitblit v1.9.3