import{U as a,r as e,a4 as t,R as i,G as s,j as o,a3 as r,b as l,h as n,w as d,v as c,q as m,I as u,u as p,t as v,n as h,y as g,f,F as y,s as j,af as w,o as C,x as b}from"./vendor-jA_NIjzi.js";import{U as k,q as L,F as G,a4 as P,S as _,c6 as S}from"./common-utils-RDWuRZ1M.js";import{u as T}from"./hooks-niqU-NMW.js";import{_ as U,b as q,a_ as x,a0 as R}from"./common-store-kFD1YPwN.js";import I from"./index-wIxt3BP3.js";import{H as N}from"./Header-X_QfKFhH.js";import A from"./index-HQNdDqAi.js";import"./vendor-crypto-Vtl7-GZS.js";import"./vendor-mqtt-lYGapirz.js";/* empty css              */import"./SvgIcon-a1Rg7hQY.js";import"./wallet.api-iEDbrB2H.js";import"./BtnClose-8jXpWY6_.js";/* empty css              */import"./refresh-vUMpko_C.js";import"./loading-4EoYccBj.js";import"./DynamicDatePicker-knnOgl31.js";import"./index-432VaJCN.js";const H={class:"detail"},M=["src"],B={key:0,class:"detail-box"},D={class:"detail-box-top"},O=["innerHTML"],F={class:"jump-btn-wrap"},J=U({__name:"detail",setup(U){const{t:J}=a(),$=e(!0),z=e(!1),E=e(!1),K=e(!1),Q=t(),V=i(),W=q(),[X,Y]=T(),Z=s((()=>{var a;return null==(a=X.value)?void 0:a.message}));o((async()=>{const a=V.query.data;if(a)try{let e=JSON.parse(a);Y(e)}catch(e){Q.push({path:"/messageCenter"})}Z.value||Q.push({path:"/messageCenter"})}));const aa=async()=>{const a=Z.value.jumpType;if(1===a&&(0==Z.value.openType?k(Z.value.jumpUrl):window.location.href=Z.value.jumpUrl),2===a){W.showPartialLoading({maskClick:!1});const a={0:"/activity",1:"/recharge",2:"/mine/withdrawMoney",3:"/twoActivity",4:"/fundDetails",5:"/bettingRecords",6:"/welfareCenter",7:"/affiliate?tab=0",8:"/customerService"};if("1"===Z.value.jumpUrl)return W.clearPartialLoading({maskClick:!1}),void(L()?G("secondRecharge"):(E.value=!0,K.value=!0,W.clearPartialLoading({maskClick:!1})));let e=a[Z.value.jumpUrl];if(e){if(W.clearPartialLoading(),"/activity"===e&&L())return void G("toActivity");if("/bettingRecords"===e){if(L())return void G("secondBetRecords");z.value=!0}else if("/twoActivity"===e||"/welfareCenter"===e){if("twoActivity"===e&&L())return void G("toActivity");Q.push({path:e,query:{messageBack:1}})}else Q.push({path:e})}}if(3===a)try{let e=JSON.parse(Z.value.jumpUrl);const t=await x({id:e.gameId});1==t.data.config?k(t.data.data):Q.push({path:"/ActivityDetails",query:{id:e.gameId,activityConditionType:5,jumpType:a}})}catch(e){Q.push({path:"/activity"})}if(4===a)try{W.showPartialLoading({maskClick:!1});const a=await R();if(!a.success)return a.message&&j(a.message),void W.clearPartialLoading();const e=JSON.parse(Z.value.jumpUrl),{gameTypeId:t,gameId:i,h5RedirectParam:s}=e,o=a.data.find((a=>a.id==t));if(!o)return void W.clearPartialLoading();const r=o.thirdGames.find((a=>a.thirdGameCode==i));if(!r)return W.clearPartialLoading(),j(J("加载游戏失败请稍后重试"));if(L()){W.clearPartialLoading();const a={jumpUrl:e};if(s){a.gameLobby=1,a.isMaintain=r.isMaintain,r.gameCode=s;const{gameCode:e,thirdGameCode:t}=r;a.game={gameCode:e,thirdGameCode:t},G("gameHall",a)}else a.gameLobby=0,a.isMaintain=!1,a.game={thirdGameName:r.thirdGameName,thirdGameCode:r.thirdGameCode},G("gameHall",a);return}s?P(r,{gameCode:s}):Q.push({path:"/thirdgamelist/".concat(r.thirdGameName,"/").concat(r.thirdGameCode),query:{from:V.path}})}catch(t){j(J("加载游戏失败请稍后重试"))}finally{W.clearPartialLoading()}};return r((()=>E.value),(async a=>{a||(W.showGlobalLoading(),setTimeout((()=>{K.value=!1,W.clearGlobalLoading()}),400))})),(a,e)=>{const t=_,i=w;return C(),l(y,null,[n("div",H,[d(m(N,{title:-1!=+a.$route.query.id?p(J)("通知详情"):p(J)("公告详情"),isRightShow:!1,isLeftShow:!0},{right:u((()=>[n("img",{class:"service",src:p(S)(),alt:"service",onClick:e[0]||(e[0]=()=>{Q.push("/customerService")})},null,8,M)])),_:1},8,["title"]),[[c,$.value]]),Z.value?(C(),l("div",B,[n("h5",D,v(Z.value.title),1),n("p",null,v(Z.value.createTime),1),n("div",{class:h(["detail-box-center",{"no-button":0==Z.value.jumpType}]),innerHTML:Z.value.content},null,10,O),n("div",F,[0!=Z.value.jumpType?(C(),g(t,{key:0,class:"btn",onClick:aa},{default:u((()=>[b(v(Z.value.buttonName||p(J)("立即前往")),1)])),_:1})):f("",!0)])])):f("",!0)]),m(i,{show:z.value,"onUpdate:show":e[2]||(e[2]=a=>z.value=a),overlay:!1,position:"center",teleport:"body",style:{width:"100%",height:"100%"}},{default:u((()=>[m(A,{popShow:!0,onBack:e[1]||(e[1]=a=>z.value=!1)})])),_:1},8,["show"]),m(i,{show:E.value,"onUpdate:show":e[4]||(e[4]=a=>E.value=a),overlay:!1,position:"right",style:{width:"100%",height:"100%"}},{default:u((()=>[K.value?(C(),g(I,{key:0,onBack:e[3]||(e[3]=()=>(W.clearPartialLoading(),void(E.value=!1)))})):f("",!0)])),_:1},8,["show"])],64)}}},[["__scopeId","data-v-82c4a32a"],["__file","detail.vue"]]);export{J as default};
