From 9ca9b33dfddeaf78633da1ca40206f5a49c717f7 Mon Sep 17 00:00:00 2001 From: Seven Date: Mon, 22 Dec 2025 22:40:18 +0700 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E8=B4=A6=E5=8D=95?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=8F=8A=E7=9B=B8=E5=85=B3=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=EF=BC=8C=E4=BC=98=E5=8C=96=E5=85=85=E5=80=BC=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=92=8C=E5=9B=BD=E9=99=85=E5=8C=96=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/copilot-instructions.md | 2 +- package.json | 2 +- pnpm-lock.yaml | 12 +- src/api/enum.ts | 5 + src/api/types.ts | 11 +- src/locales/en-US.json | 8 ++ src/locales/zh-CN.json | 8 ++ src/router/index.ts | 5 + src/ui/tag/index.vue | 8 +- src/views/trade/index.vue | 14 +-- src/views/user/components/wallet-card.vue | 11 +- src/views/wallet/bill.vue | 27 +++++ src/views/wallet/components/fait-deposit.vue | 115 +++++++++++++++++++ 13 files changed, 203 insertions(+), 25 deletions(-) create mode 100644 src/views/wallet/bill.vue create mode 100644 src/views/wallet/components/fait-deposit.vue diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 24efe78..dbc3f52 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -157,5 +157,5 @@ API 配置集中在 src/api/index.ts API 类型来自私有包 @riwa/api-types(需要特定访问权限) 表单验证使用 vee-validate + yup 组合 Capacitor 配置本地开发服务器地址为 http://localhost:5173 -国际化支持中文和英文,配置文件在 src/locales/ +国际化支持中文和英文,配置文件在 src/locales/ 目前多语言只需要支持中英文,其他语言先不要更改 样式使用 TailwindCSS 4.x + Ionic CSS Variables 混合模式 diff --git a/package.json b/package.json index d13f1c9..c587ad0 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "@elysiajs/eden": "^1.4.5", "@ionic/vue": "^8.7.11", "@ionic/vue-router": "^8.7.11", - "@riwa/api-types": "http://192.168.1.27:9527/api/riwa-api-types-0.0.51.tgz", + "@riwa/api-types": "http://192.168.1.27:9527/api/riwa-api-types-0.0.53.tgz", "@tailwindcss/vite": "^4.1.18", "@vee-validate/yup": "^4.15.1", "@vueuse/core": "^14.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0894abd..428b9a7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -54,8 +54,8 @@ importers: specifier: ^8.7.11 version: 8.7.11(@stencil/core@4.39.0)(vue-router@4.6.3(vue@3.5.25(typescript@5.9.3)))(vue@3.5.25(typescript@5.9.3)) '@riwa/api-types': - specifier: http://192.168.1.27:9527/api/riwa-api-types-0.0.51.tgz - version: http://192.168.1.27:9527/api/riwa-api-types-0.0.51.tgz(@elysiajs/eden@1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3))) + specifier: http://192.168.1.27:9527/api/riwa-api-types-0.0.53.tgz + version: http://192.168.1.27:9527/api/riwa-api-types-0.0.53.tgz(@elysiajs/eden@1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3))) '@tailwindcss/vite': specifier: ^4.1.18 version: 4.1.18(vite@7.2.7(@types/node@24.10.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.1)(yaml@2.8.2)) @@ -1354,9 +1354,9 @@ packages: resolution: {integrity: sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - '@riwa/api-types@http://192.168.1.27:9527/api/riwa-api-types-0.0.51.tgz': - resolution: {tarball: http://192.168.1.27:9527/api/riwa-api-types-0.0.51.tgz} - version: 0.0.51 + '@riwa/api-types@http://192.168.1.27:9527/api/riwa-api-types-0.0.53.tgz': + resolution: {tarball: http://192.168.1.27:9527/api/riwa-api-types-0.0.53.tgz} + version: 0.0.53 peerDependencies: '@elysiajs/eden': ^1.4.5 @@ -6453,7 +6453,7 @@ snapshots: '@pkgr/core@0.2.9': {} - '@riwa/api-types@http://192.168.1.27:9527/api/riwa-api-types-0.0.51.tgz(@elysiajs/eden@1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))': + '@riwa/api-types@http://192.168.1.27:9527/api/riwa-api-types-0.0.53.tgz(@elysiajs/eden@1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))': dependencies: '@elysiajs/eden': 1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)) diff --git a/src/api/enum.ts b/src/api/enum.ts index cca8cc7..966d1d0 100644 --- a/src/api/enum.ts +++ b/src/api/enum.ts @@ -3,6 +3,11 @@ export enum PaymentChannelEnum { CRYPTO = "crypto", } +export enum DepositTypeEnum { + FIAT = "fiat", + CRYPTO = "crypto", +} + export enum AssetCodeEnum { USDT = "USDT", OPTS = "OPTS", diff --git a/src/api/types.ts b/src/api/types.ts index 3518cb6..aba591d 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -3,11 +3,6 @@ import type { client } from "."; import type { AssetCodeEnum, PaymentChannelEnum, WithdrawMethodEnum } from "./enum"; import type { authClient } from "@/auth"; -export type DepositFiatBody = Parameters[0] & { - paymentChannel: PaymentChannelEnum; - assetCode: AssetCodeEnum; -}; - export type TreatyQuery = T extends (...args: any[]) => any ? NonNullable[0]>["query"]> : never; @@ -25,6 +20,8 @@ export type WithdrawBody = Omit[0], withdrawMethod: WithdrawMethodEnum; }; +export type DepositFiatBody = TreatyBody; + export type UserProfileData = Treaty.Data; export type UpdateUserProfileBody = TreatyBody; @@ -58,3 +55,7 @@ export type PhoneNumberVerifyClient = TreatyBody; export type EmailVerifyClient = TreatyBody; + +export type UserDepositOrderData = Treaty.Data["data"][number]; + +export type UserDepositOrderBody = TreatyQuery; diff --git a/src/locales/en-US.json b/src/locales/en-US.json index 50f0f99..27b4eb4 100644 --- a/src/locales/en-US.json +++ b/src/locales/en-US.json @@ -23,6 +23,14 @@ "note": "Please make sure to enter the correct amount. After submission, the funds will be credited to your account after review in the background.", "submit": "Submit", "submitSuccess": "Submission successful!" + }, + "status": { + "pending": "Pending", + "confirming": "Confirming", + "approved": "Approved", + "completed": "Completed", + "rejected": "Rejected", + "cancelled": "Cancelled" } }, "withdraw": { diff --git a/src/locales/zh-CN.json b/src/locales/zh-CN.json index dd8ea1b..083b3a5 100644 --- a/src/locales/zh-CN.json +++ b/src/locales/zh-CN.json @@ -23,6 +23,14 @@ "note": "请确保输入正确的金额。提交后,资金将在后台审核后计入您的账户。", "submit": "提交", "submitSuccess": "提交成功!" + }, + "status": { + "pending": "等待确认", + "confirming": "链上确认中", + "approved": "审核通过", + "completed": "已到账", + "rejected": "审核拒绝", + "cancelled": "已取消" } }, "withdraw": { diff --git a/src/router/index.ts b/src/router/index.ts index 65ee36f..5b99e57 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -55,6 +55,11 @@ const routes: Array = [ component: () => import("@/views/withdraw/index.vue"), meta: { requiresAuth: true }, }, + { + path: "/wallet/bill", + component: () => import("@/views/wallet/bill.vue"), + meta: { requiresAuth: true }, + }, { path: "/user/settings", component: () => import("@/views/user-settings/outlet.vue"), diff --git a/src/ui/tag/index.vue b/src/ui/tag/index.vue index 3ab84cd..53876c6 100644 --- a/src/ui/tag/index.vue +++ b/src/ui/tag/index.vue @@ -7,7 +7,7 @@ const { type = "primary", size = "medium", round = false } = defineProps<{ @@ -19,13 +19,13 @@ const { type = "primary", size = "medium", round = false } = defineProps<{ @apply px-3 py-1 text-xs; } .ui-tag.primary { - @apply bg-(--ion-color-primary) text-white; + @apply bg-(--ion-color-dark) text-white; } .ui-tag.secondary { - @apply bg-(--ion-color-secondary) text-white; + @apply bg-(--ion-color-medium-shade) text-white; } .ui-tag.tertiary { - @apply bg-(--ion-color-tertiary) text-white; + @apply bg-(--ion-color-medium-tint) text-white; } .ui-tag.success { @apply bg-(--ion-color-success) text-white; diff --git a/src/views/trade/index.vue b/src/views/trade/index.vue index 5d94b67..62fbe87 100644 --- a/src/views/trade/index.vue +++ b/src/views/trade/index.vue @@ -6,16 +6,16 @@ const { t } = useI18n(); diff --git a/src/views/wallet/components/fait-deposit.vue b/src/views/wallet/components/fait-deposit.vue new file mode 100644 index 0000000..8b4167b --- /dev/null +++ b/src/views/wallet/components/fait-deposit.vue @@ -0,0 +1,115 @@ + + + + +