2 lines
2.3 KiB
JavaScript
2 lines
2.3 KiB
JavaScript
import{d as e,b as a,p as s,u as l,q as t,r as n,e as r,U as c,V as o,H as i,J as d,o as g,f as p,P as u,g as v,n as m,k as b,F as _,j as f,h as C,Q as y,R as h,T as L,A as E,ay as I,O as k,i as T,B as x,C as O,_ as S}from"./index_1731572557.js";import{_ as G}from"./index_173157255733.js";import{u as j}from"./useInView_1731572557.js";const A=e=>(x("data-v-314cb0bb"),e=e(),O(),e),P={class:"page"},w={class:"page-body"},D={class:"title"},R=A((()=>v("span",null,"Coleção",-1))),Y=A((()=>v("span",null,"Recentes",-1))),B={key:0,class:"all-game"},H=["onClick","src","data-src"],J={class:"maintenance-box"},M=["src"],N={key:1},V=A((()=>v("p",{style:{"font-size":"0.4rem"}},"Ops! Ainda não há dados!",-1))),q=S(e({__name:"index",setup(e){const x=a(),O=s(),S=l(),A=t(),q=n(1),z=n(),{processImage:F}=j(),Q=r((()=>{let e=[],a=[];a=1===q.value?S.userInfo.collectionGameIds||[]:c.getStorage(o.COLLECT_GAME_IDS)?JSON.parse(c.getStorage(o.COLLECT_GAME_IDS)||""):[];for(let s=0;s<a.length;s++){let l=O.originalList.filter((e=>e.gameId===a[s]&&-1!=e.state));e.push(l[0])}return e.length>0&&i((()=>{F(z)})),e})),U=e=>{q.value=e};d((async()=>{q.value=c.getStorage(o.COLLECT_TYPE)?Number(c.getStorage(o.COLLECT_TYPE)):1,c.removeStorage(o.COLLECT_TYPE)}));const $=r((()=>`height:calc(${x.innerHeight}px - 3rem)`));return(e,a)=>{const s=G,l=E;return g(),p("div",P,[u(s,{title:""}),v("div",w,[v("div",D,[v("div",{class:m({active:1===q.value}),onClick:a[0]||(a[0]=e=>U(1))},[u(l,{width:".5rem",type:"local",src:1===q.value?"base/red01.png":"base/red.png"},null,8,["src"]),R],2),v("div",{class:m({active:2===q.value}),onClick:a[1]||(a[1]=e=>U(2))},[u(l,{width:".5rem",type:"local",src:2===q.value?"base/record01.png":"base/record.png"},null,8,["src"]),Y],2)]),v("div",{style:b($.value),class:"contentBox"},[Q.value.length>0?(g(),p("div",B,[(g(!0),p(_,null,f(Q.value,((e,a)=>(g(),p("div",{class:"flex-ct",key:a},[v("img",{ref_for:!0,ref_key:"iconRef",ref:z,onClick:a=>{var s;0!==(s=e).state&&(A.setGameInfo(s),L.emit("openGameDetail"))},src:C(I)("base/loading.png"),"data-src":C(k)(e.gameImg2)},null,8,H),y(v("div",J,[v("img",{src:C(T)("base/br.png")},null,8,M)],512),[[h,0===e.state]])])))),128))])):(g(),p("div",N,[u(l,{type:"local",src:"base/bg_di1.png"}),V]))],4)])])}}}),[["__scopeId","data-v-314cb0bb"]]);export{q as default};
|