feat: 更新环境配置,调整 API URL 和库地址;添加 PWA 安装支持;更新路由和组件定义
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -15,6 +15,10 @@ export const authClient = createAuthClient({
|
||||
baseURL,
|
||||
fetchOptions: {
|
||||
credentials: "include",
|
||||
auth: {
|
||||
type: "Bearer",
|
||||
token: () => localStorage.getItem("user-token") || "",
|
||||
},
|
||||
},
|
||||
plugins: [emailOTPClient(), phoneNumberClient(), usernameClient()],
|
||||
});
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -443,5 +443,19 @@
|
||||
"amountMaxError": "划转数量不能超过可用余额 {amount}",
|
||||
"fromAccountRequired": "请选择转出账户",
|
||||
"toAccountRequired": "请选择转入账户"
|
||||
},
|
||||
"pwa": {
|
||||
"install": {
|
||||
"installApp": "安装应用",
|
||||
"addToHomeScreen": "添加到主屏幕",
|
||||
"howToInstall": "如何安装",
|
||||
"success": "安装成功",
|
||||
"successMessage": "应用已成功添加到您的设备",
|
||||
"iosTitle": "在 iOS 上安装应用",
|
||||
"iosStep1": "1. 点击底部工具栏的分享按钮",
|
||||
"iosStep2": "2. 向下滚动并点击添加到主屏幕",
|
||||
"iosStep3": "3. 点击添加确认安装",
|
||||
"iosNote": "安装后可以像原生应用一样使用"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -19,6 +19,7 @@ export const useUserStore = defineStore("user", () => {
|
||||
}
|
||||
|
||||
function setToken(value: string) {
|
||||
localStorage.setItem("user-token", value);
|
||||
token.value = value;
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user