| | |
| | | <<<<<<< HEAD |
| | | (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{164:function(e,t,n){"use strict";(function(e,t){var r=n(4);n(30);r(n(25));var o=r(n(165));e.__webpack_require_UNI_MP_PLUGIN__=n,t(o.default)}).call(this,n(1)["default"],n(2)["createPage"])},165:function(e,t,n){"use strict";n.r(t);var r=n(166),o=n(168);for(var a in o)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(a);n(171);var i,c=n(41),u=Object(c["default"])(o["default"],r["render"],r["staticRenderFns"],!1,null,"57280228",null,!1,r["components"],i);u.options.__file="pages/index/index.vue",t["default"]=u.exports},166:function(e,t,n){"use strict";n.r(t);var r=n(167);n.d(t,"render",(function(){return r["render"]})),n.d(t,"staticRenderFns",(function(){return r["staticRenderFns"]})),n.d(t,"recyclableRender",(function(){return r["recyclableRender"]})),n.d(t,"components",(function(){return r["components"]}))},167:function(e,t,n){"use strict";var r;n.r(t),n.d(t,"render",(function(){return o})),n.d(t,"staticRenderFns",(function(){return i})),n.d(t,"recyclableRender",(function(){return a})),n.d(t,"components",(function(){return r}));try{r={uIcon:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-icon/u-icon")]).then(n.bind(null,367))},customTabbar:function(){return n.e("components/custom-tabbar/custom-tabbar").then(n.bind(null,376))}}}catch(c){if(-1===c.message.indexOf("Cannot find module")||-1===c.message.indexOf(".vue"))throw c;console.error(c.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var o=function(){var e=this,t=e.$createElement,n=(e._self._c,e.pointList.length);e.$mp.data=Object.assign({},{$root:{g0:n}})},a=!1,i=[];o._withStripped=!0},168:function(e,t,n){"use strict";n.r(t);var r=n(169),o=n.n(r);for(var a in r)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(a);t["default"]=o.a},169:function(e,t,n){"use strict";(function(e){var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(34)),a=r(n(36)),i=r(n(11)),c=n(37),u=r(n(38));function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(){n.e("components/custom-tabbar/custom-tabbar").then(function(){return resolve(n(376))}.bind(null,n)).catch(n.oe)},l={components:{CustomTabbar:f},computed:d(d({},(0,c.mapState)(["navHeight","statusbarHeight","address","latitude","cityId","longitude"])),{},{currentAddress:function(){return this.address&&"定位中"!==this.address?this.address:"获取定位"}}),data:function(){return{backgroundImage:n(170),bannerList:[],pointList:[],page:1,isRequest:!0}},onLoad:function(){var e=this;return(0,a.default)(o.default.mark((function t(){return o.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$onLaunched;case 2:return t.next=4,e.getBannerList();case 4:return t.next=6,e.getNearbyShopList();case 6:case"end":return t.stop()}}),t)})))()},onReachBottom:function(){this.getNearbyShopList()},methods:{jumpxiadan:function(){e.navigateTo({url:"/pages/luggage-storage/luggage-storage"})},getBannerList:function(){var e=this;return(0,a.default)(o.default.mark((function t(){var n;return o.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$u.api.getBannerList({position:0});case 2:n=t.sent,200===n.code&&(e.bannerList=n.data||[]);case 4:case"end":return t.stop()}}),t)})))()},getNearbyShopList:function(){var e=this;return(0,a.default)(o.default.mark((function t(){var n;return o.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.isRequest){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,e.$u.api.getNearbyShopList({capacity:10,page:e.page,model:{latitude:e.latitude,longitude:e.longitude,cityId:e.cityId,sortType:1}});case 4:n=t.sent,200===n.code&&(e.pointList=n.data.records||[],e.page++,n.data.total<=e.pointList.length&&(e.isRequest=!1));case 6:case"end":return t.stop()}}),t)})))()},jumpJC:function(){e.navigateTo({url:"/pages/storage-point/storage-point"})},handleLocation:function(){var t=this;e.openSetting({success:function(e){e.authSetting["scope.userLocation"]&&t.positioning()}})},positioning:function(){var t=this;e.getLocation({type:"gcj02",highAccuracyExpireTime:3e3,isHighAccuracy:!0,success:function(e){var n={latitude:e.latitude,longitude:e.longitude},r=new u.default.AMapWX({key:"f2e6c0bfcac14c27b4f0d6d0d5b9d7d"});r.getRegeo({location:e.longitude+","+e.latitude,success:function(){var e=(0,a.default)(o.default.mark((function e(r){var a,i,c;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return console.log(r,"==================获取地址"),a=r[0],n.province=a.province,n.city=a.city,n.area=a.district,n.street=a.street,i=a.name||"地址获取失败",n.address=i,e.next=10,t.$u.api.getCityByName({cityName:n.city});case 10:c=e.sent,200===c.code&&(n.cityId=c.data.id),t.$store.commit("setPosition",n),t.$isResolve();case 14:case"end":return e.stop()}}),e)})));function r(t){return e.apply(this,arguments)}return r}(),fail:function(e){t.$isResolve()}})}})},goStoragePage:function(){e.navigateTo({url:"/pages/storage-point/storage-point"})}}};t.default=l}).call(this,n(2)["default"])},171:function(e,t,n){"use strict";n.r(t);var r=n(172),o=n.n(r);for(var a in r)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(a);t["default"]=o.a},172:function(e,t,n){}},[[164,"common/runtime","common/vendor"]]]); |
| | | ======= |
| | | (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["pages/index/index"],{ |
| | | |
| | | /***/ 164: |
| | |
| | | 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 */ 334)) |
| | | 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 */ 295)) |
| | | 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 */ 295)); |
| | | 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' |
| | | }); |
| | |
| | | /***/ }) |
| | | |
| | | },[[164,"common/runtime","common/vendor"]]]); |
| | | >>>>>>> 50573d8f1149d7020c38afb695116cb2953a3d43 |
| | | //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map |