PageSourceSearch

https://bidlytics.ai/_next/static/chunks/pages/test-api-29b962d8bbe63345.js

js bidlytics.ai collected 2026-10-05 15:28:50 UTC 1,779 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8357],{456:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/test-api",function(){return t(2656)}])},2656:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return a}});var n=t(5893),r=t(7294),l=t(7066);function a(){var e,s;let[t,a]=(0,r.useState)(null),[d,i]=(0,r.useState)(!1),[o,c]=(0,r.useState)(null),u=async()=>{i(!0),c(null);try{let e=await l.Z.get("http://localhost:3001/api/search/tenders?q=科技&page=1&limit=5");a(e.data)}catch(e){console.error("❌ API 錯誤:",e),c(e.message)}finally{i(!1)}};return(0,r.useEffect)(()=>{u()},[]),(0,n.jsxs)("div",{className:"p-8",children:[(0,n.jsx)("h1",{className:"text-2xl font-bold mb-4",children:"API 測試頁面"}),(0,n.jsx)("button",{onClick:u,className:"bg-blue-500 text-white px-4 py-2 rounded mb-4",children:"重新測試 API"}),d&&(0,n.jsx)("div",{children:"載入中..."}),o&&(0,n.jsxs)("div",{className:"bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded mb-4",children:["錯誤: ",o]}),t&&(0,n.jsxs)("div",{className:"bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded mb-4",children:[(0,n.jsx)("h2",{className:"font-bold",children:"成功獲取數據!"}),(0,n.jsxs)("p",{children:["總結果數: ",null===(e=t.pagination)||void 0===e?void 0:e.total]}),(0,n.jsxs)("p",{children:["當前頁面結果: ",null===(s=t.results)||void 0===s?void 0:s.length]}),(0,n.jsxs)("details",{className:"mt-4",children:[(0,n.jsx)("summary",{className:"cursor-pointer font-bold",children:"查看原始數據"}),(0,n.jsx)("pre",{className:"mt-2 text-xs overflow-auto bg-gray-100 p-2 rounded",children:JSON.stringify(t,null,2)})]})]})]})}}},function(e){e.O(0,[7066,2888,9774,179],function(){return e(e.s=456)}),_N_E=e.O()}]);

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.