import{r as a,o as s,c as t,w as e,i as l,b as c,d as n,e as o,h as u,t as i,l as d,z as f,F as r,s as _,A as g,a as p,B as v,f as b,y as m,S as k}from"./index-C69vCi_7.js";import{i as x,g as S,a as h,s as w,c as C}from"./userCache.DtNgvahV.js";import{_ as y}from"./_plugin-vue_export-helper.BCo6x5W8.js";const j=y({__name:"debug",setup(y){const j=a([]),$=a(!1),D=a("无"),z=a("无"),A=()=>{$.value=x();const a=S();D.value=a?a.substring(0,20)+"...":"无";const s=h();z.value=s?JSON.stringify(s):"无",B("状态已刷新")},B=a=>{const s=new Date,t=`${s.getHours().toString().padStart(2,"0")}:${s.getMinutes().toString().padStart(2,"0")}:${s.getSeconds().toString().padStart(2,"0")}`;j.value.unshift({time:t,text:a}),j.value.length>20&&j.value.pop()},F=()=>{const a="mock_token_"+Date.now();w({id:"test_user_001",nickname:"测试用户",phone:"13800138000",avatar:""},a)?(B("模拟登录成功"),A(),_({title:"模拟登录成功",icon:"success"})):B("模拟登录失败")},H=()=>{g({title:"提示",content:"确定要清除缓存吗？",success:a=>{a.confirm&&(C(),B("缓存已清除"),A(),_({title:"已清除",icon:"success"}))}})},I=()=>{B("跳转到启动页"),p({url:"/pages/splash/splash"})},J=()=>{B("跳转到登录页"),v({url:"/pages/login/login"})},M=()=>{B("跳转到首页"),v({url:"/pages/index/index"})};return s((()=>{B("调试工具已加载"),A()})),(a,s)=>{const _=b,g=l,p=m,v=k;return c(),t(g,{class:"test-container"},{default:e((()=>[n(_,{class:"title"},{default:e((()=>[o("调试工具")])),_:1}),n(g,{class:"section"},{default:e((()=>[n(_,{class:"section-title"},{default:e((()=>[o("当前缓存状态")])),_:1}),n(g,{class:"info-card"},{default:e((()=>[n(g,{class:"info-row"},{default:e((()=>[n(_,{class:"label"},{default:e((()=>[o("是否登录:")])),_:1}),n(_,{class:u(["value",{success:$.value,error:!$.value}])},{default:e((()=>[o(i($.value?"已登录":"未登录"),1)])),_:1},8,["class"])])),_:1}),n(g,{class:"info-row"},{default:e((()=>[n(_,{class:"label"},{default:e((()=>[o("Token:")])),_:1}),n(_,{class:"value token"},{default:e((()=>[o(i(D.value),1)])),_:1})])),_:1}),n(g,{class:"info-row"},{default:e((()=>[n(_,{class:"label"},{default:e((()=>[o("用户信息:")])),_:1}),n(_,{class:"value"},{default:e((()=>[o(i(z.value),1)])),_:1})])),_:1})])),_:1})])),_:1}),n(g,{class:"section"},{default:e((()=>[n(_,{class:"section-title"},{default:e((()=>[o("操作")])),_:1}),n(p,{class:"action-btn",onClick:F},{default:e((()=>[o("模拟登录")])),_:1}),n(p,{class:"action-btn warn",onClick:H},{default:e((()=>[o("清除缓存")])),_:1}),n(p,{class:"action-btn",onClick:A},{default:e((()=>[o("刷新状态")])),_:1}),n(p,{class:"action-btn",onClick:I},{default:e((()=>[o("跳转到启动页")])),_:1}),n(p,{class:"action-btn",onClick:J},{default:e((()=>[o("跳转到登录页")])),_:1}),n(p,{class:"action-btn",onClick:M},{default:e((()=>[o("跳转到首页")])),_:1})])),_:1}),n(g,{class:"section"},{default:e((()=>[n(_,{class:"section-title"},{default:e((()=>[o("操作日志")])),_:1}),n(v,{"scroll-y":"",class:"log-box"},{default:e((()=>[(c(!0),d(r,null,f(j.value,((a,s)=>(c(),t(g,{key:s,class:"log-item"},{default:e((()=>[n(_,{class:"log-time"},{default:e((()=>[o(i(a.time),1)])),_:2},1024),n(_,{class:"log-text"},{default:e((()=>[o(i(a.text),1)])),_:2},1024)])),_:2},1024)))),128))])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-7fa221b2"]]);export{j as default};
