You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
8.1 KiB
1 lines
8.1 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/order"],{"5c7c":function(t,e,n){"use strict";n.r(e);var r=n("7fc8"),a=n.n(r);for(var i in r)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(i);e["default"]=a.a},"7fc8":function(t,e,n){"use strict";(function(t){var r=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=r(n("7eb4")),i=r(n("7ca3")),o=r(n("ee10")),c=n("8f59");function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){(0,i.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var l={components:{tabbar:function(){n.e("components/tabbar").then(function(){return resolve(n("ea26"))}.bind(null,n)).catch(n.oe)}},data:function(){return{options:{},statusType:{"-1":"已取消",1:"待支付",2:"待服务",3:this.$t("action.attendantName")+"接单",4:this.$t("action.attendantName")+"出发",5:this.$t("action.attendantName")+"到达",6:"服务中",7:"已完成",8:"待转单"},loading:!0,popupInfo:{},lockTap:!1}},computed:(0,c.mapState)({activeIndex:function(t){return t.order.activeIndex},tabList:function(t){return t.order.tabList},param:function(t){return t.order.param},list:function(t){return t.order.list},primaryColor:function(t){return t.config.configInfo.primaryColor},subColor:function(t){return t.config.configInfo.subColor},configInfo:function(t){return t.config.configInfo},userInfo:function(t){return t.user.userInfo}}),onLoad:function(t){var e=this;return(0,o.default)(a.default.mark((function n(){var r,i;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return r=t.tab,i=void 0===r?0:r,e.updateOrderItem({key:"activeIndex",val:i}),n.next=4,e.initIndex();case 4:case"end":return n.stop()}}),n)})))()},onPullDownRefresh:function(){t.showNavigationBarLoading(),this.initRefresh(),t.stopPullDownRefresh()},onReachBottom:function(){this.list.current_page>=this.list.last_page||this.loading||(this.loading=!0,this.getList(this.param.page+1))},methods:s(s(s({},(0,c.mapActions)(["getConfigInfo","getOrderList"])),(0,c.mapMutations)(["updateOrderItem"])),{},{initIndex:function(){var t=arguments,e=this;return(0,o.default)(a.default.mark((function n(){var r;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(r=t.length>0&&void 0!==t[0]&&t[0],e.configInfo.id&&!r){n.next=4;break}return n.next=4,e.getConfigInfo();case 4:return n.next=6,e.getList(1);case 6:case"end":return n.stop()}}),n)})))()},initRefresh:function(){this.initIndex(!0)},getList:function(){var t=arguments,e=this;return(0,o.default)(a.default.mark((function n(){var r,i,o,c,u;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return r=t.length>0&&void 0!==t[0]?t[0]:0,r&&(i=e.$util.deepCopy(e.param),i.page=r,e.updateOrderItem({key:"param",val:i})),e.list,o=e.param,c=e.tabList,u=e.activeIndex,o.pay_type=c[u].id,n.prev=4,n.next=7,e.getOrderList(o);case 7:e.loading=!1,e.$util.hideAll(),n.next=15;break;case 11:n.prev=11,n.t0=n["catch"](4),e.loading=!1,e.$util.hideAll();case 15:case"end":return n.stop()}}),n,null,[[4,11]])})))()},handerTabChange:function(e){this.updateOrderItem({key:"activeIndex",val:e}),t.pageScrollTo({scrollTop:0}),this.$util.showLoading(),this.getList(1)},toCancel:function(t){var e=this;return(0,o.default)(a.default.mark((function n(){var r,i,o,c,u,s,l;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:r=e.list.data[t],i=r.id,o=r.order_code,c=r.order_goods,u=r.pay_type,s=c[0].goods_cover,e.popupInfo={id:i,name:"系统单号:".concat(o),image:s,index:t},l=1==u?"cancel_item":"del_item",e.$refs[l].open();case 5:case"end":return n.stop()}}),n)})))()},confirmCancel:function(){var t=this;return(0,o.default)(a.default.mark((function e(){var n,r,i;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.popupInfo,r=n.id,i=n.index,e.next=3,t.$api.order.cancelOrder({id:r});case 3:0==t.activeIndex?t.list.data[i].pay_type=-1:t.list.data.splice(i,1),t.$util.showToast({title:"取消成功"}),t.$refs.cancel_item.close();case 6:case"end":return e.stop()}}),e)})))()},confirmDel:function(){var t=this;return(0,o.default)(a.default.mark((function e(){var n,r,i;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.popupInfo,r=n.id,i=n.index,e.next=3,t.$api.order.delOrder({id:r});case 3:t.list.data.splice(i,1),t.$util.showToast({title:"删除成功"}),t.$refs.del_item.close();case 6:case"end":return e.stop()}}),e)})))()},toPay:function(t){var e=this;return(0,o.default)(a.default.mark((function n(){var r,i,o,c,u;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(!e.lockTap){n.next=2;break}return n.abrupt("return");case 2:return e.lockTap=!0,e.$util.showLoading(),r=e.list.data[t],i=r.id,o=r.pay_model,n.prev=5,n.next=8,e.$api.order.rePayOrder({id:i});case 8:if(c=n.sent,u=c.pay_list,e.$util.hideAll(),!u){n.next=26;break}return 3==o&&(u={orderInfo:u,provider:"alipay"}),n.prev=13,n.next=16,e.$util.pay(u);case 16:e.$util.showToast({title:"支付成功"}),0==e.activeIndex?e.list.data[t].pay_type=2:e.list.data.splice(t,1),e.lockTap=!1,n.next=26;break;case 21:return n.prev=21,n.t0=n["catch"](13),e.$util.showToast({title:"支付失败"}),e.lockTap=!1,n.abrupt("return");case 26:n.next=31;break;case 28:n.prev=28,n.t1=n["catch"](5),setTimeout((function(){e.lockTap=!1,e.$util.hideAll()}),2e3);case 31:case"end":return n.stop()}}),n,null,[[5,28],[13,21]])})))()},toHx:function(t){var e=this;return(0,o.default)(a.default.mark((function n(){var r,i,o;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:r=e.list.data[t],i=r.id,o=r.qr,e.popupInfo={id:i,image:o},e.$refs.hx_item.open();case 3:case"end":return n.stop()}}),n)})))()},goDetail:function(t,e){var n=this.list.data[t].id,r="/user/pages/order/".concat(e,"?id=").concat(n);this.$util.goUrl({url:r})},toAgain:function(t){var e=this;return(0,o.default)(a.default.mark((function n(){var r,i,o;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return r=e.list.data[t],i=r.id,o=r.coach_id,n.next=3,e.$api.order.onceMoreOrder({order_id:i});case 3:e.$util.goUrl({url:"/user/pages/order?id=".concat(o)});case 4:case"end":return n.stop()}}),n)})))()}})};e.default=l}).call(this,n("df3c")["default"])},ae86:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){}));var r=function(){var t=this,e=t.$createElement,n=(t._self._c,t.tabList.length),r=t.__map(t.list.data,(function(e,n){var r=t.__get_orig(e),a=1!=e.pay_type?[2,3,4,5,6].includes(e.pay_type):null,i=e.order_goods.length,o=t.$t("action.attendantName"),c=e.order_goods.length;return{$orig:r,g1:a,g2:i,m0:o,g3:c}})),a=t.loading?t.list.current_page>=t.list.last_page&&t.list.data.length>0:null,i=!t.loading&&t.list.data.length<=0&&1==t.list.current_page;t._isMounted||(t.e0=function(e,n){var r=arguments[arguments.length-1].currentTarget.dataset,a=r.eventParams||r["event-params"];n=a.item;return e.stopPropagation(),t.$util.goUrl({openType:"copy",url:n.order_code})},t.e1=function(e,n){var r=arguments[arguments.length-1].currentTarget.dataset,a=r.eventParams||r["event-params"];n=a.item;return e.stopPropagation(),t.$util.goUrl({url:"/user/pages/bell/list?id="+n.id+"&coach_id="+n.coach_id})}),t.$mp.data=Object.assign({},{$root:{g0:n,l0:r,g4:a,g5:i}})},a=[]},d7d67:function(t,e,n){"use strict";(function(t,e){var r=n("47a9");n("7043");r(n("3240"));var a=r(n("f2a6"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(a.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},f2a6:function(t,e,n){"use strict";n.r(e);var r=n("ae86"),a=n("5c7c");for(var i in a)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(i);var o=n("828b"),c=Object(o["a"])(a["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],void 0);e["default"]=c.exports}},[["d7d67","common/runtime","common/vendor"]]]); |