From f53a72de4a8375a78699c4ec5ab4d7b34fa2fcbc Mon Sep 17 00:00:00 2001 From: Seven Date: Sun, 4 Jan 2026 21:05:38 +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=E8=87=B3=200.0.74=EF=BC=9B=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=A4=9A=E4=B8=AA=E8=A7=86=E5=9B=BE=E4=B8=AD=E7=9A=84=E2=80=9C?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E6=BF=80=E6=B4=BB=E2=80=9D=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E4=B8=BA=E2=80=9C=E6=98=AF=E5=90=A6=E5=90=AF=E7=94=A8=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- pnpm-lock.yaml | 12 ++++++------ src/views/asset/index.vue | 8 ++++---- src/views/tradingPairs/components/add.vue | 6 +----- src/views/tradingPairs/components/edit.vue | 4 ++-- src/views/tradingPairs/index.vue | 22 ++++++++-------------- src/views/user/bank/index.vue | 2 +- 7 files changed, 23 insertions(+), 33 deletions(-) diff --git a/package.json b/package.json index 899490d..f517dc7 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "@better-scroll/core": "2.5.1", "@elysiajs/eden": "^1.4.5", "@iconify/vue": "5.0.0", - "@riwa/api-types": "http://192.168.1.8:9527/api/riwa-api-types-0.0.70.tgz", + "@riwa/api-types": "http://192.168.1.8:9527/api/riwa-api-types-0.0.74.tgz", "@sa/axios": "workspace:*", "@sa/color": "workspace:*", "@sa/hooks": "workspace:*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2b8ecc8..b906fdc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,8 +18,8 @@ importers: specifier: 5.0.0 version: 5.0.0(vue@3.5.25(typescript@5.9.3)) '@riwa/api-types': - specifier: http://192.168.1.8:9527/api/riwa-api-types-0.0.70.tgz - version: http://192.168.1.8:9527/api/riwa-api-types-0.0.70.tgz(@elysiajs/eden@1.4.5(elysia@1.4.19(@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.8:9527/api/riwa-api-types-0.0.74.tgz + version: http://192.168.1.8:9527/api/riwa-api-types-0.0.74.tgz(@elysiajs/eden@1.4.5(elysia@1.4.19(@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))) '@sa/axios': specifier: workspace:* version: link:packages/axios @@ -1083,9 +1083,9 @@ packages: '@quansync/fs@0.1.6': resolution: {integrity: sha512-zoA8SqQO11qH9H8FCBR7NIbowYARIPmBz3nKjgAaOUDi/xPAAu1uAgebtV7KXHTc6CDZJVRZ1u4wIGvY5CWYaw==} - '@riwa/api-types@http://192.168.1.8:9527/api/riwa-api-types-0.0.70.tgz': - resolution: {tarball: http://192.168.1.8:9527/api/riwa-api-types-0.0.70.tgz} - version: 0.0.70 + '@riwa/api-types@http://192.168.1.8:9527/api/riwa-api-types-0.0.74.tgz': + resolution: {tarball: http://192.168.1.8:9527/api/riwa-api-types-0.0.74.tgz} + version: 0.0.74 peerDependencies: '@elysiajs/eden': ^1.4.5 @@ -5080,7 +5080,7 @@ snapshots: dependencies: quansync: 0.3.0 - '@riwa/api-types@http://192.168.1.8:9527/api/riwa-api-types-0.0.70.tgz(@elysiajs/eden@1.4.5(elysia@1.4.19(@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.8:9527/api/riwa-api-types-0.0.74.tgz(@elysiajs/eden@1.4.5(elysia@1.4.19(@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.19(@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/views/asset/index.vue b/src/views/asset/index.vue index 6657606..4280202 100644 --- a/src/views/asset/index.vue +++ b/src/views/asset/index.vue @@ -138,7 +138,7 @@ const columns: TableBaseColumns = [ title: '操作', fixed: 'right', key: 'operation', - width: 200, + width: 140, operations: (row: any) => [ { contentText: '编辑', @@ -180,15 +180,15 @@ const filterColumns: TableFilterColumns = [ key: 'name' }, { - title: '是否激活', + title: '是否启用', key: 'isActive', component: NSelect, componentProps: { placeholder: '请选择状态', clearable: true, options: [ - { label: '激活', value: true }, - { label: '未激活', value: false } + { label: '启用', value: true }, + { label: '未启用', value: false } ] } } diff --git a/src/views/tradingPairs/components/add.vue b/src/views/tradingPairs/components/add.vue index b817327..6131d01 100644 --- a/src/views/tradingPairs/components/add.vue +++ b/src/views/tradingPairs/components/add.vue @@ -79,11 +79,7 @@ function handleSubmit() { formInst.value?.validate(async errors => { if (!errors) { syncNumberToString(); - await safeClient(() => - client.api.admin.trading_pairs.post({ - ...form.value - }) - ); + await safeClient(() => client.api.admin.trading_pairs.post(form.value)); emit('close'); } }); diff --git a/src/views/tradingPairs/components/edit.vue b/src/views/tradingPairs/components/edit.vue index 20ddb71..186a129 100644 --- a/src/views/tradingPairs/components/edit.vue +++ b/src/views/tradingPairs/components/edit.vue @@ -84,8 +84,8 @@ function handleSubmit() { if (!errors) { syncNumberToString(); await safeClient(() => - client.api.admin.trading_pairs({ symbol: props.data.symbol }).patch({ - ...form.value + client.api.admin.trading_pairs.patch(form.value, { + query: { symbol: props.data.symbol } }) ); emit('close'); diff --git a/src/views/tradingPairs/index.vue b/src/views/tradingPairs/index.vue index 3abc46e..4e11a90 100644 --- a/src/views/tradingPairs/index.vue +++ b/src/views/tradingPairs/index.vue @@ -110,20 +110,12 @@ const columns: TableBaseColumns = [ align: 'center' }, { - title: '是否激活', + title: '是否启用', key: 'isActive', width: 140, align: 'center', render: row => { - return h( - NTag, - { - type: row.isActive ? 'success' : 'error' - }, - { - default: () => (row.isActive ? '激活' : '未激活') - } - ); + return row.isActive ? '是' : '否'; } }, { @@ -157,7 +149,9 @@ const columns: TableBaseColumns = [ positiveText: '确认', negativeText: '取消', onPositiveClick: async () => { - await safeClient(() => client.api.admin.trading_pairs({ symbol: row.symbol }).delete()); + await safeClient(() => + client.api.admin.trading_pairs.delete(undefined, { query: { symbol: row.symbol } }) + ); tableInst.value?.reload(); } }); @@ -196,15 +190,15 @@ const filterColumns: TableFilterColumns = [ } }, { - title: '是否激活', + title: '是否启用', key: 'isActive', component: NSelect, componentProps: { placeholder: '请选择状态', clearable: true, options: [ - { label: '激活', value: true }, - { label: '未激活', value: false } + { label: '是', value: true }, + { label: '否', value: false } ] } } diff --git a/src/views/user/bank/index.vue b/src/views/user/bank/index.vue index 64d7030..b6474e8 100644 --- a/src/views/user/bank/index.vue +++ b/src/views/user/bank/index.vue @@ -34,7 +34,7 @@ const columns: TableBaseColumns = [ key: 'bankCode' }, { - title: '是否激活', + title: '是否启用', key: 'isActive', render(row: any) { return row.isActive ? '是' : '否';