From 7a4b8764b68e0dbaeb90e292a8a4bd47cb379e68 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期一, 27 四月 2026 17:26:02 +0800
Subject: [PATCH] 小程序端和PC端bug修复

---
 small-program/unpackage/dist/dev/mp-weixin/pages/index/index.js |  253 ++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 202 insertions(+), 51 deletions(-)

diff --git a/small-program/unpackage/dist/dev/mp-weixin/pages/index/index.js b/small-program/unpackage/dist/dev/mp-weixin/pages/index/index.js
index 611f4e9..aa7ffa9 100644
--- a/small-program/unpackage/dist/dev/mp-weixin/pages/index/index.js
+++ b/small-program/unpackage/dist/dev/mp-weixin/pages/index/index.js
@@ -101,10 +101,10 @@
 try {
   components = {
     uIcon: function () {
-      return Promise.all(/*! import() | node-modules/uview-ui/components/u-icon/u-icon */[__webpack_require__.e("common/vendor"), __webpack_require__.e("node-modules/uview-ui/components/u-icon/u-icon")]).then(__webpack_require__.bind(null, /*! uview-ui/components/u-icon/u-icon.vue */ 388))
+      return Promise.all(/*! import() | node-modules/uview-ui/components/u-icon/u-icon */[__webpack_require__.e("common/vendor"), __webpack_require__.e("node-modules/uview-ui/components/u-icon/u-icon")]).then(__webpack_require__.bind(null, /*! uview-ui/components/u-icon/u-icon.vue */ 475))
     },
     customTabbar: function () {
-      return __webpack_require__.e(/*! import() | components/custom-tabbar/custom-tabbar */ "components/custom-tabbar/custom-tabbar").then(__webpack_require__.bind(null, /*! @/components/custom-tabbar/custom-tabbar.vue */ 404))
+      return __webpack_require__.e(/*! import() | components/custom-tabbar/custom-tabbar */ "components/custom-tabbar/custom-tabbar").then(__webpack_require__.bind(null, /*! @/components/custom-tabbar/custom-tabbar.vue */ 187))
     },
   }
 } catch (e) {
@@ -186,7 +186,7 @@
 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
 var CustomTabbar = function CustomTabbar() {
   __webpack_require__.e(/*! require.ensure | components/custom-tabbar/custom-tabbar */ "components/custom-tabbar/custom-tabbar").then((function () {
-    return resolve(__webpack_require__(/*! @/components/custom-tabbar/custom-tabbar.vue */ 404));
+    return resolve(__webpack_require__(/*! @/components/custom-tabbar/custom-tabbar.vue */ 187));
   }).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
 };
 var _default = {
@@ -204,6 +204,7 @@
       bannerList: [],
       pointList: [],
       page: 1,
+      ingOrder: null,
       isRequest: true
     };
   },
@@ -220,9 +221,13 @@
               _context.next = 4;
               return _this.getBannerList();
             case 4:
-              _context.next = 6;
+              if (!(_this.cityId && _this.latitude && _this.longitude)) {
+                _context.next = 7;
+                break;
+              }
+              _context.next = 7;
               return _this.getNearbyShopList();
-            case 6:
+            case 7:
             case "end":
               return _context.stop();
           }
@@ -230,33 +235,38 @@
       }, _callee);
     }))();
   },
+  onShow: function onShow() {
+    this.ingOrder = null;
+    this.getIngorder();
+  },
   onReachBottom: function onReachBottom() {
-    this.getNearbyShopList();
+    if (this.cityId && this.latitude && this.longitude) {
+      this.getNearbyShopList();
+    }
   },
   methods: {
-    jumpxiadan: function jumpxiadan() {
+    jumpOrderDetail: function jumpOrderDetail(id) {
       uni.navigateTo({
-        url: '/pages/luggage-storage/luggage-storage'
+        url: '/pages/delivery-order-detail/delivery-order-detail?userType=0&id=' + id
       });
     },
-    getBannerList: function getBannerList() {
+    getIngorder: function getIngorder() {
       var _this2 = this;
       return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
-        var res;
+        var that, res;
         return _regenerator.default.wrap(function _callee2$(_context2) {
           while (1) {
             switch (_context2.prev = _context2.next) {
               case 0:
-                _context2.next = 2;
-                return _this2.$u.api.getBannerList({
-                  position: 0
-                });
-              case 2:
+                that = _this2;
+                _context2.next = 3;
+                return that.$u.api.getActiveOrderTip();
+              case 3:
                 res = _context2.sent;
-                if (res.code === 200) {
-                  _this2.bannerList = res.data || [];
+                if (res && res.code === 200) {
+                  _this2.ingOrder = res.data;
                 }
-              case 4:
+              case 5:
               case "end":
                 return _context2.stop();
             }
@@ -264,7 +274,22 @@
         }, _callee2);
       }))();
     },
-    getNearbyShopList: function getNearbyShopList() {
+    jumpOrderList: function jumpOrderList(status) {
+      uni.setStorageSync("orderStatus", status);
+      uni.switchTab({
+        url: '/pages/itinerary/itinerary'
+      });
+    },
+    jumpxiadan: function jumpxiadan() {
+      if (!this.cityId) return uni.showToast({
+        title: '褰撳墠鍩庡競鏆傛湭寮�閫�',
+        icon: 'none'
+      });
+      uni.navigateTo({
+        url: '/pages/luggage-storage/luggage-storage'
+      });
+    },
+    getBannerList: function getBannerList() {
       var _this3 = this;
       return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
         var res;
@@ -272,33 +297,16 @@
           while (1) {
             switch (_context3.prev = _context3.next) {
               case 0:
-                if (_this3.isRequest) {
-                  _context3.next = 2;
-                  break;
-                }
-                return _context3.abrupt("return");
-              case 2:
-                _context3.next = 4;
-                return _this3.$u.api.getNearbyShopList({
-                  capacity: 10,
-                  page: _this3.page,
-                  model: {
-                    latitude: _this3.latitude,
-                    longitude: _this3.longitude,
-                    cityId: _this3.cityId,
-                    sortType: 1
-                  }
+                _context3.next = 2;
+                return _this3.$u.api.getBannerList({
+                  position: 0
                 });
-              case 4:
+              case 2:
                 res = _context3.sent;
                 if (res.code === 200) {
-                  _this3.pointList = res.data.records || [];
-                  _this3.page++;
-                  if (res.data.total <= _this3.pointList.length) {
-                    _this3.isRequest = false;
-                  }
+                  _this3.bannerList = res.data || [];
                 }
-              case 6:
+              case 4:
               case "end":
                 return _context3.stop();
             }
@@ -306,7 +314,53 @@
         }, _callee3);
       }))();
     },
+    getNearbyShopList: function getNearbyShopList() {
+      var _this4 = this;
+      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
+        var res;
+        return _regenerator.default.wrap(function _callee4$(_context4) {
+          while (1) {
+            switch (_context4.prev = _context4.next) {
+              case 0:
+                if (_this4.isRequest) {
+                  _context4.next = 2;
+                  break;
+                }
+                return _context4.abrupt("return");
+              case 2:
+                _context4.next = 4;
+                return _this4.$u.api.getNearbyShopList({
+                  capacity: 10,
+                  page: _this4.page,
+                  model: {
+                    latitude: _this4.latitude,
+                    longitude: _this4.longitude,
+                    cityId: _this4.cityId,
+                    sortType: 1
+                  }
+                });
+              case 4:
+                res = _context4.sent;
+                if (res.code === 200) {
+                  _this4.pointList = res.data.records || [];
+                  _this4.page++;
+                  if (res.data.total <= _this4.pointList.length) {
+                    _this4.isRequest = false;
+                  }
+                }
+              case 6:
+              case "end":
+                return _context4.stop();
+            }
+          }
+        }, _callee4);
+      }))();
+    },
     jumpJC: function jumpJC() {
+      if (!this.cityId) return uni.showToast({
+        title: '褰撳墠鍩庡競鏆傛湭寮�閫�',
+        icon: 'none'
+      });
       uni.navigateTo({
         url: '/pages/storage-point/storage-point'
       });
@@ -318,6 +372,99 @@
           if (res.authSetting['scope.userLocation']) {
             that.positioning();
           }
+        }
+      });
+    },
+    chooseLocation: function chooseLocation() {
+      var that = this;
+      uni.chooseLocation({
+        type: 'gcj02',
+        success: function () {
+          var _success = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(addr) {
+            var locParam, myAmapFun;
+            return _regenerator.default.wrap(function _callee6$(_context6) {
+              while (1) {
+                switch (_context6.prev = _context6.next) {
+                  case 0:
+                    if (addr.errMsg === 'chooseLocation:ok' && addr.latitude) {
+                      locParam = {
+                        latitude: addr.latitude,
+                        longitude: addr.longitude
+                      }; // uni.setStorageSync('address', locParam);
+                      myAmapFun = new _amapWx.default.AMapWX({
+                        key: 'e4d46c87adf151dca20060317592b1b6'
+                      });
+                      myAmapFun.getRegeo({
+                        location: addr.longitude + ',' + addr.latitude,
+                        success: function () {
+                          var _success2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(data) {
+                            var info, ta, resCity;
+                            return _regenerator.default.wrap(function _callee5$(_context5) {
+                              while (1) {
+                                switch (_context5.prev = _context5.next) {
+                                  case 0:
+                                    console.log(data, '==================閫夋嫨鍦板潃閫嗚В鏋�');
+                                    info = data[0];
+                                    locParam.province = info.province;
+                                    locParam.city = info.regeocodeData.addressComponent.city && typeof info.regeocodeData.addressComponent.city === 'string' ? info.regeocodeData.addressComponent.city : info.regeocodeData.addressComponent.province;
+                                    ta = info.name || '鍦板潃鑾峰彇澶辫触';
+                                    locParam.address = ta;
+                                    _context5.next = 8;
+                                    return that.$u.api.getCityByName({
+                                      cityName: locParam.city
+                                    });
+                                  case 8:
+                                    resCity = _context5.sent;
+                                    if (resCity.code === 200 && resCity.data) {
+                                      locParam.cityId = resCity.data.id;
+                                      that.$store.commit('setPosition', locParam);
+                                      that.page = 1;
+                                      that.pointList = [];
+                                      that.isRequest = true;
+                                      that.getNearbyShopList();
+                                    } else {
+                                      that.$store.commit('setPosition', locParam);
+                                      that.$store.commit('clearCityId');
+                                      that.page = 1;
+                                      that.pointList = [];
+                                      that.isRequest = true;
+                                    }
+                                  case 10:
+                                  case "end":
+                                    return _context5.stop();
+                                }
+                              }
+                            }, _callee5);
+                          }));
+                          function success(_x2) {
+                            return _success2.apply(this, arguments);
+                          }
+                          return success;
+                        }(),
+                        fail: function fail(err) {
+                          console.error('鑾峰彇浣嶇疆澶辫触===========', err);
+                          that.$store.commit('setPosition', locParam);
+                          that.page = 1;
+                          that.pointList = [];
+                          that.isRequest = true;
+                          // that.getNearbyShopList()
+                        }
+                      });
+                    }
+                  case 1:
+                  case "end":
+                    return _context6.stop();
+                }
+              }
+            }, _callee6);
+          }));
+          function success(_x) {
+            return _success.apply(this, arguments);
+          }
+          return success;
+        }(),
+        fail: function fail(err) {
+          console.error('閫夋嫨浣嶇疆澶辫触===========', err);
         }
       });
     },
@@ -339,11 +486,11 @@
           myAmapFun.getRegeo({
             location: addr.longitude + ',' + addr.latitude,
             success: function () {
-              var _success = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(data) {
+              var _success3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(data) {
                 var info, ta, resCity;
-                return _regenerator.default.wrap(function _callee4$(_context4) {
+                return _regenerator.default.wrap(function _callee7$(_context7) {
                   while (1) {
-                    switch (_context4.prev = _context4.next) {
+                    switch (_context7.prev = _context7.next) {
                       case 0:
                         console.log(data, '==================鑾峰彇鍦板潃');
                         info = data[0];
@@ -353,12 +500,12 @@
                         locParam.street = info.street;
                         ta = info.name || '鍦板潃鑾峰彇澶辫触';
                         locParam.address = ta;
-                        _context4.next = 10;
+                        _context7.next = 10;
                         return that.$u.api.getCityByName({
                           cityName: locParam.city
                         });
                       case 10:
-                        resCity = _context4.sent;
+                        resCity = _context7.sent;
                         if (resCity.code === 200) {
                           locParam.cityId = resCity.data.id;
                         }
@@ -366,13 +513,13 @@
                         that.$isResolve();
                       case 14:
                       case "end":
-                        return _context4.stop();
+                        return _context7.stop();
                     }
                   }
-                }, _callee4);
+                }, _callee7);
               }));
-              function success(_x) {
-                return _success.apply(this, arguments);
+              function success(_x3) {
+                return _success3.apply(this, arguments);
               }
               return success;
             }(),
@@ -384,6 +531,10 @@
       });
     },
     goStoragePage: function goStoragePage() {
+      if (!this.cityId) return uni.showToast({
+        title: '褰撳墠鍩庡競鏆傛湭寮�閫�',
+        icon: 'none'
+      });
       uni.navigateTo({
         url: '/pages/storage-point/storage-point'
       });

--
Gitblit v1.9.3