From 0d164343747eab4bfae3a9669aa1e3fe7275f34b Mon Sep 17 00:00:00 2001 From: Elysia Date: Sat, 17 Jan 2026 21:00:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=8E=AF=E5=A2=83=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=EF=BC=8C=E6=9B=B4=E6=96=B0=20Vite?= =?UTF-8?q?=20=E9=85=8D=E7=BD=AE=E4=BB=A5=E6=94=AF=E6=8C=81=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E4=BB=A3=E7=90=86=EF=BC=8C=E4=BC=98=E5=8C=96=20AppCar?= =?UTF-8?q?d=20=E7=BB=84=E4=BB=B6=E7=9A=84=E6=87=92=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.debug | 2 + .env.production | 1 + package.json | 7 +-- src/App.vue | 3 -- src/components/AppCard.vue | 68 +++++++++++++++++++++++---- src/components/AppDetailModal.vue | 4 +- src/global/StoreConfig.ts | 2 +- vite.config.flat.txt | 76 ------------------------------- vite.config.ts | 32 ++++++++++--- 9 files changed, 96 insertions(+), 99 deletions(-) create mode 100644 .env.debug create mode 100644 .env.production delete mode 100644 vite.config.flat.txt diff --git a/.env.debug b/.env.debug new file mode 100644 index 00000000..430fb433 --- /dev/null +++ b/.env.debug @@ -0,0 +1,2 @@ +VITE_APM_STORE_LOCAL_MODE=true +VITE_APM_STORE_BASE_URL=/local_amd64-apm \ No newline at end of file diff --git a/.env.production b/.env.production new file mode 100644 index 00000000..48bc2f89 --- /dev/null +++ b/.env.production @@ -0,0 +1 @@ +VITE_APM_STORE_BASE_URL=https://erotica.spark-app.store \ No newline at end of file diff --git a/package.json b/package.json index 728cac50..4061ac36 100644 --- a/package.json +++ b/package.json @@ -20,11 +20,12 @@ }, "type": "module", "scripts": { - "dev": "vite", - "build": "vue-tsc --noEmit && vite build && electron-builder", - "preview": "vite preview" + "dev": "vite --mode debug", + "build": "vue-tsc --noEmit && vite build --mode production && electron-builder", + "preview": "vite preview --mode debug" }, "devDependencies": { + "@dotenvx/dotenvx": "^1.51.4", "@vitejs/plugin-vue": "^5.0.4", "electron": "^39.2.7", "electron-builder": "^24.13.3", diff --git a/src/App.vue b/src/App.vue index 19fd7ad9..af6be223 100644 --- a/src/App.vue +++ b/src/App.vue @@ -264,9 +264,6 @@ const loadCategories = async () => { try { const response = await axiosInstance.get(`/${APM_STORE_ARCHITECTURE}/categories.json`); categories.value = response.data; - // const response = await fetch('/amd64-apm/categories.json'); - // const data = await response.data - // categories.value = data; } catch (error) { console.error('读取 categories.json 失败', error); } diff --git a/src/components/AppCard.vue b/src/components/AppCard.vue index a7b03938..8089f6e0 100644 --- a/src/components/AppCard.vue +++ b/src/components/AppCard.vue @@ -2,10 +2,11 @@
icon
@@ -19,7 +20,8 @@ diff --git a/src/components/AppDetailModal.vue b/src/components/AppDetailModal.vue index 6ab2ddf5..53015c53 100644 --- a/src/components/AppDetailModal.vue +++ b/src/components/AppDetailModal.vue @@ -81,7 +81,7 @@