| | |
| | | (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/itinerary/itinerary"],{181:function(t,e,a){"use strict";(function(t,e){var n=a(4);a(30);n(a(25));var r=n(a(182));t.__webpack_require_UNI_MP_PLUGIN__=a,e(r.default)}).call(this,a(1)["default"],a(2)["createPage"])},182:function(t,e,a){"use strict";a.r(e);var n=a(183),r=a(185);for(var o in r)["default"].indexOf(o)<0&&function(t){a.d(e,t,(function(){return r[t]}))}(o);a(187);var i,u=a(41),c=Object(u["default"])(r["default"],n["render"],n["staticRenderFns"],!1,null,"3d3e0a9e",null,!1,n["components"],i);c.options.__file="pages/itinerary/itinerary.vue",e["default"]=c.exports},183:function(t,e,a){"use strict";a.r(e);var n=a(184);a.d(e,"render",(function(){return n["render"]})),a.d(e,"staticRenderFns",(function(){return n["staticRenderFns"]})),a.d(e,"recyclableRender",(function(){return n["recyclableRender"]})),a.d(e,"components",(function(){return n["components"]}))},184:function(t,e,a){"use strict";var n;a.r(e),a.d(e,"render",(function(){return r})),a.d(e,"staticRenderFns",(function(){return i})),a.d(e,"recyclableRender",(function(){return o})),a.d(e,"components",(function(){return n}));try{n={customTabbar:function(){return a.e("components/custom-tabbar/custom-tabbar").then(a.bind(null,376))}}}catch(u){if(-1===u.message.indexOf("Cannot find module")||-1===u.message.indexOf(".vue"))throw u;console.error(u.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var r=function(){var t=this,e=t.$createElement,a=(t._self._c,t.__map(t.dataList,(function(e,a){var n=t.__get_orig(e),r=e.detailList?t.__map(e.detailList,(function(e,a){var n=t.__get_orig(e),r=((e.subtotal||0)/100).toFixed(2);return{$orig:n,g0:r}})):null,o=((e.estimatedAmount||0)/100).toFixed(2),i=((e.declaredFee||0)/100).toFixed(2);return{$orig:n,l0:r,g1:o,g2:i}}))),n=t.isLoadingMore?null:!t.hasNext&&t.dataList.length;t._isMounted||(t.e0=function(e,a){var n=arguments[arguments.length-1].currentTarget.dataset,r=n.eventParams||n["event-params"];a=r.item;t.activeTab=a.value}),t.$mp.data=Object.assign({},{$root:{l1:a,g3:n}})},o=!1,i=[];r._withStripped=!0},185:function(t,e,a){"use strict";a.r(e);var n=a(186),r=a.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(o);e["default"]=r.a},186:function(t,e,a){"use strict";(function(t){var n=a(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(a(34)),o=n(a(18)),i=n(a(36)),u=n(a(11)),c=a(37);function s(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function l(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?s(Object(a),!0).forEach((function(e){(0,u.default)(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):s(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}var d=function(){a.e("components/custom-tabbar/custom-tabbar").then(function(){return resolve(a(376))}.bind(null,a)).catch(a.oe)},f={components:{CustomTabbar:d},computed:l({},(0,c.mapState)(["navHeight","statusbarHeight"])),data:function(){return{activeTab:-1,pageSize:10,currentPage:1,total:0,hasNext:!0,userType:0,isLoadingMore:!1,filterTabs:[{label:"全部",value:-1},{label:"待支付",value:0},{label:"待核验",value:1},{label:"待配送",value:2},{label:"待收货",value:3},{label:"已完成",value:4},{label:"已退款",value:5}],dataList:[]}},watch:{activeTab:function(){this.getFirstPageData()}},onLoad:function(e){console.log(e),this.activeTab=-1,e.status&&(this.activeTab=Number(e.status)),this.getFirstPageData();var a=this;t.$on("updateOrder",(function(t){console.log("监听到事件来自 update ,携带参数 msg 为:",t),1==t.delete?a.getFirstPageData():null!=t.info&&null!=t.info.orderId&&(console.log("监听到事件来自 update 01:",t),a.dataList.forEach((function(e,a){e.id==t.info.orderId&&(console.log("监听到事件来自 update 02:",t),e.status=t.info.orderStatus)})))}))},onShow:function(){this.loading=!1,this.currentOrder=null},onReachBottom:function(){this.getDataList()},methods:{getFirstPageData:function(){this.currentPage=0,this.hasNext=!0,this.total=0,this.dataList=[],this.getDataList()},getDataList:function(){var t=this;return(0,i.default)(r.default.mark((function e(){var a,n,i;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!t.loading&&t.hasNext){e.next=2;break}return e.abrupt("return");case 2:return t.loading=!0,t.currentPage=t.currentPage+1,1==t.currentPage&&(t.hasNext=!0,t.dataList=[]),a=t,n={},e.next=9,a.$u.api.myOrderPage({capacity:10,model:{combinedStatus:-1==t.activeTab?"":t.activeTab},page:t.currentPage});case 9:n=e.sent,console.log(n),200===n.code&&n.data&&n.data.page===t.currentPage&&(n.data.records=n.data.records||[],(i=a.dataList).push.apply(i,(0,o.default)(n.data.records)),a.total=n.data.total,t.currentPage>=n.data.pageCount?a.hasNext=!1:a.hasNext=!0),t.loading=!1;case 13:case"end":return e.stop()}}),e)})))()},jumpOrderDetail:function(e){t.navigateTo({url:"/pages/details-entry/details-entry?userType="+this.userType+"&id="+e})}}};e.default=f}).call(this,a(2)["default"])},187:function(t,e,a){"use strict";a.r(e);var n=a(188),r=a.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(o);e["default"]=r.a},188:function(t,e,a){}},[[181,"common/runtime","common/vendor"]]]); |
| | | (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/itinerary/itinerary"],{181:function(t,e,a){"use strict";(function(t,e){var n=a(4);a(30);n(a(25));var r=n(a(182));t.__webpack_require_UNI_MP_PLUGIN__=a,e(r.default)}).call(this,a(1)["default"],a(2)["createPage"])},182:function(t,e,a){"use strict";a.r(e);var n=a(183),r=a(185);for(var o in r)["default"].indexOf(o)<0&&function(t){a.d(e,t,(function(){return r[t]}))}(o);a(187);var i,u=a(41),c=Object(u["default"])(r["default"],n["render"],n["staticRenderFns"],!1,null,"3d3e0a9e",null,!1,n["components"],i);c.options.__file="pages/itinerary/itinerary.vue",e["default"]=c.exports},183:function(t,e,a){"use strict";a.r(e);var n=a(184);a.d(e,"render",(function(){return n["render"]})),a.d(e,"staticRenderFns",(function(){return n["staticRenderFns"]})),a.d(e,"recyclableRender",(function(){return n["recyclableRender"]})),a.d(e,"components",(function(){return n["components"]}))},184:function(t,e,a){"use strict";var n;a.r(e),a.d(e,"render",(function(){return r})),a.d(e,"staticRenderFns",(function(){return i})),a.d(e,"recyclableRender",(function(){return o})),a.d(e,"components",(function(){return n}));try{n={customTabbar:function(){return a.e("components/custom-tabbar/custom-tabbar").then(a.bind(null,405))}}}catch(u){if(-1===u.message.indexOf("Cannot find module")||-1===u.message.indexOf(".vue"))throw u;console.error(u.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var r=function(){var t=this,e=t.$createElement,a=(t._self._c,t.__map(t.dataList,(function(e,a){var n=t.__get_orig(e),r=e.detailList?t.__map(e.detailList,(function(e,a){var n=t.__get_orig(e),r=((e.subtotal||0)/100).toFixed(2);return{$orig:n,g0:r}})):null,o=((e.estimatedAmount||0)/100).toFixed(2),i=((e.declaredFee||0)/100).toFixed(2);return{$orig:n,l0:r,g1:o,g2:i}}))),n=t.isLoadingMore?null:!t.hasNext&&t.dataList.length;t._isMounted||(t.e0=function(e,a){var n=arguments[arguments.length-1].currentTarget.dataset,r=n.eventParams||n["event-params"];a=r.item;t.activeTab=a.value}),t.$mp.data=Object.assign({},{$root:{l1:a,g3:n}})},o=!1,i=[];r._withStripped=!0},185:function(t,e,a){"use strict";a.r(e);var n=a(186),r=a.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(o);e["default"]=r.a},186:function(t,e,a){"use strict";(function(t){var n=a(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(a(34)),o=n(a(18)),i=n(a(36)),u=n(a(11)),c=a(37);function s(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function l(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?s(Object(a),!0).forEach((function(e){(0,u.default)(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):s(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}var d=function(){a.e("components/custom-tabbar/custom-tabbar").then(function(){return resolve(a(405))}.bind(null,a)).catch(a.oe)},f={components:{CustomTabbar:d},computed:l({},(0,c.mapState)(["navHeight","statusbarHeight"])),data:function(){return{activeTab:-1,pageSize:10,currentPage:1,total:0,hasNext:!0,userType:0,isLoadingMore:!1,filterTabs:[{label:"全部",value:-1},{label:"待支付",value:0},{label:"待核验",value:1},{label:"待配送",value:2},{label:"待收货",value:3},{label:"已完成",value:4},{label:"已退款",value:5}],dataList:[]}},watch:{activeTab:function(){this.getFirstPageData()}},onLoad:function(e){console.log(e),this.activeTab=-1,e.status&&(this.activeTab=Number(e.status)),this.getFirstPageData();var a=this;t.$on("updateOrder",(function(t){console.log("监听到事件来自 update ,携带参数 msg 为:",t),1==t.delete?a.getFirstPageData():null!=t.info&&null!=t.info.orderId&&(console.log("监听到事件来自 update 01:",t),a.dataList.forEach((function(e,a){e.id==t.info.orderId&&(console.log("监听到事件来自 update 02:",t),e.status=t.info.orderStatus)})))}))},onShow:function(){this.loading=!1,this.currentOrder=null},onReachBottom:function(){this.getDataList()},methods:{getFirstPageData:function(){this.currentPage=0,this.hasNext=!0,this.total=0,this.dataList=[],this.getDataList()},getDataList:function(){var t=this;return(0,i.default)(r.default.mark((function e(){var a,n,i;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!t.loading&&t.hasNext){e.next=2;break}return e.abrupt("return");case 2:return t.loading=!0,t.currentPage=t.currentPage+1,1==t.currentPage&&(t.hasNext=!0,t.dataList=[]),a=t,n={},e.next=9,a.$u.api.myOrderPage({capacity:10,model:{combinedStatus:-1==t.activeTab?"":t.activeTab},page:t.currentPage});case 9:n=e.sent,console.log(n),200===n.code&&n.data&&n.data.page===t.currentPage&&(n.data.records=n.data.records||[],(i=a.dataList).push.apply(i,(0,o.default)(n.data.records)),a.total=n.data.total,t.currentPage>=n.data.pageCount?a.hasNext=!1:a.hasNext=!0),t.loading=!1;case 13:case"end":return e.stop()}}),e)})))()},jumpOrderDetail:function(e){t.navigateTo({url:"/pages/details-entry/details-entry?userType="+this.userType+"&id="+e})}}};e.default=f}).call(this,a(2)["default"])},187:function(t,e,a){"use strict";a.r(e);var n=a(188),r=a.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(o);e["default"]=r.a},188:function(t,e,a){}},[[181,"common/runtime","common/vendor"]]]); |
| | | //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/itinerary/itinerary.js.map |