From 463b129b1011652af4d4261da4e2797e04198f2f Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 21 四月 2026 16:14:07 +0800
Subject: [PATCH] 调接口加页面

---
 small-program/unpackage/dist/dev/mp-weixin/pages/index/index.js |   95 +++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 91 insertions(+), 4 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 76b2cca..85999ce 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,7 +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 */ 297))
+      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))
+    },
+    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 */ 397))
     },
   }
 } catch (e) {
@@ -125,6 +128,15 @@
   var _vm = this
   var _h = _vm.$createElement
   var _c = _vm._self._c || _h
+  var g0 = _vm.pointList.length
+  _vm.$mp.data = Object.assign(
+    {},
+    {
+      $root: {
+        g0: g0,
+      },
+    }
+  )
 }
 var recyclableRender = false
 var staticRenderFns = []
@@ -169,9 +181,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);
+var _amapWx = _interopRequireDefault(__webpack_require__(/*! @/utils/amap-wx.130.js */ 38));
 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 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 */ 397));
+  }).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
+};
 var _default = {
+  components: {
+    CustomTabbar: CustomTabbar
+  },
   computed: _objectSpread(_objectSpread({}, (0, _vuex.mapState)(['navHeight', 'statusbarHeight', 'address', 'latitude', 'cityId', 'longitude'])), {}, {
     currentAddress: function currentAddress() {
       return this.address && this.address !== '瀹氫綅涓�' ? this.address : '鑾峰彇瀹氫綅';
@@ -291,9 +312,75 @@
       });
     },
     handleLocation: function handleLocation() {
-      uni.showToast({
-        title: '瀹氫綅鍔熻兘寰呮帴鍏�',
-        icon: 'none'
+      var that = this;
+      uni.openSetting({
+        success: function success(res) {
+          if (res.authSetting['scope.userLocation']) {
+            that.positioning();
+          }
+        }
+      });
+    },
+    // 瀹氫綅
+    positioning: function positioning() {
+      var that = this;
+      uni.getLocation({
+        type: 'gcj02',
+        highAccuracyExpireTime: 3000,
+        isHighAccuracy: true,
+        success: function success(addr) {
+          var locParam = {
+            latitude: addr.latitude,
+            longitude: addr.longitude
+          };
+          var myAmapFun = new _amapWx.default.AMapWX({
+            key: 'f2e6c0bfcac14c27b4f0d6d0d5b9d7d'
+          });
+          myAmapFun.getRegeo({
+            location: addr.longitude + ',' + addr.latitude,
+            success: function () {
+              var _success = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(data) {
+                var info, ta, resCity;
+                return _regenerator.default.wrap(function _callee4$(_context4) {
+                  while (1) {
+                    switch (_context4.prev = _context4.next) {
+                      case 0:
+                        console.log(data, '==================鑾峰彇鍦板潃');
+                        info = data[0];
+                        locParam.province = info.province;
+                        locParam.city = info.city;
+                        locParam.area = info.district;
+                        locParam.street = info.street;
+                        ta = info.name || '鍦板潃鑾峰彇澶辫触';
+                        locParam.address = ta;
+                        _context4.next = 10;
+                        return that.$u.api.getCityByName({
+                          cityName: locParam.city
+                        });
+                      case 10:
+                        resCity = _context4.sent;
+                        if (resCity.code === 200) {
+                          locParam.cityId = resCity.data.id;
+                        }
+                        that.$store.commit('setPosition', locParam);
+                        that.$isResolve();
+                      case 14:
+                      case "end":
+                        return _context4.stop();
+                    }
+                  }
+                }, _callee4);
+              }));
+              function success(_x) {
+                return _success.apply(this, arguments);
+              }
+              return success;
+            }(),
+            fail: function fail(err) {
+              that.$isResolve();
+            }
+          });
+        }
       });
     },
     goStoragePage: function goStoragePage() {

--
Gitblit v1.9.3