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-8H8K2JPG.js";import{u as T}from"./hooks-niqU-NMW.js";import{_ as U,b as q,a_ as x,a0 as N}from"./common-store-e_1WBubm.js";import R from"./index-NJKDril_.js";import{H as I}from"./Header-hbN0HDAk.js";import A from"./index-exADkPVk.js";import"./vendor-crypto-Vtl7-GZS.js";import"./vendor-mqtt-lYGapirz.js";/* empty css              */import"./SvgIcon-unOD6nfS.js";import"./wallet.api-yxf2pnsN.js";import"./BtnClose-9Q8xqZiI.js";/* empty css              */import"./refresh-vUMpko_C.js";import"./loading-4EoYccBj.js";import"./DynamicDatePicker-9EUAMhqX.js";import"./index-MODYbDmK.js";const H={class:"detail"},M=["src"],B={key:0,class:"detail-box"},D={class:"detail-box-top"},J=["innerHTML"],O={class:"jump-btn-wrap"},F=U({__name:"detail",setup(U){const{t:F}=a(),E=e(!0),$=e(!1),z=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"):(z.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");$.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 N();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(F("加载游戏失败请稍后重试"));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(F("加载游戏失败请稍后重试"))}finally{W.clearPartialLoading()}};return r((()=>z.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(I,{title:-1!=+a.$route.query.id?p(F)("通知详情"):p(F)("公告详情"),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,E.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,J),n("div",O,[0!=Z.value.jumpType?(C(),g(t,{key:0,class:"btn",onClick:aa},{default:u((()=>[b(v(Z.value.buttonName||p(F)("立即前往")),1)])),_:1})):f("",!0)])])):f("",!0)]),m(i,{show:$.value,"onUpdate:show":e[2]||(e[2]=a=>$.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=>$.value=!1)})])),_:1},8,["show"]),m(i,{show:z.value,"onUpdate:show":e[4]||(e[4]=a=>z.value=a),overlay:!1,position:"right",style:{width:"100%",height:"100%"}},{default:u((()=>[K.value?(C(),g(R,{key:0,onBack:e[3]||(e[3]=()=>(W.clearPartialLoading(),void(z.value=!1)))})):f("",!0)])),_:1},8,["show"])],64)}}},[["__scopeId","data-v-82c4a32a"],["__file","detail.vue"]]);export{F as default};
