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
6.8 KiB
1 lines
6.8 KiB
import{ac as s,K as a,ad as e,o as t,c as o,w as l,n as i,e as d,i as u,a as n,f as r,t as c,b as p,d as m,F as _,k as g,g as f,r as h,V as k,S,x as y}from"./index-ae8bbb19.js";import{_ as w}from"./u-modal.b5d074c6.js";import{r as j}from"./uni-app.es.ee1d5b08.js";import{W as v}from"./wxofficial.cfa745b7.js";import{A as T}from"./index.0c0be40a.js";import{C as x}from"./index.002ef29d.js";import{R as I}from"./index.b9e5c444.js";import{S as b}from"./SkuPopup.f6422807.js";import{A as P,a as C,T as A}from"./ActiveStatus.281bae5f.js";import{d as E}from"./task.c545452c.js";import{G as L}from"./Setting.e2895b21.js";import{_ as R}from"./_plugin-vue_export-helper.1b428a4d.js";import"./u-loading.01f91c7b.js";import"./u-popup.d74d5514.js";import"./u-icon.b463ad8a.js";import"./index.c0835ba6.js";import"./color.813a9497.js";const M=R({components:{AvatarImage:T,SkuPopup:b,CountDown:x,Recommended:I},mixins:[v],data:()=>({isLoading:!0,ActiveTypeEnum:P,ActiveStatusEnum:C,TaskStatusEnum:A,showRules:!1,showSkuPopup:!1,skuMode:3,taskId:null,detail:null,goods:null,setting:{}}),onLoad({taskId:s}){this.taskId=s,this.getSetting(),this.getTaskDetail()},methods:{getSetting(){L.data().then((s=>this.setting=s))},getTaskDetail(){const{taskId:s}=this;this.isLoading=!0,E(s).then((s=>{this.detail=s.data.detail,this.goods=s.data.goods,this.setWxofficialShareData()})).finally((()=>this.isLoading=!1))},onTargetGoods(){const{goods:s}=this;this.$navTo("pages/groupon/goods/index",{grouponGoodsId:s.groupon_goods_id})},handleShareBtn(){this.handleCopyLink()},handleCopyLink(){const s=this;s.getShareUrl().then((a=>{uni.setClipboardData({data:a,success:()=>s.$toast("复制链接成功,快去发送给朋友吧"),fail:a=>s.$toast("复制失败")})}))},getShareUrl(){const{path:t,query:o}=s();return new Promise(((s,l)=>{a.h5Url().then((a=>{const l=e(a,t,o);s(l)}))}))},handleShowRules(){this.showRules=!0},onShowSkuPopup(){this.showSkuPopup=!this.showSkuPopup},setWxofficialShareData(){const{detail:s,goods:a}=this;this.updateShareCardData({title:a.goods_name,desc:a.selling_point,imgUrl:a.goods_image})}},onShareAppMessage(){const s=this,a=s.$getShareUrlParams({taskId:s.taskId});return{title:s.goods.goods_name,path:`/pages/groupon/task/index?${a}`}},onShareTimeline(){const s=this,a=s.$getShareUrlParams({taskId:s.taskId});return{title:s.goods.goods_name,path:`/pages/groupon/task/index?${a}`}}},[["render",function(s,a,e,v,T,x){const I=u,b=g,P=f,C=h("avatar-image"),A=h("count-down"),E=k,L=h("SkuPopup"),R=S,M=j(y("u-modal"),w),U=h("recommended");return!T.isLoading&&T.detail&&T.goods?(t(),o(I,{key:0,class:"container",style:i(s.appThemeStyle)},{default:l((()=>[n(I,{class:"bg-layer"}),n(I,{class:"goods-info",onClick:a[0]||(a[0]=s=>x.onTargetGoods())},{default:l((()=>[n(I,{class:"goods-image"},{default:l((()=>[T.detail.active_type!=T.ActiveTypeEnum.NORMAL.value?(t(),o(I,{key:0,class:"label"},{default:l((()=>[n(b,null,{default:l((()=>[r(c(T.ActiveTypeEnum[T.detail.active_type].name2),1)])),_:1})])),_:1})):d("",!0),n(P,{class:"image",src:T.goods.goods_image},null,8,["src"])])),_:1}),n(I,{class:"goods-detail"},{default:l((()=>[n(I,{class:"goods-name"},{default:l((()=>[n(b,{class:"twoline-hide"},{default:l((()=>[r(c(T.goods.goods_name),1)])),_:1})])),_:1}),n(I,{class:"goods-price"},{default:l((()=>[n(b,{class:"f-26 col-m"},{default:l((()=>[r("¥")])),_:1}),n(b,{class:"m-price"},{default:l((()=>[r(c(T.goods.groupon_price),1)])),_:1}),n(b,{class:"line-price"},{default:l((()=>[r("¥"+c(T.goods.original_price),1)])),_:1})])),_:1}),n(I,{class:"goods-tag"},{default:l((()=>[n(b,{class:"tag-item"},{default:l((()=>[r(c(T.detail.people)+"人团",1)])),_:1}),"0.00"!=T.goods.diff_price?(t(),o(b,{key:0,class:"tag-item"},{default:l((()=>[r("拼团省"+c(T.goods.diff_price)+"元",1)])),_:1})):d("",!0)])),_:1})])),_:1})])),_:1}),n(I,{class:"main"},{default:l((()=>[T.detail.status==T.TaskStatusEnum.FAIL.value?(t(),o(I,{key:0,class:"main_status main_status__fail"},{default:l((()=>[n(b,{class:"status-icon iconfont icon-shibai"}),n(b,null,{default:l((()=>[r("超过有效时间,拼团失败")])),_:1})])),_:1})):d("",!0),T.detail.status==T.TaskStatusEnum.SUCCESS.value?(t(),o(I,{key:1,class:"main_status main_status__success"},{default:l((()=>[n(b,{class:"status-icon iconfont icon-success"}),n(b,null,{default:l((()=>[r("拼团已成功")])),_:1})])),_:1})):d("",!0),n(I,{class:"main-user"},{default:l((()=>[(t(!0),p(_,null,m(T.detail.users,((s,a)=>(t(),o(I,{key:s.id,class:"user-item"},{default:l((()=>[n(C,{url:s.userInfo.avatar_url,width:100},null,8,["url"]),s.is_leader?(t(),o(I,{key:0,class:"user-role"},{default:l((()=>[n(b,{class:"role-name"},{default:l((()=>[r("团长")])),_:1})])),_:1})):d("",!0)])),_:2},1024)))),128)),(t(!0),p(_,null,m(T.detail.people-T.detail.joined_people,((s,a)=>(t(),o(I,{key:a,class:"user-item user-item__wait"},{default:l((()=>[n(b,{class:"iconfont icon-wenhao"})])),_:2},1024)))),128))])),_:1}),T.detail.status==T.TaskStatusEnum.NORMAL.value?(t(),o(I,{key:2,class:"main_tiem"},{default:l((()=>[n(b,null,{default:l((()=>[r("还差")])),_:1}),n(b,{class:"main_timer_color"},{default:l((()=>[r(c(T.detail.people-T.detail.joined_people),1)])),_:1}),n(b,null,{default:l((()=>[r("个名额,")])),_:1}),n(A,{date:T.detail.end_time,separator:"colon",theme:"custom",customBgColor:"#FE5246"},null,8,["date"]),n(b,null,{default:l((()=>[r("后结束")])),_:1})])),_:1})):d("",!0),T.detail.status==T.TaskStatusEnum.NORMAL.value?(t(),p(_,{key:3},[T.detail.is_join?(t(),o(E,{key:1,"open-type":"share",class:"button btn-normal",onClick:a[2]||(a[2]=s=>x.handleShareBtn())},{default:l((()=>[n(I,{class:"btn-item btn-item__main"},{default:l((()=>[n(b,null,{default:l((()=>[r("立即分享")])),_:1})])),_:1})])),_:1})):(t(),o(I,{key:0,class:"button",onClick:a[1]||(a[1]=s=>x.onShowSkuPopup())},{default:l((()=>[r("立即参团")])),_:1}))],64)):(t(),o(I,{key:4,class:"button",onClick:a[3]||(a[3]=s=>x.onTargetGoods())},{default:l((()=>[r("去开团")])),_:1}))])),_:1}),n(I,{class:"notice",onClick:a[4]||(a[4]=s=>x.handleShowRules())},{default:l((()=>[n(b,{class:"f-30"},{default:l((()=>[r("拼团须知")])),_:1}),n(b,{class:"t-brief"},{default:l((()=>[r(c(T.setting.ruleBrief),1)])),_:1}),n(b,{class:"icon-arrow"})])),_:1}),n(L,{modelValue:T.showSkuPopup,"onUpdate:modelValue":a[5]||(a[5]=s=>T.showSkuPopup=s),skuMode:T.skuMode,goods:T.goods,buyMode:1,taskId:T.detail.task_id,stepPeople:T.detail.people},null,8,["modelValue","skuMode","goods","taskId","stepPeople"]),n(M,{modelValue:T.showRules,"onUpdate:modelValue":a[6]||(a[6]=s=>T.showRules=s),title:"拼团规则"},{default:l((()=>[n(R,{style:{height:"610rpx","touch-action":"none"},"scroll-y":!0},{default:l((()=>[n(I,{class:"pops-content"},{default:l((()=>[n(b,null,{default:l((()=>[r(c(T.setting.ruleDetail),1)])),_:1})])),_:1})])),_:1})])),_:1},8,["modelValue"]),n(U)])),_:1},8,["style"])):d("",!0)}],["__scopeId","data-v-1e95bc6c"]]);export{M as default};
|
|
|