From f78dfa87ed33f458ec09cac471aa91b9ea682e2f Mon Sep 17 00:00:00 2001 From: Seven Date: Sun, 14 Dec 2025 00:52:28 +0700 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=B3=95=E5=B8=81?= =?UTF-8?q?=E5=85=85=E5=80=BC=E9=A1=B5=E9=9D=A2=EF=BC=8C=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E8=B7=AF=E7=94=B1=E5=92=8C=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=EF=BC=8C=E4=BC=98=E5=8C=96=E9=92=B1=E5=8C=85=E5=8D=A1=E7=89=87?= =?UTF-8?q?=E4=BB=A5=E6=94=AF=E6=8C=81=E5=85=85=E5=80=BC=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auto-imports.d.ts | 2 +- components.d.ts | 6 ++ src/api/enum.ts | 9 +++ src/api/types.ts | 10 +++ src/router/index.ts | 4 ++ src/utils/ionic-helper.ts | 1 + src/views/deposit/fiat.vue | 71 +++++++++++++++++++ .../user/components/recharge-channel.vue | 20 +++--- src/views/user/components/wallet-card.vue | 14 ++-- 9 files changed, 123 insertions(+), 14 deletions(-) create mode 100644 src/api/enum.ts create mode 100644 src/api/types.ts create mode 100644 src/views/deposit/fiat.vue diff --git a/auto-imports.d.ts b/auto-imports.d.ts index c7eb0c6..d218836 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -307,7 +307,7 @@ declare global { export type { Component, Slot, Slots, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, ShallowRef, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue' import('vue') // @ts-ignore - export type { PageInstance, InputInstance } from './src/utils/ionic-helper' + export type { PageInstance, InputInstance, ModalInstance } from './src/utils/ionic-helper' import('./src/utils/ionic-helper') } diff --git a/components.d.ts b/components.d.ts index f19b662..467a543 100644 --- a/components.d.ts +++ b/components.d.ts @@ -38,6 +38,8 @@ declare module 'vue' { IonPage: typeof import('@ionic/vue')['IonPage'] IonRouterOutlet: typeof import('@ionic/vue')['IonRouterOutlet'] IonSearchbar: typeof import('@ionic/vue')['IonSearchbar'] + IonSelect: typeof import('@ionic/vue')['IonSelect'] + IonSelectOption: typeof import('@ionic/vue')['IonSelectOption'] IonTabBar: typeof import('@ionic/vue')['IonTabBar'] IonTabButton: typeof import('@ionic/vue')['IonTabButton'] IonTabs: typeof import('@ionic/vue')['IonTabs'] @@ -50,6 +52,7 @@ declare module 'vue' { UiDivider: typeof import('./src/components/ui/divider/index.vue')['default'] UiInput: typeof import('./src/components/ui/input/index.vue')['default'] UiInputLabel: typeof import('./src/components/ui/input-label/index.vue')['default'] + UiSelectLabel: typeof import('./src/components/ui/select-label/index.vue')['default'] } } @@ -81,6 +84,8 @@ declare global { const IonPage: typeof import('@ionic/vue')['IonPage'] const IonRouterOutlet: typeof import('@ionic/vue')['IonRouterOutlet'] const IonSearchbar: typeof import('@ionic/vue')['IonSearchbar'] + const IonSelect: typeof import('@ionic/vue')['IonSelect'] + const IonSelectOption: typeof import('@ionic/vue')['IonSelectOption'] const IonTabBar: typeof import('@ionic/vue')['IonTabBar'] const IonTabButton: typeof import('@ionic/vue')['IonTabButton'] const IonTabs: typeof import('@ionic/vue')['IonTabs'] @@ -93,4 +98,5 @@ declare global { const UiDivider: typeof import('./src/components/ui/divider/index.vue')['default'] const UiInput: typeof import('./src/components/ui/input/index.vue')['default'] const UiInputLabel: typeof import('./src/components/ui/input-label/index.vue')['default'] + const UiSelectLabel: typeof import('./src/components/ui/select-label/index.vue')['default'] } \ No newline at end of file diff --git a/src/api/enum.ts b/src/api/enum.ts new file mode 100644 index 0000000..19f7461 --- /dev/null +++ b/src/api/enum.ts @@ -0,0 +1,9 @@ +export enum PaymentChannelEnum { + FIAT = "fiat", + CRYPTO = "crypto", +} + +export enum AssetCodeEnum { + USDT = "USDT", + OPTS = "OPTS", +} diff --git a/src/api/types.ts b/src/api/types.ts new file mode 100644 index 0000000..cfeed57 --- /dev/null +++ b/src/api/types.ts @@ -0,0 +1,10 @@ +import type { Treaty } from "@elysiajs/eden"; +import type { client } from "."; +import type { AssetCodeEnum, PaymentChannelEnum } from "./enum"; + +export type DepositFiatBody = Parameters[0] & { + paymentChannel: PaymentChannelEnum; + assetCode: AssetCodeEnum; +}; + +export type DepositFiatData = Treaty.Data; diff --git a/src/router/index.ts b/src/router/index.ts index 2b9ec4c..07a7462 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -40,6 +40,10 @@ const routes: Array = [ path: "/onchain-address", component: () => import("@/views/onchain-address/index.vue"), }, + { + path: "/deposit/fiat", + component: () => import("@/views/deposit/fiat.vue"), + }, ]; const router = createRouter({ diff --git a/src/utils/ionic-helper.ts b/src/utils/ionic-helper.ts index e426a59..edfb742 100644 --- a/src/utils/ionic-helper.ts +++ b/src/utils/ionic-helper.ts @@ -1,2 +1,3 @@ export type PageInstance = InstanceType; export type InputInstance = InstanceType; +export type ModalInstance = InstanceType; diff --git a/src/views/deposit/fiat.vue b/src/views/deposit/fiat.vue new file mode 100644 index 0000000..e591f2f --- /dev/null +++ b/src/views/deposit/fiat.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/src/views/user/components/recharge-channel.vue b/src/views/user/components/recharge-channel.vue index e43ec2d..29e9623 100644 --- a/src/views/user/components/recharge-channel.vue +++ b/src/views/user/components/recharge-channel.vue @@ -1,6 +1,14 @@ - + diff --git a/src/views/user/components/wallet-card.vue b/src/views/user/components/wallet-card.vue index cbb38ad..5eac56d 100644 --- a/src/views/user/components/wallet-card.vue +++ b/src/views/user/components/wallet-card.vue @@ -1,17 +1,17 @@