From 3e17589f8d9d7daab950d44d4481e777a0e64cd4 Mon Sep 17 00:00:00 2001 From: Seven Date: Mon, 12 Jan 2026 16:51:07 +0700 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=20@riwa/api-types=20?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=E7=89=88=E6=9C=AC=EF=BC=8C=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E9=A2=84=E8=A7=88=E7=BB=84=E4=BB=B6=E5=88=B0?= =?UTF-8?q?=E5=85=B3=E4=BA=8E=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- pnpm-lock.yaml | 12 ++++++------ src/ui/file-preview/index.vue | 18 ++++++++++++------ src/ui/index.ts | 1 + src/views/trade-rwa/components/about.vue | 8 +++----- 5 files changed, 23 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 56a1ba8..49e8507 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "@elysiajs/eden": "^1.4.5", "@ionic/vue": "^8.7.11", "@ionic/vue-router": "^8.7.11", - "@riwa/api-types": "http://192.168.1.7:9527/api/riwa-eden-0.0.125.tgz", + "@riwa/api-types": "http://192.168.1.7:9527/api/riwa-eden-0.0.126.tgz", "@tailwindcss/vite": "^4.1.18", "@vee-validate/zod": "^4.15.1", "@vueuse/core": "^14.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 18d0d8e..6b3fa47 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -69,8 +69,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.7:9527/api/riwa-eden-0.0.125.tgz - version: '@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.125.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.7:9527/api/riwa-eden-0.0.126.tgz + version: '@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.126.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)) @@ -2804,9 +2804,9 @@ packages: '@remirror/core-constants@3.0.0': resolution: {integrity: sha512-42aWfPrimMfDKDi4YegyS7x+/0tlzaqwPQCULLanv3DMIlu96KTJR0fM5isWX2UViOqlGnX6YFgqWepcX+XMNg==} - '@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.125.tgz': - resolution: {tarball: http://192.168.1.7:9527/api/riwa-eden-0.0.125.tgz} - version: 0.0.125 + '@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.126.tgz': + resolution: {tarball: http://192.168.1.7:9527/api/riwa-eden-0.0.126.tgz} + version: 0.0.126 peerDependencies: '@elysiajs/eden': ^1.4.5 @@ -12161,7 +12161,7 @@ snapshots: '@remirror/core-constants@3.0.0': {} - '@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.125.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:9527/api/riwa-eden-0.0.126.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/ui/file-preview/index.vue b/src/ui/file-preview/index.vue index 5b27cc4..113a0d1 100644 --- a/src/ui/file-preview/index.vue +++ b/src/ui/file-preview/index.vue @@ -3,18 +3,24 @@ import IcRoundDownload from "~icons/ic/round-download"; import { client, safeClient } from "@/api"; const props = defineProps<{ - id: string; + fileIds: string[]; }>(); -const { data } = await safeClient(client.api.file_storage({ id: props.id }).get()); +const { data } = safeClient(client.api.file_storage.access_urls.post({ fileIds: props.fileIds })); + +function handleDownload(item) { + window.open(item.url, "_blank"); +} diff --git a/src/ui/index.ts b/src/ui/index.ts index 3ba6ac5..fa52837 100644 --- a/src/ui/index.ts +++ b/src/ui/index.ts @@ -37,5 +37,6 @@ declare module "vue" { UiTextareaLabel: typeof import("./textarea-label/index.vue")["default"]; UiBackButton: typeof import("./back-button/index.vue")["default"]; UiEmpty: typeof import("./empty/index.vue")["default"]; + UiFilePreview: typeof import("./file-preview/index.vue")["default"]; } } diff --git a/src/views/trade-rwa/components/about.vue b/src/views/trade-rwa/components/about.vue index ba4449d..5047b7a 100644 --- a/src/views/trade-rwa/components/about.vue +++ b/src/views/trade-rwa/components/about.vue @@ -5,18 +5,16 @@ import { client, safeClient } from "@/api"; const props = defineProps<{ data: RwaData | null; }>(); - -const { data: file } = safeClient(client.api.file_storage({ id: props.data?.product.proofDocumentIds || "" }).get());