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
20 KiB
1 lines
20 KiB
import{x as e,o as t,c as o,w as l,a as s,n as a,j as i,i as d,e as r,f as n,t as u,k as c,$ as f,b as p,F as m,d as h,I as _,S as y,g}from"./index-ae8bbb19.js";import{_ as x}from"./u-loading.01f91c7b.js";import{r as k}from"./uni-app.es.ee1d5b08.js";import{_ as b}from"./_plugin-vue_export-helper.1b428a4d.js";import{_ as w}from"./u-modal.b5d074c6.js";import{_ as v}from"./u-popup.d74d5514.js";import{_ as C}from"./u-icon.b463ad8a.js";import{i as S,b as T}from"./verify.a2db6564.js";import{C as I}from"./CouponType.a4f88c42.js";import{O as P,D}from"./OrderType.fdcce3af.js";const E=b({name:"u-switch",emits:["update:modelValue","input","change"],props:{value:{type:Boolean,default:!1},modelValue:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{type:[Number,String],default:50},activeColor:{type:String,default:"#2979ff"},inactiveColor:{type:String,default:"#ffffff"},vibrateShort:{type:Boolean,default:!1},activeValue:{type:[Number,String,Boolean],default:!0},inactiveValue:{type:[Number,String,Boolean],default:!1}},data:()=>({}),computed:{valueCom(){return this.modelValue},switchStyle(){let e={};return e.fontSize=this.size+"rpx",e.backgroundColor=this.valueCom?this.activeColor:this.inactiveColor,e},loadingColor(){return this.valueCom?this.activeColor:null}},methods:{onClick(){this.disabled||this.loading||(this.vibrateShort&&uni.vibrateShort(),this.$emit("input",!this.valueCom),this.$emit("update:modelValue",!this.valueCom),this.$nextTick((()=>{this.$emit("change",this.valueCom?this.activeValue:this.inactiveValue)})))}}},[["render",function(r,n,u,c,f,p){const m=k(e("u-loading"),x),h=d;return t(),o(h,{class:i(["u-switch",[1==p.valueCom?"u-switch--on":"",u.disabled?"u-switch--disabled":""]]),onClick:p.onClick,style:a([p.switchStyle])},{default:l((()=>[s(h,{class:"u-switch__node node-class",style:a({width:r.$u.addUnit(u.size),height:r.$u.addUnit(u.size)})},{default:l((()=>[s(m,{show:u.loading,class:"u-switch__loading",size:.6*u.size,color:p.loadingColor},null,8,["show","size","color"])])),_:1},8,["style"])])),_:1},8,["class","onClick","style"])}],["__scopeId","data-v-7debaf62"]]);const V=b({name:"u-toast",props:{zIndex:{type:[Number,String],default:""}},data:()=>({isShow:!1,timer:null,config:{params:{},title:"",type:"",duration:2e3,isTab:!1,url:"",icon:!0,position:"center",callback:null,back:!1},tmpConfig:{}}),computed:{iconName(){if(["error","warning","success","info"].indexOf(this.tmpConfig.type)>=0&&this.tmpConfig.icon){return this.$u.type2icon(this.tmpConfig.type)}},uZIndex(){return this.isShow?this.zIndex?this.zIndex:this.$u.zIndex.toast:"999999"}},methods:{show(e){this.tmpConfig=this.$u.deepMerge(this.config,e),this.timer&&(clearTimeout(this.timer),this.timer=null),this.isShow=!0,this.timer=setTimeout((()=>{this.isShow=!1,clearTimeout(this.timer),this.timer=null,"function"==typeof this.tmpConfig.callback&&this.tmpConfig.callback(),this.timeEnd()}),this.tmpConfig.duration)},hide(){this.isShow=!1,this.timer&&(clearTimeout(this.timer),this.timer=null)},timeEnd(){if(this.tmpConfig.url){if("/"!=this.tmpConfig.url[0]&&(this.tmpConfig.url="/"+this.tmpConfig.url),Object.keys(this.tmpConfig.params).length){let e="";/.*\/.*\?.*=.*/.test(this.tmpConfig.url)?(e=this.$u.queryParams(this.tmpConfig.params,!1),this.tmpConfig.url=this.tmpConfig.url+"&"+e):(e=this.$u.queryParams(this.tmpConfig.params),this.tmpConfig.url+=e)}this.tmpConfig.isTab?uni.switchTab({url:this.tmpConfig.url}):uni.navigateTo({url:this.tmpConfig.url})}else this.tmpConfig.back&&this.$u.route({type:"back"})}}},[["render",function(f,p,m,h,_,y){const g=k(e("u-icon"),C),x=d,b=c;return t(),o(x,{class:i(["u-toast",[_.isShow?"u-show":"","u-type-"+_.tmpConfig.type,"u-position-"+_.tmpConfig.position]]),style:a({zIndex:y.uZIndex})},{default:l((()=>[s(x,{class:"u-icon-wrap"},{default:l((()=>[_.tmpConfig.icon?(t(),o(g,{key:0,class:"u-icon",name:y.iconName,size:30,color:_.tmpConfig.type},null,8,["name","color"])):r("",!0)])),_:1}),s(b,{class:"u-text"},{default:l((()=>[n(u(_.tmpConfig.title),1)])),_:1})])),_:1},8,["class","style"])}],["__scopeId","data-v-aa0b93e8"]]),O="checkout/order",$="checkout/submit",U=Object.freeze(Object.defineProperty({__proto__:null,order:(e,t)=>f.get(O,{mode:e,...t}),submit:(e,t)=>f.post($,{mode:e,...t},{isPrompt:!1})},Symbol.toStringTag,{value:"Module"})),j="sharp.checkout/order",z="sharp.checkout/submit",N=Object.freeze(Object.defineProperty({__proto__:null,order:(e,t)=>f.get(j,{mode:e,...t}),submit:(e,t)=>f.post(z,{mode:e,...t},{isPrompt:!1})},Symbol.toStringTag,{value:"Module"})),M="bargain.checkout/order",L="bargain.checkout/submit",R=Object.freeze(Object.defineProperty({__proto__:null,order:(e,t)=>f.get(M,{mode:e,...t}),submit:(e,t)=>f.post(L,{mode:e,...t},{isPrompt:!1})},Symbol.toStringTag,{value:"Module"})),A="groupon.checkout/order",X="groupon.checkout/submit",B=Object.freeze(Object.defineProperty({__proto__:null,order:(e,t)=>f.get(A,{mode:e,...t}),submit:(e,t)=>f.post(X,{mode:e,...t},{isPrompt:!1})},Symbol.toStringTag,{value:"Module"})),F=["red","blue","violet","yellow"],G=e=>({buyNow:U,cart:U,bargain:R,sharp:N,groupon:B}[e]),q=(e,t)=>{const o={};return"buyNow"===e&&(o.goodsId=t.goodsId,o.goodsNum=t.goodsNum,o.goodsSkuId=t.goodsSkuId),"cart"===e&&(o.cartIds=t.cartIds),"bargain"===e&&(o.taskId=t.taskId,o.goodsSkuId=t.goodsSkuId),"sharp"===e&&(o.activeTimeId=t.activeTimeId,o.sharpGoodsId=t.sharpGoodsId,o.goodsSkuId=t.goodsSkuId,o.goodsNum=t.goodsNum),"groupon"===e&&(o.grouponGoodsId=t.grouponGoodsId,o.taskId=t.taskId,o.goodsSkuId=t.goodsSkuId,o.goodsNum=t.goodsNum,o.stepPeople=t.stepPeople),o};const Z=b({data:()=>({OrderTypeEnum:P,DeliveryTypeEnum:D,CouponTypeEnum:I,options:{},isShowTab:!1,DeliveryTypeEnum:D,curDelivery:null,selectedShopId:0,linkman:"",phone:"",CouponColors:F,selectCouponId:0,isUsePoints:!1,remark:"",disabled:!1,showPoints:!1,showPopup:!1,order:{goodsList:[],couponList:[],existAddress:!1,address:null,existAddress:!1,isIntraRegion:!0,hasError:!1,errorMsg:""},personal:{},setting:{}}),onLoad(e){this.options=e,uni.$on("syncSelectedId",(e=>{this.selectedShopId=e}))},onUnload(){uni.$off("syncSelectedId")},onShow(){this.getOrderData()},methods:{getOrderData(){const e=this,{options:{mode:t}}=e,o=e.getRequestParam();G(t).order(t,o).then((t=>e.initData(t.data))).catch((e=>e))},initData({order:e,setting:t,personal:o}){const l=this;l.order=e,l.personal=o,l.setting=t,e.hasError&&l.showToast(e.errorMsg,3e3),l.curDelivery=e.delivery,l.isShowTab=t.deliveryType.length>1,""===l.linkman&&(l.linkman=e.lastExtract.linkman),""===l.phone&&(l.phone=e.lastExtract.phone)},getRequestParam(){const e=this,{options:t}=e,o=q(t.mode,t);return{...{delivery:e.curDelivery||0,shopId:e.selectedShopId||0,couponId:e.selectCouponId||0,isUsePoints:e.isUsePoints?1:0},...o}},handleSwichDelivery(e){this.curDelivery=e,this.getOrderData()},handleShowPoints(){this.showPoints=!0},handleShowPopup(){this.showPopup=!0},handleSelectCoupon(e){const t=this,{couponList:o}=t.order,l=o[e];l.is_apply?(t.selectCouponId=l.user_coupon_id,t.getOrderData(),t.showPopup=!1):t.showToast(l.not_apply_info)},handleNotUseCoupon(){const e=this;e.selectCouponId=0,e.getOrderData(),e.showPopup=!1},onSelectAddress(){this.$navTo("pages/address/index",{from:"checkout"})},onSelectExtractPoint(){this.$navTo("pages/shop/extract",{selectedId:this.selectedShopId})},onTargetGoods(e){this.$navTo("pages/goods/detail",{goodsId:e})},onSubmitOrder(){const e=this;return!e.disabled&&(!!e.onVerifyFrom()&&(e.disabled=!0,void G(e.options.mode).submit(e.options.mode,e.getFormData()).then((e=>{const t=e.data.orderId;setTimeout((()=>{this.$navTo("pages/checkout/cashier/index",{orderId:t},"redirectTo")}),100)})).catch((t=>e.showToast(t.errMsg,3e3))).finally((()=>setTimeout((()=>e.disabled=!1),800)))))},navToMyOrder(){setTimeout((()=>{this.$navTo("pages/order/index",{},"redirectTo")}),1e3)},getFormData(){const e=this,{options:t}=e;return{...{delivery:e.curDelivery,couponId:e.selectCouponId||0,shopId:e.selectedShopId||0,linkman:e.linkman,phone:e.phone,isUsePoints:e.isUsePoints?1:0,remark:e.remark||""},...q(t.mode,t)}},onVerifyFrom(){const e=this;if(e.hasError)return e.showToast(e.errorMsg,3e3),!1;if(e.curDelivery==D.EXTRACT.value){if(e.linkman=e.linkman.trim(),e.phone=e.phone.trim(),e.selectedShopId<=0)return e.showToast("请选择自提的门店"),!1;if(S(e.linkman))return e.showToast("请填写自提联系人"),!1;if(S(e.phone))return e.showToast("请填写自提联系电话"),!1;if(!T(e.phone))return e.showToast("请输入正确的联系电话"),!1}return!0},showToast(e,t=2e3){this.$refs.uToast.show({title:e,duration:t})}}},[["render",function(f,x,b,C,S,T){const I=c,P=d,D=_,O=g,$=k(e("u-switch"),E),U=y,j=k(e("u-modal"),w),z=k(e("u-popup"),v),N=k(e("u-toast"),V);return t(),o(P,{class:"container p-bottom",style:a(f.appThemeStyle)},{default:l((()=>[S.order.goodsList.length?(t(),o(P,{key:0},{default:l((()=>[S.order.orderType==S.OrderTypeEnum.PHYSICAL.value?(t(),p(m,{key:0},[S.isShowTab?(t(),o(P,{key:0,class:"swiper-tab dis-flex flex-y-center flex-x-around"},{default:l((()=>[s(P,{class:i(["swiper-tab-item",{on:S.curDelivery==S.DeliveryTypeEnum.EXPRESS.value}]),onClick:x[0]||(x[0]=e=>T.handleSwichDelivery(S.DeliveryTypeEnum.EXPRESS.value))},{default:l((()=>[s(I,null,{default:l((()=>[n("快递配送")])),_:1})])),_:1},8,["class"]),s(P,{class:i(["swiper-tab-item",{on:S.curDelivery==S.DeliveryTypeEnum.EXTRACT.value}]),onClick:x[1]||(x[1]=e=>T.handleSwichDelivery(S.DeliveryTypeEnum.EXTRACT.value))},{default:l((()=>[s(I,null,{default:l((()=>[n("上门自提")])),_:1})])),_:1},8,["class"])])),_:1})):r("",!0),S.curDelivery==S.DeliveryTypeEnum.EXPRESS.value?(t(),o(P,{key:1,onClick:T.onSelectAddress,class:"flow-delivery"},{default:l((()=>[s(P,{class:"flow-delivery__detail dis-flex flex-y-center"},{default:l((()=>[s(P,{class:"detail-location dis-flex"},{default:l((()=>[s(I,{class:"iconfont icon-dingwei"})])),_:1}),s(P,{class:"detail-content flex-box"},{default:l((()=>[S.order.address?(t(),p(m,{key:0},[s(P,{class:"detail-content__title dis-flex"},{default:l((()=>[s(I,{class:"f-30"},{default:l((()=>[n(u(S.order.address.name),1)])),_:1}),s(I,{class:"detail-content__title-phone f-28"},{default:l((()=>[n(u(S.order.address.phone),1)])),_:1})])),_:1}),s(P,{class:"address detail-content__describe"},{default:l((()=>[(t(!0),p(m,null,h(S.order.address.region,((e,s)=>(t(),o(I,{class:"region",key:s},{default:l((()=>[n(u(e),1)])),_:2},1024)))),128)),s(I,{class:"detail"},{default:l((()=>[n(u(S.order.address.detail),1)])),_:1})])),_:1})],64)):(t(),o(P,{key:1,class:"detail-content__describe dis-flex"},{default:l((()=>[s(I,{class:"col-6"},{default:l((()=>[n("请选择配送地址")])),_:1})])),_:1}))])),_:1}),s(P,{class:"detail-arrow dis-flex"},{default:l((()=>[s(I,{class:"iconfont icon-arrow-right"})])),_:1})])),_:1})])),_:1},8,["onClick"])):r("",!0),S.curDelivery==S.DeliveryTypeEnum.EXTRACT.value?(t(),p(m,{key:2},[s(P,{class:"flow-delivery",onClick:x[2]||(x[2]=e=>T.onSelectExtractPoint())},{default:l((()=>[s(P,{class:"flow-delivery__detail dis-flex flex-y-center"},{default:l((()=>[s(P,{class:"detail-location dis-flex"},{default:l((()=>[s(I,{class:"iconfont icon-dingwei"})])),_:1}),s(P,{class:"detail-content flex-box"},{default:l((()=>[S.order.extractShop.shop_id?(t(),p(m,{key:0},[s(P,{class:"detail-content__title dis-flex"},{default:l((()=>[s(I,{class:"f-30"},{default:l((()=>[n(u(S.order.extractShop.shop_name),1)])),_:1})])),_:1}),s(P,{class:"detail-content__describe"},{default:l((()=>[s(I,{class:"col-7"},{default:l((()=>[n(u(S.order.extractShop.region.province)+" "+u(S.order.extractShop.region.city),1)])),_:1}),s(I,{class:"col-7"},{default:l((()=>[n(u(S.order.extractShop.region.region)+" "+u(S.order.extractShop.address),1)])),_:1})])),_:1})],64)):(t(),o(P,{key:1,class:"detail-content__describe dis-flex"},{default:l((()=>[s(I,{class:"col-6"},{default:l((()=>[n("请选择自提点")])),_:1})])),_:1}))])),_:1}),s(P,{class:"detail-arrow dis-flex"},{default:l((()=>[s(I,{class:"iconfont icon-arrow-right user-orderJtou"})])),_:1})])),_:1})])),_:1}),s(P,{class:"flow-extract-contact b-f"},{default:l((()=>[s(P,{class:"contact-item dis-flex"},{default:l((()=>[s(P,{class:"item-label dis-flex flex-x-end flex-y-center"},{default:l((()=>[s(I,null,{default:l((()=>[n("联系人:")])),_:1})])),_:1}),s(P,{class:"item-ipt flex-box dis-flex flex-y-center"},{default:l((()=>[s(D,{class:"input flex-box",placeholder:"请填写联系人姓名",modelValue:S.linkman,"onUpdate:modelValue":x[3]||(x[3]=e=>S.linkman=e)},null,8,["modelValue"])])),_:1})])),_:1}),s(P,{class:"contact-item dis-flex"},{default:l((()=>[s(P,{class:"item-label dis-flex flex-x-end flex-y-center"},{default:l((()=>[s(I,null,{default:l((()=>[n("联系电话:")])),_:1})])),_:1}),s(P,{class:"item-ipt flex-box dis-flex flex-y-center"},{default:l((()=>[s(D,{class:"input flex-box",placeholder:"请填写联系电话",modelValue:S.phone,"onUpdate:modelValue":x[4]||(x[4]=e=>S.phone=e)},null,8,["modelValue"])])),_:1})])),_:1})])),_:1})],64)):r("",!0)],64)):r("",!0),(t(!0),p(m,null,h(S.order.goodsList,((e,a)=>(t(),o(P,{class:"checkout_list",key:a},{default:l((()=>[s(P,{class:"flow-shopList dis-flex","data-index":"index",onClick:t=>T.onTargetGoods(e.goods_id)},{default:l((()=>[s(P,{class:"flow-list-left"},{default:l((()=>[s(O,{mode:"scaleToFill",src:e.goods_image},null,8,["src"])])),_:2},1024),s(P,{class:"flow-list-right flex-box"},{default:l((()=>[s(I,{class:"goods-name twoline-hide"},{default:l((()=>[n(u(e.goods_name),1)])),_:2},1024),s(P,{class:"goods-props clearfix"},{default:l((()=>[(t(!0),p(m,null,h(e.skuInfo.goods_props,((e,a)=>(t(),o(P,{class:"goods-props-item",key:a},{default:l((()=>[s(I,{class:"group-name"},{default:l((()=>[n(u(e.group.name)+": ",1)])),_:2},1024),s(I,null,{default:l((()=>[n(u(e.value.name)+";",1)])),_:2},1024)])),_:2},1024)))),128))])),_:2},1024),s(P,{class:"flow-list-cont dis-flex flex-x-between flex-y-center"},{default:l((()=>[s(I,{class:"small"},{default:l((()=>[n("×"+u(e.total_num),1)])),_:2},1024),s(I,{class:i(["flow-cont",[e.is_user_grade?"price-delete":""]])},{default:l((()=>[n("¥"+u(e.goods_price),1)])),_:2},1032,["class"])])),_:2},1024),e.is_user_grade?(t(),o(P,{key:0,class:"grade-price"},{default:l((()=>[s(I,null,{default:l((()=>[n("会员折扣价:¥"+u(e.grade_goods_price),1)])),_:2},1024)])),_:2},1024)):r("",!0)])),_:2},1024)])),_:2},1032,["onClick"])])),_:2},1024)))),128)),s(P,{class:"flow-num-box b-f"},{default:l((()=>[s(I,null,{default:l((()=>[n("共"+u(S.order.orderTotalNum)+"件商品",1)])),_:1})])),_:1}),s(P,{class:"flow-all-money b-f m-top20"},{default:l((()=>[s(P,{class:"flow-all-list dis-flex"},{default:l((()=>[s(I,{class:"flex-five"},{default:l((()=>[n("订单总金额:")])),_:1}),s(P,{class:"flex-five t-r"},{default:l((()=>[s(I,{class:"col-m"},{default:l((()=>[n("¥"+u(S.order.orderTotalPrice),1)])),_:1})])),_:1})])),_:1}),f.$checkModule("market-coupon")?(t(),o(P,{key:0,class:"flow-all-list dis-flex"},{default:l((()=>[s(I,{class:"flex-five"},{default:l((()=>[n("优惠券:")])),_:1}),s(P,{class:"flex-five t-r"},{default:l((()=>[S.order.couponList.length>0?(t(),o(P,{key:0,onClick:x[5]||(x[5]=e=>T.handleShowPopup())},{default:l((()=>[S.order.couponId>0?(t(),o(I,{key:0,class:"col-m"},{default:l((()=>[n("-¥"+u(S.order.couponMoney),1)])),_:1})):(t(),o(I,{key:1,class:"col-m"},{default:l((()=>[n("有"+u(S.order.couponList.length)+"张优惠券",1)])),_:1})),s(I,{class:"right-arrow iconfont icon-arrow-right"})])),_:1})):(t(),o(I,{key:1,class:""},{default:l((()=>[n("无优惠券可用")])),_:1}))])),_:1})])),_:1})):r("",!0),f.$checkModule("market-points")&&S.order.isAllowPoints?(t(),o(P,{key:1,class:"points flow-all-list dis-flex flex-y-center"},{default:l((()=>[s(P,{class:"block-left flex-five",onClick:x[6]||(x[6]=e=>T.handleShowPoints())},{default:l((()=>[s(I,{class:"title"},{default:l((()=>[n("可用"+u(S.setting.points_name)+"抵扣:",1)])),_:1}),s(I,{class:"iconfont icon-help"})])),_:1}),s(P,{class:"flex-five dis-flex flex-x-end flex-y-center"},{default:l((()=>[s(I,{class:"points-money col-m"},{default:l((()=>[n("-¥"+u(S.order.pointsMoney),1)])),_:1}),s($,{modelValue:S.isUsePoints,"onUpdate:modelValue":x[7]||(x[7]=e=>S.isUsePoints=e),size:"48","active-color":"#07c160",onChange:x[8]||(x[8]=e=>T.getOrderData())},null,8,["modelValue"])])),_:1})])),_:1})):r("",!0),S.curDelivery==S.DeliveryTypeEnum.EXPRESS.value?(t(),o(P,{key:2,class:"dis-flex flow-all-list"},{default:l((()=>[s(I,{class:"flex-five"},{default:l((()=>[n("配送费用:")])),_:1}),s(P,{class:"flex-five t-r"},{default:l((()=>[S.order.address?(t(),o(P,{key:0},{default:l((()=>[S.order.isIntraRegion?(t(),o(I,{key:0,class:"col-m"},{default:l((()=>[n("+¥"+u(S.order.expressPrice),1)])),_:1})):(t(),o(I,{key:1},{default:l((()=>[n("不在配送范围")])),_:1}))])),_:1})):(t(),o(P,{key:1},{default:l((()=>[s(I,{class:"col-7"},{default:l((()=>[n("请先选择配送地址")])),_:1})])),_:1}))])),_:1})])),_:1})):r("",!0)])),_:1}),s(P,{class:"flow-all-money b-f m-top20"},{default:l((()=>[s(P,{class:"ipt-wrapper flow-all-list"},{default:l((()=>[s(D,{class:"input",modelValue:S.remark,"onUpdate:modelValue":x[9]||(x[9]=e=>S.remark=e),placeholder:"选填:买家留言(50字以内)"},null,8,["modelValue"])])),_:1})])),_:1}),s(P,{class:"flow-fixed-footer b-f m-top10"},{default:l((()=>[s(P,{class:"dis-flex chackout-box"},{default:l((()=>[s(P,{class:"chackout-left pl-12"},{default:l((()=>[n("实付款: "),s(I,{class:"col-m"},{default:l((()=>[n("¥"+u(S.order.orderPayPrice),1)])),_:1})])),_:1}),s(P,{class:"chackout-right",onClick:x[10]||(x[10]=e=>T.onSubmitOrder())},{default:l((()=>[s(P,{class:i(["flow-btn f-32",{disabled:S.disabled}])},{default:l((()=>[n("提交订单")])),_:1},8,["class"])])),_:1})])),_:1})])),_:1}),s(j,{modelValue:S.showPoints,"onUpdate:modelValue":x[11]||(x[11]=e=>S.showPoints=e),title:`${S.setting.points_name}说明`},{default:l((()=>[s(U,{class:"points-content","scroll-y":!0},{default:l((()=>[s(I,null,{default:l((()=>[n(u(S.setting.points_describe),1)])),_:1})])),_:1})])),_:1},8,["modelValue","title"]),s(z,{modelValue:S.showPopup,"onUpdate:modelValue":x[13]||(x[13]=e=>S.showPopup=e),mode:"bottom"},{default:l((()=>[s(P,{class:"popup__coupon"},{default:l((()=>[s(P,{class:"coupon__title f-30"},{default:l((()=>[n("选择优惠券")])),_:1}),s(P,{class:"coupon-list"},{default:l((()=>[s(U,{"scroll-y":!0,style:{height:"565rpx"}},{default:l((()=>[(t(!0),p(m,null,h(S.order.couponList,((e,a)=>(t(),o(P,{class:"coupon-item",key:a},{default:l((()=>[s(P,{class:i(["item-wrapper",[e.is_apply?"color-"+S.CouponColors[a%S.CouponColors.length]:"color-gray"]]),onClick:e=>T.handleSelectCoupon(a)},{default:l((()=>[s(P,{class:"coupon-type"},{default:l((()=>[n(u(S.CouponTypeEnum[e.coupon_type].name),1)])),_:2},1024),s(P,{class:"tip dis-flex flex-dir-column flex-x-center"},{default:l((()=>[e.coupon_type==S.CouponTypeEnum.FULL_DISCOUNT.value?(t(),o(P,{key:0},{default:l((()=>[s(I,{class:"f-30"},{default:l((()=>[n("¥")])),_:1}),s(I,{class:"money"},{default:l((()=>[n(u(e.reduce_price),1)])),_:2},1024)])),_:2},1024)):r("",!0),e.coupon_type==S.CouponTypeEnum.DISCOUNT.value?(t(),o(I,{key:1,class:"money"},{default:l((()=>[n(u(e.discount)+"折",1)])),_:2},1024)):r("",!0),s(I,{class:"pay-line"},{default:l((()=>[n("满"+u(e.min_price)+"元可用",1)])),_:2},1024)])),_:2},1024),s(P,{class:"split-line"}),s(P,{class:"content dis-flex flex-dir-column flex-x-between"},{default:l((()=>[s(P,{class:"title"},{default:l((()=>[n(u(e.name),1)])),_:2},1024),s(P,{class:"bottom dis-flex flex-y-center"},{default:l((()=>[s(P,{class:"time flex-box"},{default:l((()=>[e.start_time===e.end_time?(t(),p(m,{key:0},[n(u(e.start_time)+" 当天有效",1)],64)):(t(),p(m,{key:1},[n(u(e.start_time)+"~"+u(e.end_time),1)],64))])),_:2},1024)])),_:2},1024)])),_:2},1024)])),_:2},1032,["class","onClick"])])),_:2},1024)))),128))])),_:1})])),_:1}),s(P,{class:"coupon__do_not dis-flex flex-y-center flex-x-center"},{default:l((()=>[s(P,{class:"control dis-flex flex-y-center flex-x-center",onClick:x[12]||(x[12]=e=>T.handleNotUseCoupon())},{default:l((()=>[s(I,{class:"f-26"},{default:l((()=>[n("不使用优惠券")])),_:1})])),_:1})])),_:1})])),_:1})])),_:1},8,["modelValue"])])),_:1})):r("",!0),s(N,{ref:"uToast"},null,512)])),_:1},8,["style"])}],["__scopeId","data-v-8c052e9f"]]);export{Z as default};
|
|
|