var m=(e,a,t)=>new Promise((o,s)=>{var l=r=>{try{c(t.next(r))}catch(p){s(p)}},_=r=>{try{c(t.throw(r))}catch(p){s(p)}},c=r=>r.done?o(r.value):Promise.resolve(r.value).then(l,_);c((t=t.apply(e,a)).next())});import{_ as w,c as S,w as i,aC as j,a0 as x,aF as P,f,o as C,k as n,j as E,v as k,l as L,q as H,p as d,t as N}from"./index-CZJgrp0v.js";import{_ as g}from"./bottomButton.DlIqw7or.js";import{g as M,a as A,b as B,t as F,_ as h,u as $}from"./useDetailHooks.IT9eMYjn.js";import{s as V}from"./shareMixins.ChVt00HZ.js";import{g as U,c as q}from"./eventJava.C13-6nEn.js";import"./uv-button.DwAMxj01.js";import"./themeMixins.C76yI6bA.js";/* empty css                                                                     */import"./index.RI71f-uW.js";import"./htmlPreviewTransfer.DE5baVnN.js";import"./uv-tabs.Dgbny3zs.js";import"./index.Bx0cUUlf.js";import"./uv-line-progress.Fpuf9PUr.js";import"./common.D2w6zaJ1.js";import"./activityListItem.DfhT9o0a.js";import"./dayjs.min.17IgkfKq.js";const G={name:"matchDetail",setup(){const{topHedaerInfo:e,formatTopHedaerInfo:a,eventDesInfoData:t,formatEventDesInfoData:o}=$();return{topHedaerInfo:e,formatTopHedaerInfo:a,eventDesInfoData:t,formatEventDesInfoData:o}},mixins:[V],components:{navBar:h,topHedaer:F,groupData:B,groupDataDes:A,groupSelectDialog:M,bottomButton:g},data(){return{navColor:"transparent",eventId:null,shareI:P,matchDetailInfo:{images_url:[],tag_ids:""},groupProjectList:[]}},computed:{joinNumber(){return this.matchDetailInfo.applyNumberLimit-this.matchDetailInfo.appliedNumber},btnStatus(){return"立即报名"},btnDisabled(){return this.matchDetailInfo.status!=1},applyStatus(){return"立即报名"}},onLoad(e){return m(this,null,function*(){this.eventId=e.eventId,window.addEventListener("message",this.onMessageFromParent),window.parent.postMessage({type:"H5_READY"},"*")})},onUnload(){window.removeEventListener("message",this.onMessageFromParent)},methods:{onMessageFromParent(e){let a=e.data;try{let{data:t,moduleType:o,subModuleType:s}=JSON.parse(a);o=="EVENT_ADD"&&s=="groupItem"&&(this.groupProjectList=t),o=="EVENT_ADD"&&s=="baseInfo"&&(this.formatTopHedaerInfo(t),this.formatEventDesInfoData(t))}catch(t){console.error("onMessageFromParent",t)}},handleSelectProject(e){console.log("handleSelectProject",e);let a="/pages/matchPart/signUpModule/index",t={eventId:this.eventId,eventTermId:e.eventTermId,eventProjectType:this.matchDetailInfo.eventProjectType},o=`${a}?${j(t)}`;x({url:o})},showSelectDialog(){this.$refs.selectDialog.open()},closeSelectDialog(){this.$refs.selectDialog.close()},onChange(e){this.timeData=e},clickToApply(){return m(this,null,function*(){console.log("clickToApply")})},getWxActivityDetail(e){return m(this,null,function*(){let a=yield q(e),{data:t,code:o}=a;if(o!==0){this.$showToastNone(a.msg);return}this.matchDetailInfo=t,this.formatTopHedaerInfo(t),this.formatEventDesInfoData(t)})},getEventGroupList(e){return m(this,null,function*(){let a=yield U(e),{data:t,code:o}=a;if(o!==0){this.$showToastNone(a.msg);return}this.groupProjectList=t})}}};function O(e,a,t,o,s,l){const _=h,c=f("topHedaer"),r=f("groupData"),p=f("groupDataDes"),D=L,u=E,v=H,I=k,y=g,b=f("groupSelectDialog"),T=f("layout-default-uni");return C(),S(T,null,{default:i(()=>[n(u,{class:"train-detail-container"},{default:i(()=>[n(_,{navColor:s.navColor,title:"活动详情",titleColor:"#323233",backColor:"#323233",showBack:!0},null,8,["navColor"]),n(c,{showInfo:o.topHedaerInfo,isOpr:!1},null,8,["showInfo"]),n(r,{info:s.groupProjectList},null,8,["info"]),n(p,{info:o.eventDesInfoData},null,8,["info"]),n(u,{class:"card-container"},{default:i(()=>[n(u,{class:"train-footer"},{default:i(()=>[n(u,{class:"footer-main"},{default:i(()=>[n(I,{class:"share button","open-type":"share"},{default:i(()=>[n(u,{class:"icon"},{default:i(()=>[n(D,{src:s.shareI,class:"image"},null,8,["src"])]),_:1}),n(v,null,{default:i(()=>[d("分享")]),_:1})]),_:1}),n(y,{class:"apply-btn",onCustomClick:l.clickToApply},{default:i(()=>[d(N(l.applyStatus),1)]),_:1},8,["onCustomClick"])]),_:1})]),_:1})]),_:1}),n(b,{info:s.matchDetailInfo,projectInfo:s.groupProjectList,ref:"selectDialog",onSubmit:l.handleSelectProject},null,8,["info","projectInfo","onSubmit"])]),_:1})]),_:1})}const lt=w(G,[["render",O],["__scopeId","data-v-2f3c69c0"]]);export{lt as default};
