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
14 KiB
1 lines
14 KiB
import{o as e,c as s,w as o,a as t,f as a,b as l,d as n,F as i,n as d,e as u,l as c,i as r,r as f,j as m,y as _,t as p,z as g,Z as h,v as x,x as k,U as S}from"./index-4ddb689d.js";import{_ as y}from"./mp-html.2b6407c3.js";import{r as w}from"./uni-app.es.24af5d4f.js";import{_ as v}from"./u-modal.9219359e.js";import{W as b}from"./wxofficial.956096a5.js";import{S as C,a as T,C as A}from"./Comment.8cab973f.js";import{C as I}from"./index.cdfc996d.js";import{S as j}from"./SkuPopup.ff6d3645.js";import{A as L}from"./index.1169d7d7.js";import{C as P}from"./index.994d85b2.js";import{l as M}from"./task.07a4f689.js";import{_ as G}from"./_plugin-vue_export-helper.1b428a4d.js";import{p as E,d as V}from"./goods.fb80a30a.js";import{t as R}from"./cart.86d426b5.js";import{A as U,a as D}from"./ActiveStatus.2bcdf502.js";import"./u-loading.7bd69747.js";import"./u-popup.37b3343e.js";import"./u-icon.e981d1c2.js";import"./comment.083546cf.js";import"./color.813a9497.js";const $=G({components:{ShareSheet:C,CustomerBtn:I,SlideImage:T,TaskList:G({components:{AvatarImage:L,CountDown:P},props:{grouponGoodsId:{type:Number,default:null},list:{type:Array,default:[]}},data:()=>({showMore:!1,moreList:[]}),methods:{onShowMore(){const e=this;e.moreList.length?e.showMore=!0:M(e.grouponGoodsId).then((s=>{e.moreList=s.data.list,e.showMore=!0}))},onTargetTask(e){this.$navTo("pages/groupon/task/index",{taskId:e})}}},[["render",function(g,h,x,k,S,y){const b=c,C=r,T=f("avatar-image"),A=f("count-down"),I=m,j=w(_("u-modal"),v);return x.list.length?(e(),s(C,{key:0,class:"goods-task m-top20",style:d(g.appThemeStyle)},{default:o((()=>[t(C,{class:"item-title dis-flex"},{default:o((()=>[t(C,{class:"block-left flex-box"},{default:o((()=>[t(b,null,{default:o((()=>[a("进行中的团购")])),_:1})])),_:1}),t(C,{class:"block-right"},{default:o((()=>[t(b,{class:"iconfont icon-arrow-right col-9",onClick:h[0]||(h[0]=e=>y.onShowMore())})])),_:1})])),_:1}),t(C,{class:"task-list"},{default:o((()=>[(e(!0),l(i,null,n(x.list,((l,n)=>(e(),s(C,{class:"task-item",key:n},{default:o((()=>[t(C,{class:"user-info"},{default:o((()=>[t(C,{class:"user-avatar"},{default:o((()=>[t(T,{url:l.user.avatar_url,width:60},null,8,["url"])])),_:2},1024),t(b,{class:"user-name oneline-hide"},{default:o((()=>[a(p(l.user.nick_name),1)])),_:2},1024)])),_:2},1024),t(C,{class:"task-status"},{default:o((()=>[t(C,{class:"people"},{default:o((()=>[t(b,null,{default:o((()=>[a("还差")])),_:1}),t(b,{class:"col-m"},{default:o((()=>[a(p(l.surplus_people)+"人",1)])),_:2},1024),t(b,null,{default:o((()=>[a("成团")])),_:1})])),_:2},1024),t(C,{class:"count-down"},{default:o((()=>[t(b,null,{default:o((()=>[a("剩余")])),_:1}),t(A,{date:l.end_time,separator:"colon",theme:"text"},null,8,["date"])])),_:2},1024)])),_:2},1024),t(C,{class:"item-action"},{default:o((()=>[t(C,{class:"button",onClick:e=>y.onTargetTask(l.task_id)},{default:o((()=>[a("去参团")])),_:2},1032,["onClick"])])),_:2},1024)])),_:2},1024)))),128))])),_:1}),t(j,{modelValue:S.showMore,"onUpdate:modelValue":h[1]||(h[1]=e=>S.showMore=e),title:"可参与的拼单"},{default:o((()=>[t(I,{style:{"max-height":"610rpx","touch-action":"none"},"scroll-y":!0},{default:o((()=>[t(C,{class:"pops-content"},{default:o((()=>[(e(!0),l(i,null,n(S.moreList,((l,n)=>(e(),s(C,{class:"task-item",key:n},{default:o((()=>[t(C,{class:"user-info"},{default:o((()=>[t(C,{class:"user-avatar"},{default:o((()=>[t(T,{url:l.user.avatar_url,width:60},null,8,["url"])])),_:2},1024),t(b,{class:"user-name oneline-hide"},{default:o((()=>[a(p(l.user.nick_name),1)])),_:2},1024)])),_:2},1024),t(C,{class:"item-action"},{default:o((()=>[t(C,{class:"button",onClick:e=>y.onTargetTask(l.task_id)},{default:o((()=>[a("去参团")])),_:2},1032,["onClick"])])),_:2},1024)])),_:2},1024)))),128))])),_:1})])),_:1})])),_:1},8,["modelValue"])])),_:1},8,["style"])):u("",!0)}],["__scopeId","data-v-8b507ab9"]]),SkuPopup:j,Comment:A,CountDown:P},mixins:[b],data:()=>({isLoading:!0,ActiveTypeEnum:U,ActiveStatusEnum:D,showSkuPopup:!1,skuMode:3,buyMode:1,showShareSheet:!1,posterApiCall:E,showRules:!1,setting:{},grouponGoodsId:null,goods:{},cartTotal:0,isShowCustomerBtn:!1}),async onLoad(e){this.onRecordQuery(e),this.onRefreshPage(),this.isShowCustomerBtn=await g.isShowCustomerBtn()},methods:{onRecordQuery(e){const s=h(e);this.grouponGoodsId=e.grouponGoodsId?parseInt(e.grouponGoodsId):parseInt(s.gid)},onRefreshPage(){const e=this;e.isLoading=!0,Promise.all([e.getActiveDetail(),e.getCartTotal()]).then((()=>e.setWxofficialShareData())).finally((()=>e.isLoading=!1))},getActiveDetail(){const e=this;return new Promise(((s,o)=>{V(e.grouponGoodsId).then((o=>{e.goods=o.data.detail,e.setting=o.data.setting,s(o)})).catch(o)}))},getCartTotal(){const e=this;return new Promise(((s,o)=>{R().then((o=>{e.cartTotal=o.data.cartTotal,s(o)})).catch(o)}))},handleShowRules(){this.showRules=!0},onShowSkuPopup(e=1){this.buyMode=e,this.showSkuPopup=!this.showSkuPopup},onShowShareSheet(){this.showShareSheet=!this.showShareSheet},onTargetHome(e){this.$navTo("pages/index/index")},onTargetCart(){this.$navTo("pages/cart/index")},setWxofficialShareData(){const{goods:e}=this;this.updateShareCardData({title:e.goods_name,desc:e.selling_point,imgUrl:e.goods_image})}},onShareAppMessage(){const e=this,s=e.$getShareUrlParams({grouponGoodsId:e.grouponGoodsId});return{title:e.goods.goods_name,path:`/pages/groupon/goods/index?${s}`}},onShareTimeline(){const e=this,s=e.$getShareUrlParams({grouponGoodsId:e.grouponGoodsId});return{title:e.goods.goods_name,path:`/pages/groupon/goods/index?${s}`}}},[["render",function(g,h,b,C,T,A){const I=f("SlideImage"),j=c,L=r,P=S,M=f("count-down"),G=f("TaskList"),E=f("SkuPopup"),V=f("Comment"),R=w(_("mp-html"),y),U=f("customer-btn"),D=f("share-sheet"),$=m,B=w(_("u-modal"),v);return x((e(),s(L,{class:"container",style:d(g.appThemeStyle)},{default:o((()=>[T.isLoading?u("",!0):(e(),s(I,{key:0,video:T.goods.video,videoCover:T.goods.videoCover,images:T.goods.goods_images},null,8,["video","videoCover","images"])),T.isLoading?u("",!0):(e(),s(L,{key:1,class:"goods-info m-top20"},{default:o((()=>[t(L,{class:"info-item info-item__top dis-flex flex-x-between flex-y-end"},{default:o((()=>[t(L,{class:"block-left dis-flex flex-y-center"},{default:o((()=>[t(L,{class:"active-tag"},{default:o((()=>[t(j,null,{default:o((()=>[a(p(T.goods.active_type!=T.ActiveTypeEnum.NORMAL.value?T.ActiveTypeEnum[T.goods.active_type].name2:"多人拼团"),1)])),_:1})])),_:1}),t(j,{class:"floor-price__samll"},{default:o((()=>[a("¥")])),_:1}),t(j,{class:"floor-price"},{default:o((()=>[a(p(T.goods.groupon_price),1)])),_:1}),t(j,{class:"original-price"},{default:o((()=>[a("¥"+p(T.goods.original_price),1)])),_:1})])),_:1}),t(L,{class:"block-right dis-flex"},{default:o((()=>[t(L,{class:"goods-sales"},{default:o((()=>[t(j,null,{default:o((()=>[a("已抢"+p(T.goods.active_sales)+"件",1)])),_:1})])),_:1})])),_:1})])),_:1}),t(L,{class:"info-item info-item__name dis-flex flex-y-center"},{default:o((()=>[t(L,{class:"goods-name flex-box"},{default:o((()=>[t(j,{class:"twoline-hide"},{default:o((()=>[a(p(T.goods.goods_name),1)])),_:1})])),_:1}),t(L,{class:"goods-share__line"}),t(L,{class:"goods-share"},{default:o((()=>[t(P,{class:"share-btn dis-flex flex-dir-column",onClick:h[0]||(h[0]=e=>A.onShowShareSheet())},{default:o((()=>[t(j,{class:"share__icon iconfont icon-fenxiang"}),t(j,{class:"f-24"},{default:o((()=>[a("分享")])),_:1})])),_:1})])),_:1})])),_:1}),T.goods.selling_point?(e(),s(L,{key:0,class:"info-item info-item_selling-point"},{default:o((()=>[t(j,null,{default:o((()=>[a(p(T.goods.selling_point),1)])),_:1})])),_:1})):u("",!0),T.goods.active_status!=T.ActiveStatusEnum.STATE_END.value?(e(),s(L,{key:1,class:"info-item info-item_status info-item_countdown dis-flex flex-y-center"},{default:o((()=>[t(j,{class:"countdown-icon iconfont icon-naozhong"}),t(j,null,{default:o((()=>[a("距离拼团活动"+p(T.goods.active_status==T.ActiveStatusEnum.STATE_SOON.value?"开始":"结束"),1)])),_:1}),t(j,{class:"m-r-10"},{default:o((()=>[a("还剩")])),_:1}),t(M,{date:T.goods.end_time,separator:"zh",theme:"text"},null,8,["date"])])),_:1})):(e(),s(L,{key:2,class:"info-item info-item_status info-item_end"},{default:o((()=>[t(j,{class:"countdown-icon iconfont icon-naozhong"}),t(j,null,{default:o((()=>[a("拼团活动已结束,下次记得早点来哦~")])),_:1})])),_:1}))])),_:1})),T.isLoading?u("",!0):(e(),s(G,{key:2,grouponGoodsId:T.goods.groupon_goods_id,list:T.goods.taskQuickJoinList},null,8,["grouponGoodsId","list"])),20==T.goods.spec_type?(e(),s(L,{key:3,class:"goods-choice m-top20 b-f",onClick:h[1]||(h[1]=e=>A.onShowSkuPopup(1))},{default:o((()=>[t(L,{class:"spec-list"},{default:o((()=>[t(L,{class:"flex-box"},{default:o((()=>[t(j,{class:"col-8"},{default:o((()=>[a("选择:")])),_:1}),(e(!0),l(i,null,n(T.goods.specList,((t,l)=>(e(),s(j,{class:"spec-name",key:l},{default:o((()=>[a(p(t.spec_name),1)])),_:2},1024)))),128))])),_:1}),t(L,{class:"f-26 col-9 t-r"},{default:o((()=>[t(j,{class:"iconfont icon-arrow-right"})])),_:1})])),_:1})])),_:1})):u("",!0),t(L,{class:"rule-nav m-top20 b-f",onClick:h[2]||(h[2]=e=>A.handleShowRules())},{default:o((()=>[t(L,{class:"top-nav dis-flex flex-x-between"},{default:o((()=>[t(j,null,{default:o((()=>[a("拼团玩法")])),_:1}),t(j,{class:"f-25 col-9"},{default:o((()=>[a("查看规则")])),_:1})])),_:1}),t(L,{class:"rule-simple dis-flex flex-x-around"},{default:o((()=>[t(L,{class:"simple-item dis-flex flex-dir-column flex-y-center"},{default:o((()=>[t(L,{class:"i-number dis-flex flex-x-center flex-y-center"},{default:o((()=>[t(j,{class:"f-30"},{default:o((()=>[a("1")])),_:1})])),_:1}),t(L,{class:"i-text f-28"},{default:o((()=>[a("选择商品")])),_:1})])),_:1}),t(L,{class:"simple-item dis-flex flex-dir-column flex-y-center"},{default:o((()=>[t(L,{class:"i-number dis-flex flex-x-center flex-y-center"},{default:o((()=>[t(j,{class:"f-30"},{default:o((()=>[a("2")])),_:1})])),_:1}),t(L,{class:"i-text f-28"},{default:o((()=>[a("开团/参团")])),_:1})])),_:1}),t(L,{class:"simple-item dis-flex flex-dir-column flex-y-center"},{default:o((()=>[t(L,{class:"i-number dis-flex flex-x-center flex-y-center"},{default:o((()=>[t(j,{class:"f-30"},{default:o((()=>[a("3")])),_:1})])),_:1}),t(L,{class:"i-text f-28"},{default:o((()=>[a("邀请好友")])),_:1})])),_:1}),t(L,{class:"simple-item dis-flex flex-dir-column flex-y-center"},{default:o((()=>[t(L,{class:"i-number dis-flex flex-x-center flex-y-center"},{default:o((()=>[t(j,{class:"f-30"},{default:o((()=>[a("4")])),_:1})])),_:1}),t(L,{class:"i-text f-28"},{default:o((()=>[a("人满成团")])),_:1})])),_:1})])),_:1})])),_:1}),T.isLoading?u("",!0):(e(),s(E,{key:4,modelValue:T.showSkuPopup,"onUpdate:modelValue":h[3]||(h[3]=e=>T.showSkuPopup=e),skuMode:T.skuMode,goods:T.goods,buyMode:T.buyMode},null,8,["modelValue","skuMode","goods","buyMode"])),T.isLoading?u("",!0):(e(),s(V,{key:5,"goods-id":T.goods.goods_id,limit:2},null,8,["goods-id"])),T.isLoading?u("",!0):(e(),s(L,{key:6,class:"goods-content m-top20"},{default:o((()=>[t(L,{class:"item-title b-f"},{default:o((()=>[t(j,null,{default:o((()=>[a("商品描述")])),_:1})])),_:1}),""!=T.goods.content?(e(),s(L,{key:0,class:"goods-content__detail b-f"},{default:o((()=>[t(R,{content:T.goods.content},null,8,["content"])])),_:1})):u("",!0)])),_:1})),t(L,{class:"footer-fixed"},{default:o((()=>[t(L,{class:"footer-container"},{default:o((()=>[t(L,{class:"foo-item-fast"},{default:o((()=>[t(L,{class:"fast-item fast-item--home",onClick:A.onTargetHome},{default:o((()=>[t(L,{class:"fast-icon"},{default:o((()=>[t(j,{class:"iconfont icon-shouye"})])),_:1}),t(L,{class:"fast-text"},{default:o((()=>[t(j,null,{default:o((()=>[a("首页")])),_:1})])),_:1})])),_:1},8,["onClick"]),T.isShowCustomerBtn?(e(),s(U,{key:0},{default:o((()=>[t(L,{class:"fast-item"},{default:o((()=>[t(L,{class:"fast-icon"},{default:o((()=>[t(j,{class:"iconfont icon-kefu1"})])),_:1}),t(L,{class:"fast-text"},{default:o((()=>[t(j,null,{default:o((()=>[a("客服")])),_:1})])),_:1})])),_:1})])),_:1})):u("",!0),T.isShowCustomerBtn?u("",!0):(e(),s(L,{key:1,class:"fast-item fast-item--cart",onClick:A.onTargetCart},{default:o((()=>[T.cartTotal>0?(e(),s(L,{key:0,class:"fast-badge fast-badge--fixed"},{default:o((()=>[a(p(T.cartTotal>99?"99+":T.cartTotal),1)])),_:1})):u("",!0),t(L,{class:"fast-icon"},{default:o((()=>[t(j,{class:"iconfont icon-gouwuche"})])),_:1}),t(L,{class:"fast-text"},{default:o((()=>[t(j,null,{default:o((()=>[a("购物车")])),_:1})])),_:1})])),_:1},8,["onClick"]))])),_:1}),t(L,{class:"foo-item-btn"},{default:o((()=>[t(L,{class:"btn-wrapper"},{default:o((()=>[T.goods.active_status==T.ActiveStatusEnum.STATE_BEGIN.value?(e(),l(i,{key:0},[T.goods.is_alone_buy?(e(),s(L,{key:0,class:"btn-item btn-item-deputy",onClick:h[4]||(h[4]=e=>A.onShowSkuPopup(2))},{default:o((()=>[t(L,{class:"price"},{default:o((()=>[a("¥"+p(T.goods.original_price),1)])),_:1}),t(L,null,{default:o((()=>[a("单独购买")])),_:1})])),_:1})):u("",!0),t(L,{class:"btn-item btn-item-main",onClick:h[5]||(h[5]=e=>A.onShowSkuPopup(1))},{default:o((()=>[t(L,{class:"price"},{default:o((()=>[a("¥"+p(T.goods.groupon_price),1)])),_:1}),t(L,null,{default:o((()=>[a("发起拼团")])),_:1})])),_:1})],64)):(e(),s(L,{key:1,class:"btn-item btn-item-gray"},{default:o((()=>[t(j,null,{default:o((()=>[a(p(T.goods.active_status==T.ActiveStatusEnum.STATE_SOON.value?"活动未开始":"活动已结束"),1)])),_:1})])),_:1}))])),_:1})])),_:1})])),_:1})])),_:1}),t(D,{modelValue:T.showShareSheet,"onUpdate:modelValue":h[6]||(h[6]=e=>T.showShareSheet=e),shareTitle:T.goods.goods_name,shareImageUrl:T.goods.goods_image,posterApiCall:T.posterApiCall,posterApiParam:{grouponGoodsId:T.grouponGoodsId}},null,8,["modelValue","shareTitle","shareImageUrl","posterApiCall","posterApiParam"]),T.isLoading?u("",!0):(e(),s(B,{key:7,modelValue:T.showRules,"onUpdate:modelValue":h[7]||(h[7]=e=>T.showRules=e),title:"拼团规则"},{default:o((()=>[t($,{style:{height:"610rpx","touch-action":"none"},"scroll-y":!0},{default:o((()=>[t(L,{class:"pops-content"},{default:o((()=>[t(j,null,{default:o((()=>[a(p(T.setting.ruleDetail),1)])),_:1})])),_:1})])),_:1})])),_:1},8,["modelValue"]))])),_:1},8,["style"])),[[k,!T.isLoading]])}],["__scopeId","data-v-4b7966cc"]]);export{$ as default};
|
|
|