From 0bc1091dc253dd5150e15b7b909d1723d82ee5c7 Mon Sep 17 00:00:00 2001 From: HalcyonAlcedo <41666148+HalcyonAlcedo@users.noreply.github.com> Date: Sun, 18 Aug 2024 16:01:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=87=E6=8D=A2=E6=8F=92=E4=BB=B6=E5=95=86?= =?UTF-8?q?=E5=BA=97=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/server.ts | 2 +- src/views/store/Store.vue | 25 +++++++++++++++---------- vite.config.ts | 2 +- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/stores/server.ts b/src/stores/server.ts index 69163dd..7751330 100644 --- a/src/stores/server.ts +++ b/src/stores/server.ts @@ -1,7 +1,7 @@ import { defineStore } from 'pinia'; import type { PersistedStateOptions } from 'pinia-plugin-persistedstate'; -const serverUrl = localStorage.getItem('api') || 'http://localhost:3000'; +const serverUrl = localStorage.getItem('api') || 'http://localhost:5333'; export const useServerStore = defineStore({ id: 'server', diff --git a/src/views/store/Store.vue b/src/views/store/Store.vue index a3b4b7e..8c97ced 100644 --- a/src/views/store/Store.vue +++ b/src/views/store/Store.vue @@ -101,15 +101,20 @@ const checkUpdate = (app: string, version: string) => { * 获取商店插件信息 */ const getPluginsData = async ({ done }: any) => { - - axios.get('http://dev.alcedo.top/getdata.php', { params: { start: pluginsCount.value } }).then((data) => { - if (data.data.length === 0) { - done('empty') - } else { - plugins.value.push(...data.data) - pluginsCount.value += data.data.length - done('ok') - } + /* 暂时不使用分页策略 + axios.get('http://dev.alcedo.top/getdata.php', { params: { start: pluginsCount.value } }).then((data) => { + if (data.data.length === 0) { + done('empty') + } else { + plugins.value.push(...data.data) + pluginsCount.value += data.data.length + done('ok') + } + }) + */ + axios.get('https://halcyonalcedo.github.io/karin-store/plugins.json').then((data) => { + plugins.value.push(...data.data) + done('empty') }) } /** @@ -218,7 +223,7 @@ getLocalPluginsData()