From bba7e994a44c7f96087e48454812397a5458ffcd Mon Sep 17 00:00:00 2001 From: Seven Date: Tue, 20 Jan 2026 15:29:32 +0700 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E9=85=8D=E7=BD=AE=EF=BC=8C=E7=BB=9F=E4=B8=80?= =?UTF-8?q?API=E5=9C=B0=E5=9D=80=E4=B8=BAhttps://capp-api.riwsan.com?= =?UTF-8?q?=EF=BC=8C=E5=B9=B6=E4=BC=98=E5=8C=96=E9=94=99=E8=AF=AF=E5=A4=84?= =?UTF-8?q?=E7=90=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- .env.production | 2 +- components.d.ts | 12 ------------ src/api/index.ts | 9 +++++++++ 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.env.development b/.env.development index 3cc5181..65273e7 100644 --- a/.env.development +++ b/.env.development @@ -1 +1 @@ -VITE_API_URL=http://192.168.1.2:9538 \ No newline at end of file +VITE_API_URL=https://capp-api.riwsan.com \ No newline at end of file diff --git a/.env.production b/.env.production index 127c381..65273e7 100644 --- a/.env.production +++ b/.env.production @@ -1 +1 @@ -VITE_API_URL=https://riwa-api.riwsan1.com \ No newline at end of file +VITE_API_URL=https://capp-api.riwsan.com \ No newline at end of file diff --git a/components.d.ts b/components.d.ts index 1720e9c..1281261 100644 --- a/components.d.ts +++ b/components.d.ts @@ -21,7 +21,6 @@ declare module 'vue' { IonButtons: typeof import('@ionic/vue')['IonButtons'] IonCheckbox: typeof import('@ionic/vue')['IonCheckbox'] IonContent: typeof import('@ionic/vue')['IonContent'] - IonDatetime: typeof import('@ionic/vue')['IonDatetime'] IonHeader: typeof import('@ionic/vue')['IonHeader'] IonIcon: typeof import('@ionic/vue')['IonIcon'] IonInfiniteScroll: typeof import('@ionic/vue')['IonInfiniteScroll'] @@ -29,18 +28,13 @@ declare module 'vue' { IonInput: typeof import('@ionic/vue')['IonInput'] IonItem: typeof import('@ionic/vue')['IonItem'] IonLabel: typeof import('@ionic/vue')['IonLabel'] - IonList: typeof import('@ionic/vue')['IonList'] IonModal: typeof import('@ionic/vue')['IonModal'] IonPage: typeof import('@ionic/vue')['IonPage'] - IonRadio: typeof import('@ionic/vue')['IonRadio'] - IonRadioGroup: typeof import('@ionic/vue')['IonRadioGroup'] IonRefresher: typeof import('@ionic/vue')['IonRefresher'] IonRefresherContent: typeof import('@ionic/vue')['IonRefresherContent'] IonRouterOutlet: typeof import('@ionic/vue')['IonRouterOutlet'] IonSegment: typeof import('@ionic/vue')['IonSegment'] IonSegmentButton: typeof import('@ionic/vue')['IonSegmentButton'] - IonSelect: typeof import('@ionic/vue')['IonSelect'] - IonSelectOption: typeof import('@ionic/vue')['IonSelectOption'] IonSpinner: typeof import('@ionic/vue')['IonSpinner'] IonTabBar: typeof import('@ionic/vue')['IonTabBar'] IonTabButton: typeof import('@ionic/vue')['IonTabButton'] @@ -66,7 +60,6 @@ declare global { const IonButtons: typeof import('@ionic/vue')['IonButtons'] const IonCheckbox: typeof import('@ionic/vue')['IonCheckbox'] const IonContent: typeof import('@ionic/vue')['IonContent'] - const IonDatetime: typeof import('@ionic/vue')['IonDatetime'] const IonHeader: typeof import('@ionic/vue')['IonHeader'] const IonIcon: typeof import('@ionic/vue')['IonIcon'] const IonInfiniteScroll: typeof import('@ionic/vue')['IonInfiniteScroll'] @@ -74,18 +67,13 @@ declare global { const IonInput: typeof import('@ionic/vue')['IonInput'] const IonItem: typeof import('@ionic/vue')['IonItem'] const IonLabel: typeof import('@ionic/vue')['IonLabel'] - const IonList: typeof import('@ionic/vue')['IonList'] const IonModal: typeof import('@ionic/vue')['IonModal'] const IonPage: typeof import('@ionic/vue')['IonPage'] - const IonRadio: typeof import('@ionic/vue')['IonRadio'] - const IonRadioGroup: typeof import('@ionic/vue')['IonRadioGroup'] const IonRefresher: typeof import('@ionic/vue')['IonRefresher'] const IonRefresherContent: typeof import('@ionic/vue')['IonRefresherContent'] const IonRouterOutlet: typeof import('@ionic/vue')['IonRouterOutlet'] const IonSegment: typeof import('@ionic/vue')['IonSegment'] const IonSegmentButton: typeof import('@ionic/vue')['IonSegmentButton'] - const IonSelect: typeof import('@ionic/vue')['IonSelect'] - const IonSelectOption: typeof import('@ionic/vue')['IonSelectOption'] const IonSpinner: typeof import('@ionic/vue')['IonSpinner'] const IonTabBar: typeof import('@ionic/vue')['IonTabBar'] const IonTabButton: typeof import('@ionic/vue')['IonTabButton'] diff --git a/src/api/index.ts b/src/api/index.ts index 4cb2e4d..afe153e 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -77,6 +77,15 @@ export function safeClient( localStorage.removeItem("user-token"); window.location.reload(); } + else if (!options.silent) { + const toast = await toastController.create({ + message: (res.error as any).message || i18n.global.t("network_error"), + duration: 3000, + position: "bottom", + color: "danger", + }); + await toast.present(); + } throw res.error; }