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
15 KiB
1 lines
15 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["user-pages-bell-order"],{7743:function(e,t,i){"use strict";i.r(t);var a=i("a3b0"),n=i("d466");for(var r in n)["default"].indexOf(r)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(r);i("b830");var o=i("828b"),s=Object(o["a"])(n["default"],a["b"],a["c"],!1,null,"81413a8e",null,!1,a["a"],void 0);t["default"]=s.exports},a3b0:function(e,t,i){"use strict";i.d(t,"b",(function(){return a})),i.d(t,"c",(function(){return n})),i.d(t,"a",(function(){}));var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.isLoad?i("v-uni-view",{staticClass:"order-pages"},[e.orderInfo.order_goods&&e.orderInfo.order_goods.length>0?i("v-uni-view",[i("v-uni-view",{staticClass:"mt-md ml-lg mr-lg fill-base radius-16"},e._l(e.orderInfo.order_goods,(function(t,a){return i("v-uni-view",{key:a,staticClass:"list-item flex-center pd-lg",class:[{"b-1px-t":0!=a}]},[i("v-uni-view",{staticClass:"item-img radius-16"},[i("v-uni-view",{staticClass:"h5-image item-img radius-16",style:{backgroundImage:"url('"+t.cover+"')"}})],1),i("v-uni-view",{staticClass:"flex-1 ml-md"},[i("v-uni-view",{class:[{"flex-between":0==e.bellOrderParams.order_type}]},[i("v-uni-view",{staticClass:"f-title c-title text-bold ellipsis",class:[{"max-400":0==e.bellOrderParams.order_type},{"max-470":1==e.bellOrderParams.order_type}]},[e._v(e._s(t.title))]),0==e.bellOrderParams.order_type?i("v-uni-view",{staticClass:"f-caption c-caption"},[e._v("x"+e._s(t.num))]):e._e()],1),i("v-uni-view",{staticClass:"flex-between"},[i("v-uni-view",{staticClass:"flex-y-center f-desc c-caption"},[i("v-uni-view",{staticClass:"f-title c-warning mr-sm"},[e._v("¥"+e._s(0==e.bellOrderParams.order_type?t.pay_price:t.price))]),0==e.bellOrderParams.order_type?i("v-uni-view",{staticClass:"text-delete mr-sm"},[e._v("¥"+e._s(t.price))]):e._e(),e._v(e._s("/ "+t.time_long)+"分钟")],1),i("v-uni-view",[1*t.material_price>0?i("v-uni-view",{staticClass:"f-caption c-caption"},[e._v("物料费:¥"+e._s(t.material_price))]):e._e()],1)],1),i("v-uni-view",{staticClass:"flex-between"},[i("v-uni-view",{staticClass:"f-caption c-caption mt-sm mb-sm ellipsis",staticStyle:{"max-width":"300rpx"}},[e._v("服务"+e._s(e.$t("action.attendantName"))+":"+e._s(e.orderInfo.coach_info?e.orderInfo.coach_info.coach_name:"-"))]),i("v-uni-view",[1==e.bellOrderParams.order_type?i("v-uni-view",{staticClass:"flex-warp"},[i("v-uni-button",{staticClass:"reduce",style:{borderColor:e.primaryColor,color:e.primaryColor},on:{click:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t),e.changeNum(-1,a)}}},[i("i",{staticClass:"iconfont icon-jian-bold"})]),i("v-uni-button",{staticClass:"addreduce clear-btn"},[e._v(e._s(t.num||0))]),i("v-uni-button",{staticClass:"add",style:{background:e.primaryColor,borderColor:e.primaryColor},on:{click:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t),e.changeNum(1,a)}}},[i("i",{staticClass:"iconfont icon-jia-bold"})])],1):e._e()],1)],1)],1)],1)})),1),i("v-uni-view",{staticClass:"mt-md ml-lg mr-lg fill-base radius-16"},[i("v-uni-view",{staticClass:"flex-between pd-lg b-1px-b"},[i("v-uni-view",{staticClass:"f-title c-title text-bold"},[e._v("服务开始时间")]),i("v-uni-view",{staticClass:"f-paragraph c-caption"},[e._v(e._s(e.orderInfo.order_start_time))])],1),i("v-uni-view",{staticClass:"flex-between pd-lg"},[i("v-uni-view",{staticClass:"f-title c-title text-bold"},[e._v("服务结束时间")]),i("v-uni-view",{staticClass:"f-paragraph c-caption"},[e._v(e._s(e.orderInfo.order_end_time))])],1)],1),i("v-uni-view",{staticClass:"mt-md ml-lg mr-lg fill-base radius-16"},[e._l(e.payList,(function(t,a){return[0==e.bellOrderParams.order_type&&e.orderInfo.pay_model==t.id||1==e.bellOrderParams.order_type?i("v-uni-view",{key:a+"_0",staticClass:"flex-between pt-lg pb-lg pl-lg pr-md b-1px-b",on:{click:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t),e.toChangeItem(a,2)}}},[i("v-uni-view",{staticClass:"flex-y-center f-title c-title"},[i("i",{staticClass:"iconfont mr-md",class:t.icon,style:{color:1==t.id?e.primaryColor:"",fontSize:"50rpx"}}),e._v(e._s(t.title)),2==t.id?i("v-uni-view",{staticClass:"f-paragraph c-caption ml-md"},[e._v("余额"+e._s(e.balance||0)+"元")]):e._e()],1),i("v-uni-view",{staticClass:"flex-y-center",style:{color:e.payInd==a?e.primaryColor:""}},[i("i",{staticClass:"pay-icon iconfont icon-xuanze mr-sm",class:[{"icon-xuanze-fill":t.is_disabled||e.payInd==a}]})])],1):e._e()]}))],2),e.configInfo.trading_rules&&e.configInfo.trading_rules.length>0?i("v-uni-view",{staticClass:"mt-md ml-lg mr-lg pd-lg fill-base f-paragraph c-title flex-y-center radius-16",on:{click:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t),e.isAgree=!e.isAgree}}},[i("i",{staticClass:"iconfont mr-sm",class:e.isAgree?"icon-xuanze-fill":"icon-xuanze",style:{color:e.isAgree?e.primaryColor:""}}),e._v("我已阅读并同意"),i("v-uni-view",{style:{color:e.primaryColor},on:{click:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t),e.$refs.show_rule_item.open()}}},[e._v("《平台交易规则》")])],1):e._e(),i("v-uni-view",{staticClass:"space-max-footer"}),i("v-uni-view",{staticClass:"pay-info fix flex-between text-right pl-lg pr-lg fill-base"},[i("v-uni-view",{staticClass:"flex-y-center f-paragraph c-title text-bold ml-sm mr-lg"},[e._v("合计:"),i("v-uni-view",{staticClass:"flex-y-baseline f-title c-warning"},[e._v("¥"+e._s(e.orderInfo.pay_price))])],1),i("auth",{staticStyle:{width:"182rpx"},attrs:{needAuth:e.userInfo&&(!e.userInfo.phone||!e.userInfo.nickName),must:!0,type:e.userInfo.phone?"userInfo":"phone"},on:{go:function(t){arguments[0]=t=e.$handleEvent(t),e.toPay.apply(void 0,arguments)}}},[i("v-uni-view",{staticClass:"pay-btn flex-center f-paragraph c-base radius",style:{background:e.primaryColor}},[e._v("立即支付")])],1)],1)],1):i("abnor",{attrs:{tip:[{text:"该服务已下架~",color:0}],button:[{text:"去看看其他加钟服务",type:"confirm"}],btnSize:""},on:{confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.$util.goUrl({url:1,openType:"navigateBack"})}}}),i("uni-popup",{ref:"show_rule_item",attrs:{type:"center",maskClick:!1}},[i("v-uni-view",{staticClass:"popup-rule"},[i("v-uni-view",{staticClass:"fill-base pd-lg radius-26"},[i("v-uni-view",{staticClass:"f-title c-title text-bold flex-center pd-lg"},[e._v("平台交易规则")]),i("v-uni-scroll-view",{staticClass:"rule-text",attrs:{"scroll-y":!0},on:{touchmove:function(t){t.stopPropagation(),t.preventDefault(),arguments[0]=t=e.$handleEvent(t)}}},[i("parser",{attrs:{html:e.configInfo.trading_rules,"show-with-animation":!0,"lazy-load":!0},on:{linkpress:function(t){arguments[0]=t=e.$handleEvent(t),e.linkpress.apply(void 0,arguments)}}},[e._v("加载中...")])],1)],1),i("v-uni-view",{staticClass:"flex-center pd-lg",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.$refs.show_rule_item.close()}}},[i("i",{staticClass:"iconfont icon-close c-base"})])],1)],1)],1):e._e()},n=[]},b830:function(e,t,i){"use strict";var a=i("dcb3"),n=i.n(a);n.a},bde9:function(e,t,i){"use strict";i("6a54");var a=i("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i("bd06"),i("dd2b"),i("bf0f"),i("18f7"),i("de6c");var n=a(i("5de6")),r=a(i("9b1b")),o=a(i("2634")),s=a(i("2fdc")),l=i("8f59"),c=a(i("99e9")),u={components:{parser:c.default},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,l.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,s.default)((0,o.default)().mark((function t(){return(0,o.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.initIndex();case 2:case"end":return t.stop()}}),t)})))()},methods:(0,r.default)((0,r.default)((0,r.default)({},(0,l.mapActions)(["getConfigInfo","getMineInfo"])),(0,l.mapMutations)(["updateUserItem","updateOrderItem"])),{},{initIndex:function(){var e=arguments,t=this;return(0,s.default)((0,o.default)().mark((function i(){var a,r,s,l,c,u,d,p,f,v,m,g,b;return(0,o.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(a=e.length>0&&void 0!==e[0]&&e[0],a||!t.$jweixin.isWechat()){i.next=5;break}return i.next=4,t.$jweixin.initJssdk();case 4:t.$jweixin.wxReady((function(){t.$jweixin.hideOptionMenu()}));case 5:return i.next=7,t.getConfigInfo();case 7:return r=t.configInfo.alipay_status,s=void 0===r?0:r,s&&(l=t.payList.findIndex((function(e){return 3==e.id})),-1===l&&(t.payList.splice(1,0,{id:3,icon:"icon-alipay c-alipay",title:"支付宝支付"}),t.balanceInd=2)),c=t.$util.deepCopy(t.bellOrderParams),u=c.order_type,d=void 0===u?0:u,delete c.order_type,p=0==d?"upOrderInfo":"payOrderInfo",i.next=15,Promise.all([t.$api.order[p](c),t.getMineInfo()]);case 15:f=i.sent,v=(0,n.default)(f,2),m=v[0],v[1],t.$util.setNavigationBarColor({bg:t.primaryColor}),t.orderInfo=m,g=t.mineInfo.balance,b=t.balanceInd,t.payList[b].is_disabled=1*g<1*m.pay_price,t.balance=g,0==d&&(t.payInd=t.payList.findIndex((function(e){return e.id==m.pay_model}))),t.isLoad=!0;case 27:case"end":return i.stop()}}),i)})))()},initRefresh:function(){this.initIndex(!0)},linkpress:function(e){},toChangeItem:function(e){var t=arguments,i=this;return(0,s.default)((0,o.default)().mark((function a(){var n;return(0,o.default)().wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(t.length>1&&void 0!==t[1]?t[1]:1,n=i.balanceInd,e!=n||!i.payList[n].is_disabled){a.next=4;break}return a.abrupt("return");case 4:i.payInd=e;case 5:case"end":return a.stop()}}),a)})))()},changeNum:function(e,t){var i=this;return(0,s.default)((0,o.default)().mark((function a(){var n,r,s,l,c,u,d,p;return(0,o.default)().wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(n=i.orderInfo.order_goods[t],r=n.id,s=n.service_id,l=i.bellOrderParams,c=l.coach_id,u=l.order_id,!i.lockTap){a.next=4;break}return a.abrupt("return");case 4:return i.lockTap=!0,d=e>0?"addCar":"delCar",p=e>0?{service_id:s,coach_id:c,order_id:u,num:1}:{id:r,num:1},a.prev=7,a.next=10,i.$api.order[d](p);case 10:return a.sent,a.next=13,i.initRefresh();case 13:i.lockTap=!1,a.next=19;break;case 16:a.prev=16,a.t0=a["catch"](7),i.lockTap=!1;case 19:case"end":return a.stop()}}),a,null,[[7,16]])})))()},toPay:function(){var e=this;return(0,s.default)((0,o.default)().mark((function t(){var i,a,n,r,s,l,c,u,d,p,f;return(0,o.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(i=e.configInfo.trading_rules,!(i&&i.length>0)||e.isAgree){t.next=4;break}return e.$util.showToast({title:"请先阅读并同意《平台交易规则》"}),t.abrupt("return");case 4:if(a=e.$util.deepCopy(e.bellOrderParams),n=a.order_type,r=void 0===n?0:n,s=e.payList,l=e.payInd,c=s[l].id,delete a.order_type,a.pay_model=c,u=0==r?"upOrderGoods":"payOrder",!e.lockTap){t.next=13;break}return t.abrupt("return");case 13:return e.lockTap=!0,e.$util.showLoading(),t.prev=15,t.next=18,e.$api.order[u](a);case 18:if(d=t.sent,p=d.pay_list,f=d.order_id,e.$util.hideAll(),!p){t.next=41;break}if(3==c&&(p={orderInfo:p,provider:"alipay"}),3!=c){t.next=29;break}return p=Object.assign({},p,{order_id:f,page_url:"/pages/order?tab=2"}),e.updateOrderItem({key:"alipayOrderParams",val:p}),e.$util.goUrl({url:"/user/pages/alipay-result",openType:"redirectTo"}),t.abrupt("return");case 29:return t.prev=29,t.next=32,e.$util.pay(p);case 32:e.$util.showToast({title:"支付成功"}),setTimeout((function(){e.lockTap=!1,e.$util.goUrl({url:"/pages/order?tab=2",openType:"reLaunch"})}),1e3),t.next=40;break;case 36:t.prev=36,t.t0=t["catch"](29),e.$util.showToast({title:"支付失败"}),setTimeout((function(){e.lockTap=!1,e.$util.goUrl({url:"/pages/order?tab=1",openType:"reLaunch"})}),1e3);case 40:return t.abrupt("return");case 41:e.$util.showToast({title:"支付成功"}),setTimeout((function(){e.lockTap=!1,e.$util.goUrl({url:"/pages/order?tab=2",openType:"reLaunch"})}),1e3),t.next=48;break;case 45:t.prev=45,t.t1=t["catch"](15),setTimeout((function(){e.lockTap=!1,e.$util.hideAll()}),2e3);case 48:case"end":return t.stop()}}),t,null,[[15,45],[29,36]])})))()}})};t.default=u},d466:function(e,t,i){"use strict";i.r(t);var a=i("bde9"),n=i.n(a);for(var r in a)["default"].indexOf(r)<0&&function(e){i.d(t,e,(function(){return a[e]}))}(r);t["default"]=n.a},dcb3:function(e,t,i){var a=i("f5e1");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);var n=i("967d").default;n("39ab69e4",a,!0,{sourceMap:!1,shadowMode:!1})},f5e1:function(e,t,i){var a=i("c86c");t=a(!1),t.push([e.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.order-pages .list-item .item-img[data-v-81413a8e]{width:%?140?%;height:%?140?%}.order-pages .list-item .item-tag[data-v-81413a8e]{width:%?100?%;height:%?36?%;margin-top:%?-18?%}.order-pages .list-item .iconyduixingxingshixin[data-v-81413a8e]{font-size:%?28?%}.order-pages .list-item .item-btn[data-v-81413a8e]{width:%?129?%;height:%?54?%}.order-pages .pay-info[data-v-81413a8e]{height:%?110?%;bottom:0;height:calc(%?110?% + env(safe-area-inset-bottom) / 2);padding-bottom:calc(env(safe-area-inset-bottom) / 2)}.order-pages .pay-info .pay-btn[data-v-81413a8e]{width:%?182?%;height:%?74?%}.order-pages .popup-rule[data-v-81413a8e]{width:%?680?%;height:auto}.order-pages .popup-rule .rule-text[data-v-81413a8e]{min-height:%?300?%;max-height:60vh}.order-pages .popup-rule .iconfont[data-v-81413a8e]{font-size:%?60?%}',""]),e.exports=t}}]); |