From f39ca3c49d26abd10f76fc67506b9c603a13547c Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 17 四月 2026 20:20:30 +0800
Subject: [PATCH] 调接口加页面

---
 small-program/unpackage/dist/dev/mp-weixin/pages/storage-point/storage-point.js |  419 ++++++++++++++++++++++++++---------------------------------
 1 files changed, 184 insertions(+), 235 deletions(-)

diff --git a/small-program/unpackage/dist/dev/mp-weixin/pages/storage-point/storage-point.js b/small-program/unpackage/dist/dev/mp-weixin/pages/storage-point/storage-point.js
index 8379c8d..b5c01e7 100644
--- a/small-program/unpackage/dist/dev/mp-weixin/pages/storage-point/storage-point.js
+++ b/small-program/unpackage/dist/dev/mp-weixin/pages/storage-point/storage-point.js
@@ -34,7 +34,7 @@
 /* harmony import */ var _storage_point_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./storage-point.vue?vue&type=script&lang=js& */ 199);
 /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _storage_point_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _storage_point_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony import */ var _storage_point_vue_vue_type_style_index_0_id_6bbaaa78_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./storage-point.vue?vue&type=style&index=0&id=6bbaaa78&lang=scss&scoped=true& */ 201);
-/* harmony import */ var _HBuilderX_3_8_12_20230817_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../鍔炲叕/HBuilderX.3.8.12.20230817/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 38);
+/* harmony import */ var _HBuilderX_3_8_12_20230817_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../鍔炲叕/HBuilderX.3.8.12.20230817/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 41);
 
 var renderjs
 
@@ -101,7 +101,7 @@
 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 */ 233))
+      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 */ 297))
     },
   }
 } catch (e) {
@@ -160,272 +160,93 @@
 "use strict";
 /* WEBPACK VAR INJECTION */(function(uni) {
 
+var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
 Object.defineProperty(exports, "__esModule", {
   value: true
 });
 exports.default = void 0;
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
+var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 34));
+var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
+var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 36));
+var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
+var _vuex = __webpack_require__(/*! vuex */ 37);
+function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
+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 _default = {
   data: function data() {
     return {
       keyword: '',
+      page: 1,
       isMapMode: false,
       activeStore: null,
       currentDropdown: '',
       selectedFilters: {
-        sort: 'all',
-        range: 'all',
-        hours: 'all'
+        sortType: '',
+        distance: '',
+        businessType: ''
       },
       mapCenter: {
         latitude: 31.86119,
         longitude: 117.28565
       },
       filters: [{
-        key: 'sort',
+        key: 'sortType',
         label: '缁煎悎鎺掑簭'
       }, {
-        key: 'range',
+        key: 'distance',
         label: '浣嶇疆鑼冨洿'
       }, {
-        key: 'hours',
+        key: 'businessType',
         label: '钀ヤ笟鏃堕棿'
       }],
       dropdownOptions: {
-        sort: [{
+        sortType: [{
           label: '缁煎悎鎺掑簭',
-          value: 'all'
-        }, {
-          label: '璺濈鏈�杩�',
-          value: 'nearest'
+          value: ''
         }, {
           label: '璇勫垎浼樺厛',
-          value: 'score'
+          value: '2'
         }],
-        range: [{
+        distance: [{
           label: '浣嶇疆鑼冨洿',
-          value: 'all'
+          value: ''
         }, {
-          label: '1km鍐�',
-          value: '1km'
+          label: '500m',
+          value: '500'
         }, {
-          label: '3km鍐�',
-          value: '3km'
+          label: '1km',
+          value: '1000'
         }, {
-          label: '5km鍐�',
-          value: '5km'
+          label: '2km',
+          value: '2000'
+        }, {
+          label: '3km',
+          value: '3000'
+        }, {
+          label: '5km',
+          value: '5000'
         }],
-        hours: [{
+        businessType: [{
           label: '钀ヤ笟鏃堕棿',
-          value: 'all'
+          value: ''
         }, {
-          label: '钀ヤ笟涓�',
-          value: 'open'
+          label: '鍏ㄥぉ钀ヤ笟',
+          value: '1'
         }, {
-          label: '24灏忔椂钀ヤ笟',
-          value: '24h'
+          label: '闄愭椂钀ヤ笟',
+          value: '0'
         }]
       },
-      pointList: [{
-        name: '涓搧蹇繍鍗楃珯鏃楄埌搴�',
-        address: '鍚堣偉鍗楃珯璐熶竴灞�100鍙�',
-        time: '鍛ㄤ竴鑷冲懆鏃� 7:00~23:00',
-        distance: '239m',
-        cover: '/static/icon/nav_wode_sel@2x.png',
-        latitude: 31.80054,
-        longitude: 117.28391,
-        thumbClass: 'thumb-amber'
-      }, {
-        name: '涓搧蹇繍鍚堣偉鐏溅绔�',
-        address: '鍚堣偉鐏溅绔欎竴灞�12鍙�',
-        time: '鍛ㄤ竴鑷冲懆鏃� 7:00~23:00',
-        distance: '12.8km',
-        cover: '/static/icon/nav_wode_sel@2x.png',
-        latitude: 31.87673,
-        longitude: 117.31584,
-        thumbClass: 'thumb-sky'
-      }, {
-        name: '鍚堣偉鐏溅绔欏寳骞垮満',
-        address: '鍚堣偉鐏溅绔欎竴灞�12鍙�',
-        time: '鍛ㄤ竴鑷冲懆鏃� 7:00~23:00',
-        distance: '13.1km',
-        cover: '/static/icon/nav_wode_sel@2x.png',
-        latitude: 31.87802,
-        longitude: 117.31695,
-        thumbClass: 'thumb-stone'
-      }, {
-        name: '灏忛搧鏃犲咖瀛�',
-        address: '鍚堣偉鐏溅绔欎竴灞�12鍙�',
-        time: '鍛ㄤ竴鑷冲懆鏃� 7:00~23:00',
-        distance: '16.3km',
-        cover: '/static/icon/nav_wode_sel@2x.png',
-        latitude: 31.88418,
-        longitude: 117.33086,
-        thumbClass: 'thumb-orange'
-      }, {
-        name: '鍚堣偉鐏溅绔欏寳骞垮満',
-        address: '鍚堣偉鐏溅绔欎竴灞�12鍙�',
-        time: '鍛ㄤ竴鑷冲懆鏃� 7:00~23:00',
-        distance: '21.9km',
-        cover: '/static/icon/nav_wode_sel@2x.png',
-        latitude: 31.85562,
-        longitude: 117.29231,
-        thumbClass: 'thumb-silver'
-      }, {
-        name: '鍚堣偉鐏溅绔欏寳骞垮満',
-        address: '鍚堣偉鐏溅绔欎竴灞�12鍙�',
-        time: '鍛ㄤ竴鑷冲懆鏃� 7:00~23:00',
-        distance: '24.9km',
-        cover: '/static/icon/nav_wode_sel@2x.png',
-        latitude: 31.84638,
-        longitude: 117.34752,
-        thumbClass: 'thumb-amber'
-      }]
+      pointList: [],
+      isRequest: true
     };
   },
-  computed: {
+  computed: _objectSpread(_objectSpread({}, (0, _vuex.mapState)(['latitude', 'longitude', 'cityId'])), {}, {
     filterLabels: function filterLabels() {
       return {
-        sort: this.getFilterLabel('sort'),
-        range: this.getFilterLabel('range'),
-        hours: this.getFilterLabel('hours')
+        sortType: this.getFilterLabel('sortType'),
+        distance: this.getFilterLabel('distance'),
+        businessType: this.getFilterLabel('businessType')
       };
     },
     currentOptions: function currentOptions() {
@@ -437,9 +258,9 @@
           id: index,
           latitude: item.latitude,
           longitude: item.longitude,
-          width: 28,
-          height: 36,
-          iconPath: '/static/icon/home_ic_location@2x.png',
+          width: 0,
+          height: 0,
+          iconPath: '/static/icon/home1_ic_location@2x.png',
           anchor: {
             x: 0.5,
             y: 1
@@ -457,13 +278,115 @@
         };
       });
     }
+  }),
+  watch: {
+    filterLabels: {
+      handler: function handler(newVal, oldVal) {
+        this.handleSearch();
+      }
+    }
+  },
+  onLoad: function onLoad() {
+    var _this = this;
+    return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
+      return _regenerator.default.wrap(function _callee$(_context) {
+        while (1) {
+          switch (_context.prev = _context.next) {
+            case 0:
+              _context.next = 2;
+              return _this.$onLaunched;
+            case 2:
+              _this.getNearbyShopList();
+            case 3:
+            case "end":
+              return _context.stop();
+          }
+        }
+      }, _callee);
+    }))();
+  },
+  onReachBottom: function onReachBottom() {
+    this.getNearbyShopList();
   },
   methods: {
+    handleSearch: function handleSearch() {
+      this.page = 1;
+      this.pointList = [];
+      this.isRequest = true;
+      this.getNearbyShopList();
+    },
+    handleFilterChange: function handleFilterChange(key, value) {
+      this.selectedFilters[key] = value;
+      this.page = 1;
+      this.pointList = [];
+      this.getNearbyShopList();
+    },
+    getNearbyShopList: function getNearbyShopList() {
+      var _this2 = this;
+      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
+        var res, arr;
+        return _regenerator.default.wrap(function _callee2$(_context2) {
+          while (1) {
+            switch (_context2.prev = _context2.next) {
+              case 0:
+                if (_this2.isRequest) {
+                  _context2.next = 2;
+                  break;
+                }
+                return _context2.abrupt("return");
+              case 2:
+                _context2.next = 4;
+                return _this2.$u.api.getNearbyShopList({
+                  capacity: 10,
+                  page: _this2.page,
+                  model: {
+                    latitude: _this2.latitude,
+                    longitude: _this2.longitude,
+                    distance: _this2.selectedFilters.distance || '',
+                    name: _this2.keyword,
+                    cityId: _this2.cityId,
+                    sortType: _this2.selectedFilters.sortType || 1,
+                    businessType: _this2.selectedFilters.businessType || ''
+                  }
+                });
+              case 4:
+                res = _context2.sent;
+                if (res.code === 200) {
+                  arr = [];
+                  res.data.records.forEach(function (item) {
+                    var obj = {
+                      shopId: item.id,
+                      name: item.name,
+                      address: item.address,
+                      time: item.shopHours,
+                      distance: item.distanceText,
+                      cover: item.coverImg,
+                      latitude: item.latitude,
+                      longitude: item.longitude,
+                      depositTypes: item.depositTypes,
+                      feeStandard: item.feeStandard
+                    };
+                    arr.push(obj);
+                  });
+                  _this2.pointList = [].concat((0, _toConsumableArray2.default)(_this2.pointList), arr);
+                  _this2.page++;
+                  if (res.data.total <= _this2.pointList.length) {
+                    _this2.isRequest = false;
+                  }
+                }
+              case 6:
+              case "end":
+                return _context2.stop();
+            }
+          }
+        }, _callee2);
+      }))();
+    },
     getFilterLabel: function getFilterLabel(key) {
-      var _this = this;
+      var _this3 = this;
       var options = this.dropdownOptions[key] || [];
       var current = options.find(function (item) {
-        return item.value === _this.selectedFilters[key];
+        return item.value === _this3.selectedFilters[key];
       });
       return current ? current.label : (this.filters.find(function (item) {
         return item.key === key;
@@ -494,6 +417,7 @@
       }
     },
     handleMarkerTap: function handleMarkerTap(event) {
+      var _this4 = this;
       var markerId = typeof event.detail.markerId !== 'undefined' ? event.detail.markerId : event.detail.id;
       var current = this.pointList[markerId];
       if (!current) {
@@ -503,13 +427,38 @@
         latitude: current.latitude,
         longitude: current.longitude
       };
-      this.activeStore = current;
+      console.log('current', current);
+      this.$u.api.getShopDetail({
+        id: current.shopId,
+        latitude: this.latitude,
+        longitude: this.longitude
+      }).then(function (res) {
+        if (res.code === 200) {
+          _this4.activeStore = res.data;
+        }
+      });
     },
     resetMapCenter: function resetMapCenter() {
-      this.mapCenter = {
-        latitude: 31.86119,
-        longitude: 117.28565
-      };
+      var that = this;
+      uni.getLocation({
+        type: 'wgs84',
+        success: function success(res) {
+          that.mapCenter = {
+            latitude: res.latitude,
+            longitude: res.longitude
+          };
+        }
+      });
+    },
+    openNavigation: function openNavigation() {
+      uni.openLocation({
+        latitude: this.activeStore.latitude,
+        longitude: this.activeStore.longitude,
+        name: this.activeStore.name,
+        address: this.activeStore.address,
+        scale: 18,
+        infoUrl: ''
+      });
     },
     contactStore: function contactStore() {
       uni.showToast({

--
Gitblit v1.9.3