1import{E as S,j as C,G as R}from"./CkuPa5Yr.js";import{d as E,c as f,O as w,r as p,o as P,y as n,z as a,A as e,J as y,D as t,E as i}from"./chunk-vue-TRwxe8i9.js";import"./chunk-pinia-DfnRCC0j.js";import"./chunk-i18n-CEBPY5W3.js";import"./chunk-alioss-Co3x7qJ6.js";import"./chunk-fabric-NyCWrAO1.js";const B={class:"p-8"},D={class:"space-y-4"},L={class:"border p-4 rounded"},N={key:0,class:"text-blue-600"},A={key:1,class:"text-red-600"},G={key:2,class:"text-green-600"},I={class:"bg-gray-100 p-2 rounded text-sm"},J={class:"border p-4 rounded"},O={key:0,class:"text-blue-600"},U={key:1,class:"text-red-600"},V={key:2,class:"text-green-600"},q={class:"bg-gray-100 p-2 rounded text-sm"},z={class:"border p-4 rounded bg-blue-50"},M={class:"text-sm"},T={class:"text-blue-700"},$={class:"border p-4 rounded"},j=["disabled"],F=["disabled"],se=E({__name:"test-vapi-ip",async setup(H){let l,m;const g=S(),r=f(()=>g.query.ip),h=f(()=>{const o={};return r.value&&(o.ip=r.value),o}),{data:x,pending:_,error:b,refresh:k}=([l,m]=w(()=>R("/v1/common/ip",{method:"GET",params:h.value,server:!0,lazy:!1})),l=await l,m(),l),d=p(null),c=p(!1),u=p(""),v=async()=>{c.value=!0,u.value="",d.value=null;try{const o={};r.value&&(o.ip=r.value);const s=await $fetch("/v1/common/ip",{baseURL:C().public.ApiBase,method:"GET",params:o});d.value=s}catch(o){u.value=o.message||"请æ±å¤±è´¥",console.error("[客æ·ç«¯è¯·æ±é误]",o)}finally{c.value=!1}};return P(()=>{v()}),(o,s)=>(a(),n("div",B,[s[6]||(s[6]=e("h1",{class:"text-2xl font-bold mb-4"},"IP æ¥è¯¢æµè¯é¡µé¢",-1)),e("div",D,[e("div",L,[s[1]||(s[1]=e("h2",{class:"text-xl mb-2 font-semibold"},"SSR 请æ±ç»æ (Setup)",-1)),t(_)?(a(),n("div",N,"å è½½ä¸...")):t(b)?(a(),n("div",A," é误: "+i(t(b).message),1)):t(x)?(a(),n("div",G,[e("pre",I,i(JSON.stringify(t(x),null,2)),1)])):y("",!0)]),e("div",J,[s[2]||(s[2]=e("h2",{class:"text-xl mb-2 font-semibold"},"客æ·ç«¯è¯·æ±ç»æ (onMounted)",-1)),t(c)?(a(),n("div",O,"å è½½ä¸...")):t(u)?(a(),n("div",U," é误: "+i(t(u)),1)):t(d)?(a(),n("div",V,[e("pre",q,i(JSON.stringify(t(d),null,2)),1)])):y("",!0)]),e("div",z,[s[4]||(s[4]=e("h2",{class:"text-xl mb-2 font-semibold"},"URL åæ°",-1)),e("p",M,[s[3]||(s[3]=e("span",{class:"font-medium"},"IP åæ°:",-1)),e("span",T,i(t(r)||"(æªä¼ å
¥)"),1)]),s[5]||(s[5]=e("p",{class:"text-xs text-gray-600 mt-2"}," æç¤º: å¯ä»¥å¨ URL 䏿·»å ?ip=xxx.xxx.xxx.xxx åæ°æ¥æ¥è¯¢æå® IP ",-1))]),e("div",$,[e("button",{class:"bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-600 mr-2",disabled:t(_),onClick:s[0]||(s[0]=K=>t(k)())}," å·æ° SSR æ°æ® ",8,j),e("button",{class:"bg-green-500 text-white px-4 py-2 rounded hover:bg-green-600",disabled:t(c),onClick:v}," éæ°è¯·æ±å®¢æ·ç«¯æ°æ® ",8,F)])])]))}});export{se as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.