| | |
| | | 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) { |
| | |
| | | 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 = { |
| | |
| | | bannerList: [], |
| | | pointList: [], |
| | | page: 1, |
| | | ingOrder: null, |
| | | isRequest: true |
| | | }; |
| | | }, |
| | |
| | | _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(); |
| | | } |
| | |
| | | }, _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(); |
| | | } |
| | |
| | | }, _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; |
| | |
| | | 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(); |
| | | } |
| | |
| | | }, _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' |
| | | }); |
| | |
| | | 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); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | 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]; |
| | |
| | | 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; |
| | | } |
| | |
| | | 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; |
| | | }(), |
| | |
| | | }); |
| | | }, |
| | | goStoragePage: function goStoragePage() { |
| | | if (!this.cityId) return uni.showToast({ |
| | | title: '当前城市暂未开通', |
| | | icon: 'none' |
| | | }); |
| | | uni.navigateTo({ |
| | | url: '/pages/storage-point/storage-point' |
| | | }); |