diff --git a/.env.development b/.env.development index 13ed883..faeec93 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,3 @@ -VITE_API_URL=http://192.168.1.8:9528 -VITE_TRADINGVIEW_LIBRARY_URL=http://192.168.1.6:6173 +VITE_API_URL=http://192.168.1.6:9528 +VITE_TRADINGVIEW_LIBRARY_URL=http://192.168.1.4:6173 # VITE_TRADINGVIEW_DATA_API_URL=https://demo-feed-data.tradingview.com \ No newline at end of file diff --git a/.env.production b/.env.production index 89a6ea4..3998d71 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,3 @@ -VITE_API_URL=http://192.168.1.8:9527 -VITE_TRADINGVIEW_LIBRARY_URL=http://192.168.1.6:6173 +VITE_API_URL=http://192.168.1.6:9527 +VITE_TRADINGVIEW_LIBRARY_URL=http://192.168.1.4:6173 # VITE_TRADINGVIEW_DATA_API_URL=https://demo-feed-data.tradingview.com \ No newline at end of file diff --git a/auto-imports.d.ts b/auto-imports.d.ts index 34d3d5e..7327015 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -242,6 +242,7 @@ declare global { const useObjectUrl: typeof import('@vueuse/core').useObjectUrl const useOffsetPagination: typeof import('@vueuse/core').useOffsetPagination const useOnline: typeof import('@vueuse/core').useOnline + const usePWAInstall: typeof import('./src/composables/usePWAInstall').usePWAInstall const usePageLeave: typeof import('@vueuse/core').usePageLeave const useParallax: typeof import('@vueuse/core').useParallax const useParentElement: typeof import('@vueuse/core').useParentElement @@ -606,6 +607,7 @@ declare module 'vue' { readonly useObjectUrl: UnwrapRef readonly useOffsetPagination: UnwrapRef readonly useOnline: UnwrapRef + readonly usePWAInstall: UnwrapRef readonly usePageLeave: UnwrapRef readonly useParallax: UnwrapRef readonly useParentElement: UnwrapRef diff --git a/capacitor.config.ts b/capacitor.config.ts index b41e291..2cdf037 100644 --- a/capacitor.config.ts +++ b/capacitor.config.ts @@ -5,7 +5,7 @@ const config: CapacitorConfig = { appName: "riwa-ionic", webDir: "dist", server: { - url: "http://192.168.1.5:5173", // Vite默认端口 + url: "http://192.168.1.6:5173", // Vite默认端口 cleartext: true, // 允许HTTP连接 }, plugins: { diff --git a/components.d.ts b/components.d.ts index 2286e4e..f2ac9e1 100644 --- a/components.d.ts +++ b/components.d.ts @@ -58,6 +58,8 @@ declare module 'vue' { IonTitle: typeof import('@ionic/vue')['IonTitle'] IonToolbar: typeof import('@ionic/vue')['IonToolbar'] LayoutDefault: typeof import('./src/components/layout/default.vue')['default'] + PwaInstallButton: typeof import('./src/components/pwa-install-button/index.vue')['default'] + PwaInstallButtonIosInstallGuide: typeof import('./src/components/pwa-install-button/ios-install-guide.vue')['default'] QrScanner: typeof import('./src/components/qr-scanner/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] @@ -113,6 +115,8 @@ declare global { const IonTitle: typeof import('@ionic/vue')['IonTitle'] const IonToolbar: typeof import('@ionic/vue')['IonToolbar'] const LayoutDefault: typeof import('./src/components/layout/default.vue')['default'] + const PwaInstallButton: typeof import('./src/components/pwa-install-button/index.vue')['default'] + const PwaInstallButtonIosInstallGuide: typeof import('./src/components/pwa-install-button/ios-install-guide.vue')['default'] const QrScanner: typeof import('./src/components/qr-scanner/index.vue')['default'] const RouterLink: typeof import('vue-router')['RouterLink'] const RouterView: typeof import('vue-router')['RouterView'] diff --git a/index.html b/index.html index a04132f..0ca0c0d 100644 --- a/index.html +++ b/index.html @@ -18,8 +18,12 @@ - - + + + + + + diff --git a/ios/App/App.xcodeproj/project.pbxproj b/ios/App/App.xcodeproj/project.pbxproj index 6a044b7..84a9b41 100644 --- a/ios/App/App.xcodeproj/project.pbxproj +++ b/ios/App/App.xcodeproj/project.pbxproj @@ -304,7 +304,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0; + MARKETING_VERSION = 1.0.0; OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\""; PRODUCT_BUNDLE_IDENTIFIER = riwa.ionic.app; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -327,7 +327,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0; + MARKETING_VERSION = 1.0.0; PRODUCT_BUNDLE_IDENTIFIER = riwa.ionic.app; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = ""; diff --git a/public/favicon.png b/public/favicon.png deleted file mode 100644 index 51888a7..0000000 Binary files a/public/favicon.png and /dev/null differ diff --git a/src/api/types.ts b/src/api/types.ts index 7f60f7e..4ea3bff 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -1,6 +1,6 @@ import type { Treaty } from "@elysiajs/eden"; import type { client } from "."; -import type { AssetCodeEnum, PaymentChannelEnum, WithdrawMethodEnum } from "./enum"; +import type { AssetCodeEnum, WithdrawMethodEnum } from "./enum"; import type { authClient } from "@/auth"; export type TreatyQuery = T extends (...args: any[]) => any diff --git a/src/auth/index.ts b/src/auth/index.ts index aff64bc..da6a200 100644 --- a/src/auth/index.ts +++ b/src/auth/index.ts @@ -15,6 +15,10 @@ export const authClient = createAuthClient({ baseURL, fetchOptions: { credentials: "include", + auth: { + type: "Bearer", + token: () => localStorage.getItem("user-token") || "", + }, }, plugins: [emailOTPClient(), phoneNumberClient(), usernameClient()], }); diff --git a/src/locales/en-US.json b/src/locales/en-US.json index f12254a..27ac2ff 100644 --- a/src/locales/en-US.json +++ b/src/locales/en-US.json @@ -437,5 +437,19 @@ "amountMaxError": "Amount cannot exceed available balance {amount}", "fromAccountRequired": "Please select from account", "toAccountRequired": "Please select to account" + }, + "pwa": { + "install": { + "installApp": "Install App", + "addToHomeScreen": "Add to Home Screen", + "howToInstall": "How to Install", + "success": "Installation Successful", + "successMessage": "The app has been successfully added to your device", + "iosTitle": "Install App on iOS", + "iosStep1": "1. Tap the Share button at the bottom toolbar", + "iosStep2": "2. Scroll down and tap 'Add to Home Screen'", + "iosStep3": "3. Tap 'Add' to confirm installation", + "iosNote": "Once installed, you can use it like a native app" + } } } diff --git a/src/locales/zh-CN.json b/src/locales/zh-CN.json index d54e2ea..3930a66 100644 --- a/src/locales/zh-CN.json +++ b/src/locales/zh-CN.json @@ -443,5 +443,19 @@ "amountMaxError": "划转数量不能超过可用余额 {amount}", "fromAccountRequired": "请选择转出账户", "toAccountRequired": "请选择转入账户" + }, + "pwa": { + "install": { + "installApp": "安装应用", + "addToHomeScreen": "添加到主屏幕", + "howToInstall": "如何安装", + "success": "安装成功", + "successMessage": "应用已成功添加到您的设备", + "iosTitle": "在 iOS 上安装应用", + "iosStep1": "1. 点击底部工具栏的分享按钮", + "iosStep2": "2. 向下滚动并点击添加到主屏幕", + "iosStep3": "3. 点击添加确认安装", + "iosNote": "安装后可以像原生应用一样使用" + } } } diff --git a/src/router/index.ts b/src/router/index.ts index 81788ef..bb64eb6 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -142,39 +142,23 @@ const routes: Array = [ }, { path: "/trade-settings/my-subscribe", - component: () => import("@/views/trade-settings/my-subscribe/outlet.vue"), + component: () => import("@/views/trade-settings/my-subscribe/index.vue"), + meta: { requiresAuth: true }, + }, + { + path: "/trade-settings/my-subscribe/:id", + component: () => import("@/views/trade-settings/my-subscribe/detail.vue"), meta: { requiresAuth: true }, - children: [ - { - path: "", - component: () => import("@/views/trade-settings/my-subscribe/index.vue"), - meta: { requiresAuth: true }, - }, - { - path: ":id", - props: true, - component: () => import("@/views/trade-settings/my-subscribe/detail.vue"), - meta: { requiresAuth: true }, - }, - ], }, { path: "/trade-settings/my-issues", - component: () => import("@/views/trade-settings/my-issues/outlet.vue"), + component: () => import("@/views/trade-settings/my-issues/index.vue"), + meta: { requiresAuth: true }, + }, + { + path: "/trade-settings/my-issues/:id", + component: () => import("@/views/trade-settings/my-issues/detail.vue"), meta: { requiresAuth: true }, - children: [ - { - path: "", - component: () => import("@/views/trade-settings/my-issues/index.vue"), - meta: { requiresAuth: true }, - }, - { - path: ":id", - props: true, - component: () => import("@/views/trade-settings/my-issues/detail.vue"), - meta: { requiresAuth: true }, - }, - ], }, { path: "/trade-settings/bank-management/add", diff --git a/src/store/user.ts b/src/store/user.ts index 65e842d..c41e71a 100644 --- a/src/store/user.ts +++ b/src/store/user.ts @@ -19,6 +19,7 @@ export const useUserStore = defineStore("user", () => { } function setToken(value: string) { + localStorage.setItem("user-token", value); token.value = value; } diff --git a/src/views/riwa/index.vue b/src/views/riwa/index.vue index f8c9496..0b62fb8 100644 --- a/src/views/riwa/index.vue +++ b/src/views/riwa/index.vue @@ -15,7 +15,7 @@ import Rwa from "./components/rwa.vue"; - +