From 8d0ba768a98af7bb12851821beec93caf9f25a38 Mon Sep 17 00:00:00 2001 From: Seven Date: Mon, 15 Dec 2025 00:25:03 +0700 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=20API=20=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=92=8C=E7=BB=84=E4=BB=B6=EF=BC=8C=E9=87=8D=E5=91=BD?= =?UTF-8?q?=E5=90=8D=E5=B8=82=E5=9C=BA=E4=B8=BA=E4=BA=A4=E6=98=93=EF=BC=8C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=93=8D=E4=BD=9C=E5=8C=85=E8=A3=85=E5=99=A8?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 4 + package.json | 2 +- pnpm-lock.yaml | 12 +-- src/api/types.ts | 4 +- src/views/market/index.vue | 4 +- .../trade/components/operation-wrapper.vue | 76 +++++++++++++++++++ src/views/trade/index.vue | 15 ++-- src/views/user/settings.vue | 8 +- src/views/withdraw/index.vue | 2 +- 9 files changed, 104 insertions(+), 23 deletions(-) create mode 100644 src/views/trade/components/operation-wrapper.vue diff --git a/components.d.ts b/components.d.ts index 7b526d2..6487e8a 100644 --- a/components.d.ts +++ b/components.d.ts @@ -19,6 +19,7 @@ declare module 'vue' { IonApp: typeof import('@ionic/vue')['IonApp'] IonAvatar: typeof import('@ionic/vue')['IonAvatar'] IonBackButton: typeof import('@ionic/vue')['IonBackButton'] + IonBackdrop: typeof import('@ionic/vue')['IonBackdrop'] IonButton: typeof import('@ionic/vue')['IonButton'] IonButtons: typeof import('@ionic/vue')['IonButtons'] IonCard: typeof import('@ionic/vue')['IonCard'] @@ -26,6 +27,7 @@ declare module 'vue' { IonCardHeader: typeof import('@ionic/vue')['IonCardHeader'] IonCardSubtitle: typeof import('@ionic/vue')['IonCardSubtitle'] IonCardTitle: typeof import('@ionic/vue')['IonCardTitle'] + IonCheckbox: typeof import('@ionic/vue')['IonCheckbox'] IonContent: typeof import('@ionic/vue')['IonContent'] IonHeader: typeof import('@ionic/vue')['IonHeader'] IonIcon: typeof import('@ionic/vue')['IonIcon'] @@ -70,6 +72,7 @@ declare global { const IonApp: typeof import('@ionic/vue')['IonApp'] const IonAvatar: typeof import('@ionic/vue')['IonAvatar'] const IonBackButton: typeof import('@ionic/vue')['IonBackButton'] + const IonBackdrop: typeof import('@ionic/vue')['IonBackdrop'] const IonButton: typeof import('@ionic/vue')['IonButton'] const IonButtons: typeof import('@ionic/vue')['IonButtons'] const IonCard: typeof import('@ionic/vue')['IonCard'] @@ -77,6 +80,7 @@ declare global { const IonCardHeader: typeof import('@ionic/vue')['IonCardHeader'] const IonCardSubtitle: typeof import('@ionic/vue')['IonCardSubtitle'] const IonCardTitle: typeof import('@ionic/vue')['IonCardTitle'] + const IonCheckbox: typeof import('@ionic/vue')['IonCheckbox'] const IonContent: typeof import('@ionic/vue')['IonContent'] const IonHeader: typeof import('@ionic/vue')['IonHeader'] const IonIcon: typeof import('@ionic/vue')['IonIcon'] diff --git a/package.json b/package.json index df1d433..27137b7 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "@elysiajs/eden": "^1.4.5", "@ionic/vue": "^8.7.11", "@ionic/vue-router": "^8.7.11", - "@riwa/api-types": "http://192.168.1.36:9527/api/riwa-api-types-0.0.6.tgz", + "@riwa/api-types": "http://192.168.1.36:9527/api/riwa-api-types-0.0.12.tgz", "@tailwindcss/vite": "^4.1.18", "@vueuse/core": "^14.1.0", "better-auth": "^1.4.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b7d87aa..ac56749 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,8 +36,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.36:9527/api/riwa-api-types-0.0.6.tgz - version: http://192.168.1.36:9527/api/riwa-api-types-0.0.6.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.36:9527/api/riwa-api-types-0.0.12.tgz + version: http://192.168.1.36:9527/api/riwa-api-types-0.0.12.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)) @@ -1251,9 +1251,9 @@ packages: '@quansync/fs@1.0.0': resolution: {integrity: sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ==} - '@riwa/api-types@http://192.168.1.36:9527/api/riwa-api-types-0.0.6.tgz': - resolution: {tarball: http://192.168.1.36:9527/api/riwa-api-types-0.0.6.tgz} - version: 0.0.6 + '@riwa/api-types@http://192.168.1.36:9527/api/riwa-api-types-0.0.12.tgz': + resolution: {tarball: http://192.168.1.36:9527/api/riwa-api-types-0.0.12.tgz} + version: 0.0.12 peerDependencies: '@elysiajs/eden': ^1.4.5 @@ -6053,7 +6053,7 @@ snapshots: dependencies: quansync: 1.0.0 - '@riwa/api-types@http://192.168.1.36:9527/api/riwa-api-types-0.0.6.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.36:9527/api/riwa-api-types-0.0.12.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/types.ts b/src/api/types.ts index dfac8d6..83a269b 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -11,11 +11,11 @@ export type DepositFiatData = Treaty.Data; export type BalancesData = Treaty.Data; -export type WithdrawBody = Omit[0], "assetCode" | "withdrawMethod"> & { +export type WithdrawBody = Omit[0], "assetCode" | "withdrawMethod"> & { assetCode: AssetCodeEnum; withdrawMethod: WithdrawMethodEnum; }; -export type UserProfileData = Treaty.Data; +export type UserProfileData = Treaty.Data["userProfile"]; export type UpdateUserProfileBody = Parameters[0]; diff --git a/src/views/market/index.vue b/src/views/market/index.vue index e5a2751..90b332b 100644 --- a/src/views/market/index.vue +++ b/src/views/market/index.vue @@ -5,14 +5,14 @@ - Market + Trade - Market + Trade diff --git a/src/views/trade/components/operation-wrapper.vue b/src/views/trade/components/operation-wrapper.vue new file mode 100644 index 0000000..afb0416 --- /dev/null +++ b/src/views/trade/components/operation-wrapper.vue @@ -0,0 +1,76 @@ + + + + + diff --git a/src/views/trade/index.vue b/src/views/trade/index.vue index e5a2751..6a6f30d 100644 --- a/src/views/trade/index.vue +++ b/src/views/trade/index.vue @@ -1,4 +1,8 @@ + + diff --git a/src/views/user/settings.vue b/src/views/user/settings.vue index c4f37c0..3a3b92b 100644 --- a/src/views/user/settings.vue +++ b/src/views/user/settings.vue @@ -11,7 +11,7 @@ const userProfile = ref(null); async function getUserProfile() { const { data } = await client.api.user.profile.get(); if (data) { - userProfile.value = data; + userProfile.value = data.userProfile; } } @@ -116,19 +116,19 @@ onMounted(() => {
- {{ userProfile?.fullName || 'User Name' }} + {{ userProfile?.nickname || 'User Name' }}
- +

Full Name

- {{ userProfile?.fullName || 'Not set' }} + {{ userProfile?.nickname || 'Not set' }}

diff --git a/src/views/withdraw/index.vue b/src/views/withdraw/index.vue index 7d292d4..dfb6dff 100644 --- a/src/views/withdraw/index.vue +++ b/src/views/withdraw/index.vue @@ -40,7 +40,7 @@ function handleCurrentChange() { } async function onSubmit() { - const { data } = await safeClient(client.api.asset.withdraw.post(form.value)); + const { data } = await safeClient(client.api.withdraw.post(form.value)); }