feat: 更新环境配置,调整 API URL 和库地址;添加 PWA 安装支持;更新路由和组件定义

This commit is contained in:
2026-01-05 14:17:47 +07:00
parent fd5f835e5c
commit 83c16fddd6
15 changed files with 66 additions and 39 deletions

View File

@@ -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

View File

@@ -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

2
auto-imports.d.ts vendored
View File

@@ -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<typeof import('@vueuse/core')['useObjectUrl']>
readonly useOffsetPagination: UnwrapRef<typeof import('@vueuse/core')['useOffsetPagination']>
readonly useOnline: UnwrapRef<typeof import('@vueuse/core')['useOnline']>
readonly usePWAInstall: UnwrapRef<typeof import('./src/composables/usePWAInstall')['usePWAInstall']>
readonly usePageLeave: UnwrapRef<typeof import('@vueuse/core')['usePageLeave']>
readonly useParallax: UnwrapRef<typeof import('@vueuse/core')['useParallax']>
readonly useParentElement: UnwrapRef<typeof import('@vueuse/core')['useParentElement']>

View File

@@ -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: {

4
components.d.ts vendored
View File

@@ -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']

View File

@@ -18,8 +18,12 @@
<!-- add to homescreen for ios -->
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-title" content="Ionic App" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="apple-mobile-web-app-title" content="Riwa" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<!-- 防止 iOS Safari 工具栏显示 -->
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
</head>
<body>

View File

@@ -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 = "";

Binary file not shown.

Before

Width:  |  Height:  |  Size: 930 B

View File

@@ -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> = T extends (...args: any[]) => any

View File

@@ -15,6 +15,10 @@ export const authClient = createAuthClient({
baseURL,
fetchOptions: {
credentials: "include",
auth: {
type: "Bearer",
token: () => localStorage.getItem("user-token") || "",
},
},
plugins: [emailOTPClient(), phoneNumberClient(), usernameClient()],
});

View File

@@ -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"
}
}
}

View File

@@ -443,5 +443,19 @@
"amountMaxError": "划转数量不能超过可用余额 {amount}",
"fromAccountRequired": "请选择转出账户",
"toAccountRequired": "请选择转入账户"
},
"pwa": {
"install": {
"installApp": "安装应用",
"addToHomeScreen": "添加到主屏幕",
"howToInstall": "如何安装",
"success": "安装成功",
"successMessage": "应用已成功添加到您的设备",
"iosTitle": "在 iOS 上安装应用",
"iosStep1": "1. 点击底部工具栏的分享按钮",
"iosStep2": "2. 向下滚动并点击添加到主屏幕",
"iosStep3": "3. 点击添加确认安装",
"iosNote": "安装后可以像原生应用一样使用"
}
}
}

View File

@@ -142,39 +142,23 @@ const routes: Array<RouteRecordRaw> = [
},
{
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",

View File

@@ -19,6 +19,7 @@ export const useUserStore = defineStore("user", () => {
}
function setToken(value: string) {
localStorage.setItem("user-token", value);
token.value = value;
}

View File

@@ -15,7 +15,7 @@ import Rwa from "./components/rwa.vue";
</ion-toolbar>
</ion-header>
<ion-content :fullscreen="true" class="ion-padding">
<pwa-install-button class="mb-4" />
<!-- <pwa-install-button class="mb-4" /> -->
<Rwa />
<News />
</ion-content>