From 2e8d2146c4f5597f4cc549ef490c51e82a964a94 Mon Sep 17 00:00:00 2001 From: mediabot-pt <295750538+mediabot-pt@users.noreply.github.com> Date: Wed, 8 Jul 2026 13:30:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A1=B5=E9=9D=A2=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=88=9D=E5=A7=8B=E5=8C=96=E6=97=B6=E5=B8=A6?= =?UTF-8?q?=E9=A2=84=E8=AE=BEURL=EF=BC=8C=E5=88=9D=E6=AC=A1=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=8D=B3=E5=8F=AF=E7=9B=B4=E6=8E=A5=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sync → /index.php signIn → /attendance.php search → /torrents.php?search={keyword} download → /download.php?id={id} rss → /torrentrss.php?rows=10&search={keyword}&search_mode=1&linktype=dl&passkey={passkey} detail → /details.php?id={id} --- web/src/views/SitePages.vue | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/web/src/views/SitePages.vue b/web/src/views/SitePages.vue index de1fe36..b9a29ee 100644 --- a/web/src/views/SitePages.vue +++ b/web/src/views/SitePages.vue @@ -137,6 +137,14 @@ const sites = ref([]), pagesMap = ref({}), sitesList = ref([]) const editSiteId = ref(''), editorJson = ref('{}'), originalJson = ref('') const snapshotStatus = ref(null) const authType = ref('NONE') +const defaultUrls = { + sync: '/index.php', + signIn: '/attendance.php', + search: '/torrents.php?search={keyword}', + download: '/download.php?id={id}', + rss: '/torrentrss.php?rows=10&search={keyword}&search_mode=1&linktype=dl&passkey={passkey}', + detail: '/details.php?id={id}', +} const defaultTypes = ['nexusphp','mtorrent','gazelle','unit3d'] const isDefaultEditor = computed(() => editSiteId.value.startsWith('default:')) const pageKeys = ref([]) @@ -243,9 +251,9 @@ const editPage = async (row) => { const data = r?.data || r authType.value = data?.authType || 'NONE' const existing = data?.entries || [] - // 无配置则默认初始化所有页面类型 + // 无配置则默认初始化所有页面类型(带默认URL) const entries = existing.length ? existing - : pageKeys.value.map(k => ({ key: k.key, method: k.defaultMethod || 'GET', url: '' })) + : pageKeys.value.map(k => ({ key: k.key, method: k.defaultMethod || 'GET', url: defaultUrls[k.key] || '' })) editorJson.value = JSON.stringify({ authType: authType.value, entries }, null, 2) } catch { editorJson.value = JSON.stringify({ authType:'NONE', entries:[] }, null, 2) } originalJson.value = editorJson.value @@ -299,7 +307,7 @@ const discardDraft = async () => { const remove = (idx) => { parsed.value.splice(idx,1); syncToJson() } const addEntryByKey = (k) => { - parsed.value.push({ key: k.key, method: k.defaultMethod || 'GET', url: '' }) + parsed.value.push({ key: k.key, method: k.defaultMethod || 'GET', url: defaultUrls[k.key] || '' }) syncToJson() } const deletePages = async () => {