import{aa as V,ab as g,D as _,X as u,Y as l,Z as e,j as a,a1 as c,S as i,$ as d,k,b as m}from"./vendor-vue-wu2SJQxD.js";import{s as p,n as y,e as C,c as h,d as x,j as S,l as T,g as B,h as N}from"./index-CsRk2AqG.js";import{V as b,a as j}from"./VRow-DHfYjRE7.js";import{V as R}from"./VContainer-C6YXnkuM.js";import"./vendor-vuetify-BaOIwHiz.js";const H={__name:"authorize",setup(w){const f=V(),n=g(),s=m("processing"),r=m("正在验证授权信息...");_(async()=>{try{const t=f.query.token;if(!t){s.value="error",r.value="未获取到授权令牌";return}p("server.kvToken",t);const o=y("device.uuid");o&&o!=="00000000-0000-4000-8000-000000000000"?(p("device.uuid","00000000-0000-4000-8000-000000000000"),r.value="授权成功！已完成数据迁移。"):r.value="授权成功！",s.value="success",n.push("/")}catch(t){console.error("授权处理失败:",t),s.value="error",r.value=`授权失败: ${t.message}`}});const v=()=>{n.push("/")};return(t,o)=>(u(),l(R,{class:"fill-height",fluid:""},{default:e(()=>[a(b,{align:"center",justify:"center"},{default:e(()=>[a(j,{cols:"12",md:"6",sm:"8"},{default:e(()=>[a(C,null,{default:e(()=>[a(h,{class:"text-h5"},{default:e(()=>[c(i(s.value==="processing"?"正在处理授权...":s.value==="success"?"授权成功":"授权失败"),1)]),_:1}),a(x,null,{default:e(()=>[s.value==="processing"?(u(),l(S,{key:0,class:"mb-4",color:"primary",indeterminate:""})):d("",!0),k("p",null,i(r.value),1)]),_:1}),s.value!=="processing"?(u(),l(T,{key:0},{default:e(()=>[a(B),a(N,{color:"primary",onClick:v},{default:e(()=>[...o[0]||(o[0]=[c("返回首页",-1)])]),_:1})]),_:1})):d("",!0)]),_:1})]),_:1})]),_:1})]),_:1}))}};export{H as default};
