import{g as S,j,d as b,q as D,a0 as I,ag as H,X as p,ae as R,a8 as X,l as z,o as r,a as u,u as e,c as h,w as x,J as y,m as i,a9 as T,M as $,N as n,O as M,b as m,L as C,aa as q,_ as E}from"./__uno-D1Fc7LNY.js";import{s as F}from"./popup-B0Dhd1u8.js";import"./modulepreload-polyfill-B5Qt9EMX.js";const J=d=>{const c=S(()=>d.value.length),s=j(1),o=j(20),g=S(()=>d.value.slice((s.value-1)*o.value,s.value*o.value));return{total:c,currentPage:s,pageData:g,pageSize:o}},O=["innerHTML"],l="log",G=b({__name:"index",setup(d){const c=D(),s=I(),o=H(s,"platformType"),g=S(()=>(c.isM?s.logs[p.Amazon]:s.logs[o.value])||[]),{total:w,currentPage:v,pageData:B,pageSize:_}=J(g),k=j("");let L;const V=async()=>{var t;const f=await F({val:"logMsg"});k.value=`当前显示${(t=g.value)==null?void 0:t.length}条记录。${f}`};return R(()=>{L=setInterval(()=>V(),1e3),V()}),X(()=>{clearInterval(L)}),(f,t)=>{const A=z("gj-radio"),N=z("gj-radio-group"),U=z("gj-pagination");return r(),u("div",{class:n(l)},[e(c).isX?(r(),h(N,{key:0,modelValue:e(o),"onUpdate:modelValue":t[0]||(t[0]=a=>T(o)?o.value=a:null),type:"button",class:"u-mb-12px"},{default:x(()=>[y(A,{value:e(p).Amazon},{default:x(()=>[i("Amazon")]),_:1},8,["value"]),y(A,{value:e(p).Temu},{default:x(()=>[i("Temu")]),_:1},8,["value"])]),_:1},8,["modelValue"])):$("",!0),e(o)===e(p).Amazon?(r(),u("div",{key:1,class:n(`${l}-amazon-log-tip`)},M(e(k)),3)):$("",!0),m("div",{class:n(`${l}-content`)},[(r(!0),u(C,null,q(e(B),(a,P)=>(r(),u("div",{key:P,class:n(`${l}-item`)},[m("span",{class:n(`${l}-time`)},[i(M(a.time),1),a.region?(r(),u(C,{key:0},[i(M(` (${a.region})`),1)],64)):$("",!0)],2),i(" ---- "),m("span",{innerHTML:a.content},null,8,O)],2))),128))],2),m("div",{class:n(`${l}-footer`)},[y(U,{current:e(v),"onUpdate:current":t[1]||(t[1]=a=>T(v)?v.value=a:null),"page-size":e(_),"onUpdate:pageSize":t[2]||(t[2]=a=>T(_)?_.value=a:null),simple:"","show-total":"","show-page-size":"",total:e(w),"page-size-options":[20,50,100,200,500],class:n(`${l}-pagination`)},null,8,["current","page-size","total","class"])],2)])}}}),Y=E(G,[["__scopeId","data-v-671078da"]]);export{Y as default};
