From 95a03de80cc3911ff2324d9e4f8294f4a63553aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=96=87=E5=B3=B0?= Date: Wed, 8 Apr 2026 21:50:14 +0800 Subject: [PATCH] up --- src/api.js | 5 +++-- src/views/SearchView.vue | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/api.js b/src/api.js index 0956128..559d6b1 100644 --- a/src/api.js +++ b/src/api.js @@ -1,7 +1,7 @@ import axios from 'axios' -// Go 搜索服务器地址(端口 80,带 CORS) -const BASE = import.meta.env.VITE_API_BASE || 'http://localhost:80' +// 相对路径(由同源 Go 搜索服务器提供),不指定端口 +const BASE = '' export async function fetchRecent(limit = 50) { const { data } = await axios.get(`${BASE}/admin/recent`, { @@ -46,3 +46,4 @@ export async function flushIndex() { }) return data } + diff --git a/src/views/SearchView.vue b/src/views/SearchView.vue index dacedc1..dee3e61 100644 --- a/src/views/SearchView.vue +++ b/src/views/SearchView.vue @@ -1,7 +1,7 @@