feat: 更新环境变量配置,统一API地址为https://capp-api.riwsan.com,并优化错误处理逻辑
This commit is contained in:
@@ -1 +1 @@
|
||||
VITE_API_URL=http://192.168.1.2:9538
|
||||
VITE_API_URL=https://capp-api.riwsan.com
|
||||
@@ -1 +1 @@
|
||||
VITE_API_URL=https://riwa-api.riwsan1.com
|
||||
VITE_API_URL=https://capp-api.riwsan.com
|
||||
12
components.d.ts
vendored
12
components.d.ts
vendored
@@ -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']
|
||||
|
||||
@@ -77,6 +77,15 @@ export function safeClient<T, E>(
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user