1 |
- import{a as l,r as e,o as a,b as u,c as r,d as c,e as v,w as s,v as n,f as i,F as k,g as t,t as d,s as o,h as A}from"./vendor.26352811.js";!function(){const l=document.createElement("link").relList;if(!(l&&l.supports&&l.supports("modulepreload"))){for(const l of document.querySelectorAll('link[rel="modulepreload"]'))e(l);new MutationObserver((l=>{for(const a of l)if("childList"===a.type)for(const l of a.addedNodes)"LINK"===l.tagName&&"modulepreload"===l.rel&&e(l)})).observe(document,{childList:!0,subtree:!0})}function e(l){if(l.ep)return;l.ep=!0;const e=function(l){const e={};return l.integrity&&(e.integrity=l.integrity),l.referrerpolicy&&(e.referrerPolicy=l.referrerpolicy),"use-credentials"===l.crossorigin?e.credentials="include":"anonymous"===l.crossorigin?e.credentials="omit":e.credentials="same-origin",e}(l);fetch(l.href,e)}}();const g=l.create({baseURL:"http://"+window.location.hostname+":8080",timeout:2e4}),m=l=>{console.log("err"+l);let{message:e}=l;"Network Error"===e?e="后端接口连接异常":e.includes("timeout")?e="系统接口请求超时":e.includes("Request failed with status code")&&(e="系统接口"+e.substr(e.length-3)+"异常"),console.log(e)};g.interceptors.request.use((l=>{if("get"===l.method&&l.params){let a=l.url+"?";for(const u of Object.keys(l.params)){const r=l.params[u];var e=encodeURIComponent(u)+"=";if(null!=r&&void 0!==r)if("object"==typeof r)for(const l of Object.keys(r)){a+=encodeURIComponent(u+"["+l+"]")+"="+encodeURIComponent(r[l])+"&"}else a+=e+encodeURIComponent(r)+"&"}a=a.slice(0,-1),l.params={},l.url=a}return l}),m),g.interceptors.response.use((l=>{l.config.url;const e=l.data.code||200,a=l.data.msg;if(401===e)console.log(401);else if(500===e)console.log(500);else{if(200===e)return l.data;console.log(200)}return Promise.reject(a)}),m);const y={class:"body"},h={class:"yh",src:"./assets/yanhua.e28ce38e.gif",alt:""},p={class:"yh2",src:"./assets/yanhua.e28ce38e.gif",alt:""},f={key:0,class:"leader leader1"},b={key:1,class:"leader leader2"},B={key:2,class:"leader leader3"},P={key:3,class:"leader leader4"},x={key:4,class:"leader leader5"},z={key:5,class:"leader leader6"},w={key:6,class:"leader leader7"},C={key:7,class:"leader leader8"},L={key:0,class:"luck3"},I={key:1,class:"luck2"},N={key:2,class:"luck1"},O={key:3,class:"luck0"},R={key:4,class:"luckbc"},U={class:"main"},j={key:0,class:"main3 luckBox"},S={key:0,class:"name"},T={class:"pic"},q=["src"],M={key:1,class:"main3 luckBox"},E={key:0,class:"name"},D={class:"pic"},F=["src"],G={key:2,class:"main3 luckBox"},K={key:0,class:"name"},H={class:"pic"},J=["src"],Q={key:3,class:"main3 luckBox"},V={key:0,class:"name"},W={class:"pic"},X=["src"],Y={key:4,class:"main3 luckBox"},Z={key:0,class:"name"},$={class:"pic"},_=["src"],ll={key:5,class:"main3 luckBox"},el={key:0,class:"name"},al={class:"pic"},ul=["src"],rl={key:6,class:"main3 luckBox"},cl={key:0,class:"name"},vl={class:"pic"},sl=["src"],nl={key:7,class:"main3 luckBox"},il={key:0,class:"name"},kl={class:"pic"},tl=["src"],dl={key:8,class:"main3 luckBox"},ol={key:0,class:"name"},Al={class:"pic"},gl=["src"],ml={key:9,class:"main3 luckBox"},yl={key:0,class:"name"},hl={class:"pic"},pl=["src"],fl={key:10,class:"main3 luckBox"},bl={key:0,class:"name"},Bl={class:"pic"},Pl=["src"],xl={key:11,class:"main3 luckBox"},zl={key:0,class:"name"},wl={class:"pic"},Cl=["src"],Ll={key:12,class:"main3 luckBox"},Il={key:0,class:"name"},Nl={class:"pic"},Ol=["src"],Rl={key:13,class:"main3 luckBox"},Ul={key:0,class:"name"},jl={class:"pic"},Sl=["src"],Tl={key:14,class:"main3 luckBox"},ql={key:0,class:"name"},Ml={class:"pic"},El=["src"],Dl={key:15,class:"main3 luckBox"},Fl={key:0,class:"name"},Gl={class:"pic"},Kl=["src"],Hl={key:16,class:"main3 luckBox"},Jl={class:"redBags luckPrize"},Ql={key:0,class:"name"},Vl={class:"pic"},Wl=["src"],Xl={class:"btn"},Yl={key:1,class:"UnStartBtn"},Zl={key:0,class:"levelBtn"};A({setup(l){const A=e(15),m=e(4),$l=e(3),_l=e(1),le=e([]),ee=e(0),ae=e(0),ue=e(0),re=e([]),ce=e([]),ve=e(null),se=e(15),ne=e(15),ie=e(1),ke=e(null),te=e(0),de=e({luckArr15:[],luckArr14:[],luckArr13:[],luckArr12:[],luckArr11:[],luckArr10:[],luckArr9:[],luckArr8:[],luckArr7:[],luckArr6:[],luckArr5:[],luckArr4:[],luckArr3:[],luckArr2:[],luckArr1:[],luckArr0:[],numArr:[]}),oe=e(),Ae=e([]),ge=function(){0==te.value?(ne.value=se.value,se.value=100,te.value=1):(se.value=ne.value,ke.value=null,te.value=0),ae.value=0,fe()},me=async function(){const l=await g({url:"/getLoopName",method:"POST"});le.value=l,Ae.value=[...Array(le.value.length).keys()]},ye=async function(){const l=await g({url:"/getNickList",method:"POST"});l.length>0&&(de.value=l[0],Ae.value=de.value.numArr,de.value.luckArr15.length&&(ie.value=2,ee.value=1))};a((function(){ye(),me()}));const he=function(){o.toggle(),0==ue.value?(new Audio,oe.value.play(),ue.value=1):(oe.value.pause(),ue.value=0)},pe=e(),fe=function(){switch(se.value){case 15:de.value.luckArr15.length?(ie.value=2,ee.value=1):(ie.value=1,ee.value=0);break;case 14:de.value.luckArr14.length?(ie.value=2,ee.value=1):(ie.value=1,ee.value=0);break;case 13:de.value.luckArr13.length?(ie.value=2,ee.value=1):(ie.value=1,ee.value=0);break;case 12:de.value.luckArr12.length?(ie.value=2,ee.value=1):(ie.value=1,ee.value=0);break;case 11:de.value.luckArr11.length?(ie.value=2,ee.value=1):(ie.value=1,ee.value=0);break;case 10:de.value.luckArr10.length?(ie.value=2,ee.value=1):(ie.value=1,ee.value=0);break;case 9:de.value.luckArr9.length?(ie.value=2,ee.value=1):(ie.value=1,ee.value=0);break;case 8:de.value.luckArr8.length?(ie.value=2,ee.value=1):(ie.value=1,ee.value=0);break;case 7:de.value.luckArr7.length?(ie.value=2,ee.value=1):(ie.value=1,ee.value=0);break;case 6:de.value.luckArr6.length?(ie.value=2,ee.value=1):(ie.value=1,ee.value=0);break;case 5:de.value.luckArr5.length?(ie.value=2,ee.value=1):(ie.value=1,ee.value=0);break;case 4:de.value.luckArr4.length?(ie.value=2,ee.value=1):(ie.value=1,ee.value=0);break;case 3:de.value.luckArr3.length?(ie.value=2,ee.value=1):(ie.value=1,ee.value=0);break;case 2:de.value.luckArr2.length?(ie.value=2,ee.value=1):(ie.value=1,ee.value=0);break;case 1:de.value.luckArr1.length?(ie.value=2,ee.value=1):(ie.value=1,ee.value=0);break;case 0:de.value.luckArr0.length?(ie.value=2,ee.value=0,console.log(ie.value)):(ie.value=1,ee.value=0);break;case 100:ie.value=1,ee.value=0}},be=function(){ie.value=0,ae.value=0,pe.value.pause(),se.value>9&&se.value<20&&xe(15),se.value<10&&se.value>3&&xe(4),se.value<4&&se.value>1&&xe(3),se.value<2&&se.value>-1&&xe(1),100===se.value&&xe(1)},Be=function(){clearInterval(ve.value),Ae.value=Ae.value.filter((l=>!re.value.some((e=>e===l)))),ae.value=1,ee.value=1,de.value.numArr=Ae.value,Pe(),setTimeout((function(){ae.value=0}),1e4),pe.value.play(),fe()},Pe=async function(){var l;await(l=[de.value],g({url:"/setNickList",method:"POST",data:l}))},xe=function(l){ve.value=setInterval((function(){ce.value=[],re.value=ze(Ae.value,l);for(let e=0;e<l;e++)ce.value.push(le.value[re.value[e]]);switch(se.value){case 15:de.value.luckArr15=ce.value;break;case 14:de.value.luckArr14=ce.value;break;case 13:de.value.luckArr13=ce.value;break;case 12:de.value.luckArr12=ce.value;break;case 11:de.value.luckArr11=ce.value;break;case 10:de.value.luckArr10=ce.value;break;case 9:de.value.luckArr9=ce.value;break;case 8:de.value.luckArr8=ce.value;break;case 7:de.value.luckArr7=ce.value;break;case 6:de.value.luckArr6=ce.value;break;case 5:de.value.luckArr5=ce.value;break;case 4:de.value.luckArr4=ce.value;break;case 3:de.value.luckArr3=ce.value;break;case 2:de.value.luckArr2=ce.value;break;case 1:de.value.luckArr1=ce.value;break;case 0:de.value.luckArr0=ce.value;break;case 100:ke.value=ce.value[0]}}),100)},ze=function(l,e){for(var a,u,r=l.slice(0),c=l.length,v=c-e;c-- >v;)a=r[u=Math.floor((c+1)*Math.random())],r[u]=r[c],r[c]=a;return r.slice(v)};return u((function(){})),(l,e)=>(r(),c("div",y,[v("audio",{src:"./assets/back.mp3",hidden:"",autoplay:"",loop:"",ref:(l,e)=>{e.backAudio=l,oe.value=l}},null,512),v("audio",{src:"./assets/yanhua.mp3",hidden:"",ref:(l,e)=>{e.yhAudio=l,pe.value=l}},null,512),s(v("img",h,null,512),[[n,1==ae.value]]),s(v("img",p,null,512),[[n,1==ae.value]]),v("div",{class:"leaderGrup",onDblclick:e[0]||(e[0]=l=>(de.value={luckArr15:[],luckArr14:[],luckArr13:[],luckArr12:[],luckArr11:[],luckArr10:[],luckArr9:[],luckArr8:[],luckArr7:[],luckArr6:[],luckArr5:[],luckArr4:[],luckArr3:[],luckArr2:[],luckArr1:[],luckArr0:[],numArr:[]},ie.value=1,ee.value=0,se.value=15,ne.value=15,Pe(),void me()))},[se.value>13&&se.value<20?(r(),c("div",f)):i("",!0),12===se.value||13===se.value?(r(),c("div",b)):i("",!0),10===se.value||11===se.value?(r(),c("div",B)):i("",!0),9===se.value||8===se.value?(r(),c("div",P)):i("",!0),7===se.value||6===se.value?(r(),c("div",x)):i("",!0),5===se.value||4===se.value?(r(),c("div",z)):i("",!0),3===se.value||2===se.value?(r(),c("div",w)):i("",!0),1===se.value||0===se.value?(r(),c("div",C)):i("",!0)],32),v("div",{class:"luckLevel",onClick:he},[se.value>9&&se.value<20?(r(),c("div",L)):i("",!0),se.value>3&&se.value<10?(r(),c("div",I)):i("",!0),se.value>1&&se.value<4?(r(),c("div",N)):i("",!0),1==se.value||0==se.value?(r(),c("div",O)):i("",!0),100==se.value?(r(),c("div",R)):i("",!0)]),v("div",U,[15==se.value?(r(),c("div",j,[(r(!0),c(k,null,t(A.value,((l,e)=>(r(),c("div",{class:"redBags thirdPrize",key:l},[de.value.luckArr15&&de.value.luckArr15.length?(r(),c("div",S,d(de.value.luckArr15[e].name),1)):i("",!0),v("div",T,[de.value.luckArr15&&de.value.luckArr15.length?(r(),c("img",{key:0,src:de.value.luckArr15[e].pic,alt:""},null,8,q)):i("",!0)])])))),128))])):i("",!0),14==se.value?(r(),c("div",M,[(r(!0),c(k,null,t(A.value,((l,e)=>(r(),c("div",{class:"redBags thirdPrize",key:l},[de.value.luckArr14.length?(r(),c("div",E,d(de.value.luckArr14[e].name),1)):i("",!0),v("div",D,[de.value.luckArr14.length?(r(),c("img",{key:0,src:de.value.luckArr14[e].pic,alt:""},null,8,F)):i("",!0)])])))),128))])):i("",!0),13==se.value?(r(),c("div",G,[(r(!0),c(k,null,t(A.value,((l,e)=>(r(),c("div",{class:"redBags thirdPrize",key:l},[de.value.luckArr13.length?(r(),c("div",K,d(de.value.luckArr13[e].name),1)):i("",!0),v("div",H,[de.value.luckArr13.length?(r(),c("img",{key:0,src:de.value.luckArr13[e].pic,alt:""},null,8,J)):i("",!0)])])))),128))])):i("",!0),12==se.value?(r(),c("div",Q,[(r(!0),c(k,null,t(A.value,((l,e)=>(r(),c("div",{class:"redBags thirdPrize",key:l},[de.value.luckArr12.length?(r(),c("div",V,d(de.value.luckArr12[e].name),1)):i("",!0),v("div",W,[de.value.luckArr12.length?(r(),c("img",{key:0,src:de.value.luckArr12[e].pic,alt:""},null,8,X)):i("",!0)])])))),128))])):i("",!0),11==se.value?(r(),c("div",Y,[(r(!0),c(k,null,t(A.value,((l,e)=>(r(),c("div",{class:"redBags thirdPrize",key:l},[de.value.luckArr11.length?(r(),c("div",Z,d(de.value.luckArr11[e].name),1)):i("",!0),v("div",$,[de.value.luckArr11.length?(r(),c("img",{key:0,src:de.value.luckArr11[e].pic,alt:""},null,8,_)):i("",!0)])])))),128))])):i("",!0),10==se.value?(r(),c("div",ll,[(r(!0),c(k,null,t(A.value,((l,e)=>(r(),c("div",{class:"redBags thirdPrize",key:l},[de.value.luckArr10.length?(r(),c("div",el,d(de.value.luckArr10[e].name),1)):i("",!0),v("div",al,[de.value.luckArr10.length?(r(),c("img",{key:0,src:de.value.luckArr10[e].pic,alt:""},null,8,ul)):i("",!0)])])))),128))])):i("",!0),9==se.value?(r(),c("div",rl,[(r(!0),c(k,null,t(m.value,((l,e)=>(r(),c("div",{class:"redBags secondPrize",key:l},[de.value.luckArr9.length?(r(),c("div",cl,d(de.value.luckArr9[e].name),1)):i("",!0),v("div",vl,[de.value.luckArr9.length?(r(),c("img",{key:0,src:de.value.luckArr9[e].pic,alt:""},null,8,sl)):i("",!0)])])))),128))])):i("",!0),8==se.value?(r(),c("div",nl,[(r(!0),c(k,null,t(m.value,((l,e)=>(r(),c("div",{class:"redBags secondPrize",key:l},[de.value.luckArr8.length?(r(),c("div",il,d(de.value.luckArr8[e].name),1)):i("",!0),v("div",kl,[de.value.luckArr8.length?(r(),c("img",{key:0,src:de.value.luckArr8[e].pic,alt:""},null,8,tl)):i("",!0)])])))),128))])):i("",!0),7==se.value?(r(),c("div",dl,[(r(!0),c(k,null,t(m.value,((l,e)=>(r(),c("div",{class:"redBags secondPrize",key:l},[de.value.luckArr7.length?(r(),c("div",ol,d(de.value.luckArr7[e].name),1)):i("",!0),v("div",Al,[de.value.luckArr7.length?(r(),c("img",{key:0,src:de.value.luckArr7[e].pic,alt:""},null,8,gl)):i("",!0)])])))),128))])):i("",!0),6==se.value?(r(),c("div",ml,[(r(!0),c(k,null,t(m.value,((l,e)=>(r(),c("div",{class:"redBags secondPrize",key:l},[de.value.luckArr6.length?(r(),c("div",yl,d(de.value.luckArr6[e].name),1)):i("",!0),v("div",hl,[de.value.luckArr6.length?(r(),c("img",{key:0,src:de.value.luckArr6[e].pic,alt:""},null,8,pl)):i("",!0)])])))),128))])):i("",!0),5==se.value?(r(),c("div",fl,[(r(!0),c(k,null,t(m.value,((l,e)=>(r(),c("div",{class:"redBags secondPrize",key:l},[de.value.luckArr5.length?(r(),c("div",bl,d(de.value.luckArr5[e].name),1)):i("",!0),v("div",Bl,[de.value.luckArr5.length?(r(),c("img",{key:0,src:de.value.luckArr5[e].pic,alt:""},null,8,Pl)):i("",!0)])])))),128))])):i("",!0),4==se.value?(r(),c("div",xl,[(r(!0),c(k,null,t(m.value,((l,e)=>(r(),c("div",{class:"redBags secondPrize",key:l},[de.value.luckArr4.length?(r(),c("div",zl,d(de.value.luckArr4[e].name),1)):i("",!0),v("div",wl,[de.value.luckArr4.length?(r(),c("img",{key:0,src:de.value.luckArr4[e].pic,alt:""},null,8,Cl)):i("",!0)])])))),128))])):i("",!0),3==se.value?(r(),c("div",Ll,[(r(!0),c(k,null,t($l.value,((l,e)=>(r(),c("div",{class:"redBags firstPrize",key:l},[de.value.luckArr3.length?(r(),c("div",Il,d(de.value.luckArr3[e].name),1)):i("",!0),v("div",Nl,[de.value.luckArr3.length?(r(),c("img",{key:0,src:de.value.luckArr3[e].pic,alt:""},null,8,Ol)):i("",!0)])])))),128))])):i("",!0),2==se.value?(r(),c("div",Rl,[(r(!0),c(k,null,t($l.value,((l,e)=>(r(),c("div",{class:"redBags firstPrize",key:l},[de.value.luckArr2.length?(r(),c("div",Ul,d(de.value.luckArr2[e].name),1)):i("",!0),v("div",jl,[de.value.luckArr2.length?(r(),c("img",{key:0,src:de.value.luckArr2[e].pic,alt:""},null,8,Sl)):i("",!0)])])))),128))])):i("",!0),1==se.value?(r(),c("div",Tl,[(r(!0),c(k,null,t(_l.value,((l,e)=>(r(),c("div",{class:"redBags grandPrize",key:l},[de.value.luckArr1.length?(r(),c("div",ql,d(de.value.luckArr1[e].name),1)):i("",!0),v("div",Ml,[de.value.luckArr1.length?(r(),c("img",{key:0,src:de.value.luckArr1[e].pic,alt:""},null,8,El)):i("",!0)])])))),128))])):i("",!0),0==se.value?(r(),c("div",Dl,[(r(!0),c(k,null,t(_l.value,((l,e)=>(r(),c("div",{class:"redBags grandPrize",key:l},[de.value.luckArr0.length?(r(),c("div",Fl,d(de.value.luckArr0[e].name),1)):i("",!0),v("div",Gl,[de.value.luckArr0.length?(r(),c("img",{key:0,src:de.value.luckArr0[e].pic,alt:""},null,8,Kl)):i("",!0)])])))),128))])):i("",!0),100==se.value?(r(),c("div",Hl,[v("div",Jl,[ke.value?(r(),c("div",Ql,d(ke.value.name),1)):i("",!0),v("div",Vl,[ke.value?(r(),c("img",{key:0,src:ke.value.pic,alt:""},null,8,Wl)):i("",!0)])])])):i("",!0)]),v("div",Xl,[1===ie.value?(r(),c("div",{key:0,class:"startBtn",onClick:be})):i("",!0),2===ie.value?(r(),c("div",Yl)):i("",!0),0===ie.value?(r(),c("div",{key:2,class:"endBtn",onClick:Be})):i("",!0)]),0!=ie.value?(r(),c("div",Zl,[s(v("div",{class:"up",onClick:e[1]||(e[1]=l=>{return e=se.value,se.value=e+1,ae.value=0,pe.value.pause(),void fe();var e})},null,512),[[n,15!=se.value&&100!=se.value]]),s(v("div",{class:"down",onClick:e[2]||(e[2]=l=>{return e=se.value,se.value=e-1,ae.value=0,pe.value.pause(),void fe();var e})},null,512),[[n,0!=se.value&&1==ee.value&&100!=se.value]])])):i("",!0),1!=te.value?(r(),c("div",{key:1,class:"bc",onClick:e[3]||(e[3]=l=>ge())})):i("",!0),1==te.value?(r(),c("div",{key:2,class:"back",onClick:e[4]||(e[4]=l=>ge())})):i("",!0)]))}}).mount("#app");
|