From bdcb46ec42833905bd32d0d7fb77b0d14b2cc097 Mon Sep 17 00:00:00 2001 From: Seven Date: Wed, 14 Jan 2026 10:54:07 +0700 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=EF=BC=8C=E5=8D=87=E7=BA=A7=20API=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E8=87=B3=200.0.141=EF=BC=8C=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E9=92=B1=E5=8C=85=E4=BD=99=E9=A2=9D=E6=95=B0=E6=8D=AE=E7=BB=93?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 2 +- pnpm-lock.yaml | 14 +++++++------- pnpm-workspace.yaml | 2 +- src/api/types.ts | 2 ++ src/store/wallet.ts | 6 +++--- src/tradingview/index.ts | 2 +- src/views/user/components/asset.vue | 4 ++-- 7 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.env.production b/.env.production index 390c408..a6f7624 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,3 @@ -VITE_API_URL=http://192.168.1.7:9527 +VITE_API_URL=https://riwa-api.riwsan1.com VITE_TRADINGVIEW_LIBRARY_URL=https://dev.riwsan1.com # VITE_TRADINGVIEW_DATA_API_URL=https://demo-feed-data.tradingview.com \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f69e68a..b0d986e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -103,8 +103,8 @@ catalogs: specifier: ^8.7.11 version: 8.7.11 '@riwa/api-types': - specifier: http://192.168.1.7:9528/api/riwa-eden-0.0.139.tgz - version: 0.0.139 + specifier: http://192.168.1.7:9528/api/riwa-eden-0.0.141.tgz + version: 0.0.141 '@tailwindcss/vite': specifier: ^4.1.18 version: 4.1.18 @@ -322,7 +322,7 @@ importers: 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: 'catalog:' - version: '@riwa/eden@http://192.168.1.7:9528/api/riwa-eden-0.0.139.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)))' + version: '@riwa/eden@http://192.168.1.7:9528/api/riwa-eden-0.0.141.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: 'catalog:' 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)) @@ -3062,9 +3062,9 @@ packages: '@remirror/core-constants@3.0.0': resolution: {integrity: sha512-42aWfPrimMfDKDi4YegyS7x+/0tlzaqwPQCULLanv3DMIlu96KTJR0fM5isWX2UViOqlGnX6YFgqWepcX+XMNg==} - '@riwa/eden@http://192.168.1.7:9528/api/riwa-eden-0.0.139.tgz': - resolution: {tarball: http://192.168.1.7:9528/api/riwa-eden-0.0.139.tgz} - version: 0.0.139 + '@riwa/eden@http://192.168.1.7:9528/api/riwa-eden-0.0.141.tgz': + resolution: {tarball: http://192.168.1.7:9528/api/riwa-eden-0.0.141.tgz} + version: 0.0.141 peerDependencies: '@elysiajs/eden': ^1.4.5 @@ -12419,7 +12419,7 @@ snapshots: '@remirror/core-constants@3.0.0': {} - '@riwa/eden@http://192.168.1.7:9528/api/riwa-eden-0.0.139.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/eden@http://192.168.1.7:9528/api/riwa-eden-0.0.141.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/pnpm-workspace.yaml b/pnpm-workspace.yaml index 8339a10..09e2236 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -34,7 +34,7 @@ catalog: '@ionic/cli': ^7.2.1 '@ionic/vue': ^8.7.11 '@ionic/vue-router': ^8.7.11 - '@riwa/api-types': http://192.168.1.7:9528/api/riwa-eden-0.0.139.tgz + '@riwa/api-types': http://192.168.1.7:9528/api/riwa-eden-0.0.141.tgz '@tailwindcss/vite': ^4.1.18 '@types/lodash-es': ^4.17.12 '@types/node': ^24.10.2 diff --git a/src/api/types.ts b/src/api/types.ts index f6e9f70..43358d9 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -15,6 +15,8 @@ export type DepositFiatData = Treaty.Data; export type BalancesData = Treaty.Data; +export type BalancesSummaryData = Treaty.Data; + export type TotalAssetValue = Treaty.Data; export type WithdrawBody = Omit[0], "assetCode" | "withdrawMethod"> & { diff --git a/src/store/wallet.ts b/src/store/wallet.ts index 471a12a..7ff839a 100644 --- a/src/store/wallet.ts +++ b/src/store/wallet.ts @@ -1,4 +1,4 @@ -import type { BalancesData, BankAccountsData, SupportBanksData, TotalAssetValue } from "@/api/types"; +import type { BalancesData, BalancesSummaryData, BankAccountsData, SupportBanksData, TotalAssetValue } from "@/api/types"; import { defineStore } from "pinia"; import { client, safeClient } from "@/api"; @@ -10,7 +10,7 @@ interface USDTBalance { interface State { totalAssetValue: TotalAssetValue; - balances: BalancesData; + balances: BalancesSummaryData; fundingBalances: BalancesData; tradingBalances: BalancesData; bankAccounts: BankAccountsData[]; @@ -47,7 +47,7 @@ export const useWalletStore = defineStore("wallet", () => { } async function syncBalances() { - const { data: balances } = await safeClient(() => client.api.wallet.balances.get(), { silent: true }); + const { data: balances } = await safeClient(() => client.api.wallet.balances.summary.get(), { silent: true }); state.balances = balances.value || []; } diff --git a/src/tradingview/index.ts b/src/tradingview/index.ts index caf3d62..bd4edfd 100644 --- a/src/tradingview/index.ts +++ b/src/tradingview/index.ts @@ -14,7 +14,7 @@ const defaultOptions = { locale: "zh", library_path: `${VITE_TRADINGVIEW_LIBRARY_URL}/charting_library/`, datafeed, - interval: "1D" as ResolutionString, + interval: "1" as ResolutionString, symbol: "", debug: true, autosize: true, diff --git a/src/views/user/components/asset.vue b/src/views/user/components/asset.vue index b9d82ed..5b02cf1 100644 --- a/src/views/user/components/asset.vue +++ b/src/views/user/components/asset.vue @@ -48,12 +48,12 @@ const { balances, totalAssetValue } = storeToRefs(walletStore); {{ asset.assetCode }}
- Total: ${{ asset.total }} + {{ asset.asset.name }}
- ${{ Number(asset.available) }} + ${{ Number(asset.total) }}