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
7.1 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["user/pages/bell/order"],{"12f2":function(e,r,n){},"1f55":function(e,r,n){"use strict";n.d(r,"b",(function(){return t})),n.d(r,"c",(function(){return o})),n.d(r,"a",(function(){}));var t=function(){var e=this,r=e.$createElement,n=(e._self._c,e.isLoad?e.orderInfo.order_goods&&e.orderInfo.order_goods.length>0:null),t=e.isLoad&&n?e.__map(e.orderInfo.order_goods,(function(r,n){var t=e.__get_orig(r),o=e.$t("action.attendantName");return{$orig:t,m0:o}})):null,o=e.isLoad&&n?e.configInfo.trading_rules&&e.configInfo.trading_rules.length>0:null;e._isMounted||(e.e0=function(r){r.stopPropagation(),e.isAgree=!e.isAgree},e.e1=function(r){return r.stopPropagation(),e.$refs.show_rule_item.open()},e.e2=function(r){return e.$util.goUrl({url:1,openType:"navigateBack"})},e.e3=function(r){return e.$refs.show_rule_item.close()}),e.$mp.data=Object.assign({},{$root:{g0:n,l0:t,g1:o}})},o=[]},7743:function(e,r,n){"use strict";n.r(r);var t=n("1f55"),o=n("d466");for(var a in o)["default"].indexOf(a)<0&&function(e){n.d(r,e,(function(){return o[e]}))}(a);n("78aa");var i=n("828b"),u=Object(i["a"])(o["default"],t["b"],t["c"],!1,null,null,null,!1,t["a"],void 0);r["default"]=u.exports},"78aa":function(e,r,n){"use strict";var t=n("12f2"),o=n.n(t);o.a},a0a1:function(e,r,n){"use strict";var t=n("47a9");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=t(n("7eb4")),a=t(n("34cf")),i=t(n("7ca3")),u=t(n("ee10")),c=n("8f59");function s(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function l(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?s(Object(n),!0).forEach((function(r){(0,i.default)(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var d={components:{parser:function(){Promise.all([n.e("common/vendor"),n.e("components/jyf-Parser/index")]).then(function(){return resolve(n("99e9"))}.bind(null,n)).catch(n.oe)}},data:function(){return{isLoad:!1,options:{},payList:[{id:1,icon:"iconweixinzhifu1",title:"微信支付"},{id:2,icon:"iconqianbao c-balance",title:"账户余额",is_disabled:!1}],payInd:0,balanceInd:1,balance:0,send_info:{time_index:0,time:{}},orderInfo:{coupon_id:0,address_info:{id:0}},lockTap:!1,isBus:0,isAgree:!1}},computed:(0,c.mapState)({primaryColor:function(e){return e.config.configInfo.primaryColor},subColor:function(e){return e.config.configInfo.subColor},configInfo:function(e){return e.config.configInfo},commonOptions:function(e){return e.user.commonOptions},userInfo:function(e){return e.user.userInfo},mineInfo:function(e){return e.user.mineInfo},bellOrderParams:function(e){return e.order.bellOrderParams}}),onLoad:function(){var e=this;return(0,u.default)(o.default.mark((function r(){return o.default.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,e.initIndex();case 2:case"end":return r.stop()}}),r)})))()},methods:l(l(l({},(0,c.mapActions)(["getConfigInfo","getMineInfo"])),(0,c.mapMutations)(["updateUserItem","updateOrderItem"])),{},{initIndex:function(){var e=arguments,r=this;return(0,u.default)(o.default.mark((function n(){var t,i,u,c,s,l,d,f,p,g;return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.length>0&&void 0!==e[0]&&e[0],n.next=3,r.getConfigInfo();case 3:return t=r.configInfo.alipay_status,void 0===t?0:t,i=r.$util.deepCopy(r.bellOrderParams),u=i.order_type,c=void 0===u?0:u,delete i.order_type,s=0==c?"upOrderInfo":"payOrderInfo",n.next=11,Promise.all([r.$api.order[s](i),r.getMineInfo()]);case 11:l=n.sent,d=(0,a.default)(l,2),f=d[0],d[1],r.$util.setNavigationBarColor({bg:r.primaryColor}),r.orderInfo=f,p=r.mineInfo.balance,g=r.balanceInd,r.payList[g].is_disabled=1*p<1*f.pay_price,r.balance=p,0==c&&(r.payInd=r.payList.findIndex((function(e){return e.id==f.pay_model}))),r.isLoad=!0;case 23:case"end":return n.stop()}}),n)})))()},initRefresh:function(){this.initIndex(!0)},linkpress:function(e){},toChangeItem:function(e){var r=arguments,n=this;return(0,u.default)(o.default.mark((function t(){var a;return o.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(r.length>1&&void 0!==r[1]?r[1]:1,a=n.balanceInd,e!=a||!n.payList[a].is_disabled){t.next=4;break}return t.abrupt("return");case 4:n.payInd=e;case 5:case"end":return t.stop()}}),t)})))()},changeNum:function(e,r){var n=this;return(0,u.default)(o.default.mark((function t(){var a,i,u,c,s,l,d,f;return o.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(a=n.orderInfo.order_goods[r],i=a.id,u=a.service_id,c=n.bellOrderParams,s=c.coach_id,l=c.order_id,!n.lockTap){t.next=4;break}return t.abrupt("return");case 4:return n.lockTap=!0,d=e>0?"addCar":"delCar",f=e>0?{service_id:u,coach_id:s,order_id:l,num:1}:{id:i,num:1},t.prev=7,t.next=10,n.$api.order[d](f);case 10:return t.sent,t.next=13,n.initRefresh();case 13:n.lockTap=!1,t.next=19;break;case 16:t.prev=16,t.t0=t["catch"](7),n.lockTap=!1;case 19:case"end":return t.stop()}}),t,null,[[7,16]])})))()},toPay:function(){var e=this;return(0,u.default)(o.default.mark((function r(){var n,t,a,i,u,c,s,l,d,f;return o.default.wrap((function(r){while(1)switch(r.prev=r.next){case 0:if(n=e.configInfo.trading_rules,!(n&&n.length>0)||e.isAgree){r.next=4;break}return e.$util.showToast({title:"请先阅读并同意《平台交易规则》"}),r.abrupt("return");case 4:if(t=e.$util.deepCopy(e.bellOrderParams),a=t.order_type,i=void 0===a?0:a,u=e.payList,c=e.payInd,s=u[c].id,delete t.order_type,t.pay_model=s,l=0==i?"upOrderGoods":"payOrder",!e.lockTap){r.next=13;break}return r.abrupt("return");case 13:return e.lockTap=!0,e.$util.showLoading(),r.prev=15,r.next=18,e.$api.order[l](t);case 18:if(d=r.sent,f=d.pay_list,d.order_id,e.$util.hideAll(),!f){r.next=36;break}return 3==s&&(f={orderInfo:f,provider:"alipay"}),r.prev=24,r.next=27,e.$util.pay(f);case 27:e.$util.showToast({title:"支付成功"}),setTimeout((function(){e.lockTap=!1,e.$util.goUrl({url:"/pages/order?tab=2",openType:"reLaunch"})}),1e3),r.next=35;break;case 31:r.prev=31,r.t0=r["catch"](24),e.$util.showToast({title:"支付失败"}),setTimeout((function(){e.lockTap=!1,e.$util.goUrl({url:"/pages/order?tab=1",openType:"reLaunch"})}),1e3);case 35:return r.abrupt("return");case 36:e.$util.showToast({title:"支付成功"}),setTimeout((function(){e.lockTap=!1,e.$util.goUrl({url:"/pages/order?tab=2",openType:"reLaunch"})}),1e3),r.next=43;break;case 40:r.prev=40,r.t1=r["catch"](15),setTimeout((function(){e.lockTap=!1,e.$util.hideAll()}),2e3);case 43:case"end":return r.stop()}}),r,null,[[15,40],[24,31]])})))()}})};r.default=d},d466:function(e,r,n){"use strict";n.r(r);var t=n("a0a1"),o=n.n(t);for(var a in t)["default"].indexOf(a)<0&&function(e){n.d(r,e,(function(){return t[e]}))}(a);r["default"]=o.a},f3af:function(e,r,n){"use strict";(function(e,r){var t=n("47a9");n("7043");t(n("3240"));var o=t(n("7743"));e.__webpack_require_UNI_MP_PLUGIN__=n,r(o.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])}},[["f3af","common/runtime","common/vendor"]]]);