From a810c21c1f10c4e12577d0ef3882ed996d7d3543 Mon Sep 17 00:00:00 2001 From: Seven Date: Mon, 22 Dec 2025 02:44:47 +0700 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E6=8F=90=E7=8E=B0?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=96=B0=E5=A2=9E=E6=8F=90=E7=8E=B0?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E5=92=8C=E7=8A=B6=E6=80=81=E6=9E=9A=E4=B8=BE?= =?UTF-8?q?=EF=BC=8C=E4=BC=98=E5=8C=96=E6=8F=90=E7=8E=B0=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/launch.json | 22 --- .vscode/settings.json | 56 +++++--- package.json | 2 +- pnpm-lock.yaml | 12 +- src/components/table/table-base.vue | 2 +- src/enum/index.ts | 13 ++ .../withdraw/approved/components/complete.vue | 70 ++++++++++ src/views/withdraw/approved/index.vue | 108 +++++++++------ src/views/withdraw/fiat/index.vue | 131 ++++++++++++++---- 9 files changed, 298 insertions(+), 118 deletions(-) delete mode 100644 .vscode/launch.json create mode 100644 src/views/withdraw/approved/components/complete.vue diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index e59c32b..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "type": "chrome", - "request": "launch", - "name": "Vue Debugger", - "url": "http://localhost:9527", - "webRoot": "${workspaceFolder}" - }, - { - "type": "node", - "request": "launch", - "name": "TS Debugger", - "runtimeExecutable": "tsx", - "skipFiles": ["/**", "${workspaceFolder}/node_modules/**"], - "program": "${file}", - "console": "integratedTerminal", - "internalConsoleOptions": "neverOpen" - } - ] -} diff --git a/.vscode/settings.json b/.vscode/settings.json index ee081a6..6195b15 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,21 +1,5 @@ { - "editor.codeActionsOnSave": { - "source.fixAll.eslint": "explicit", - "source.organizeImports": "never" - }, "editor.formatOnSave": false, - "eslint.validate": [ - "html", - "css", - "scss", - "json", - "jsonc", - "javascript", - "javascriptreact", - "typescript", - "typescriptreact", - "vue" - ], "i18n-ally.displayLanguage": "zh-cn", "i18n-ally.enabledParsers": ["ts"], "i18n-ally.enabledFrameworks": ["vue"], @@ -26,6 +10,44 @@ "moduleResolution": "node" }, "prettier.enable": false, - "typescript.tsdk": "node_modules/typescript/lib", + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit", + "source.organizeImports": "never" + }, + "eslint.rules.customizations": [ + { "rule": "style/*", "severity": "off", "fixable": true }, + { "rule": "format/*", "severity": "off", "fixable": true }, + { "rule": "*-indent", "severity": "off", "fixable": true }, + { "rule": "*-spacing", "severity": "off", "fixable": true }, + { "rule": "*-spaces", "severity": "off", "fixable": true }, + { "rule": "*-order", "severity": "off", "fixable": true }, + { "rule": "*-dangle", "severity": "off", "fixable": true }, + { "rule": "*-newline", "severity": "off", "fixable": true }, + { "rule": "*quotes", "severity": "off", "fixable": true }, + { "rule": "*semi", "severity": "off", "fixable": true } + ], + "eslint.validate": [ + "javascript", + "javascriptreact", + "typescript", + "typescriptreact", + "vue", + "html", + "markdown", + "json", + "jsonc", + "yaml", + "toml", + "xml", + "gql", + "graphql", + "astro", + "svelte", + "css", + "less", + "scss", + "pcss", + "postcss" + ], "unocss.root": ["./"] } diff --git a/package.json b/package.json index 090e7be..514b50b 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.33:9527/api/riwa-api-types-0.0.30.tgz", + "@riwa/api-types": "http://192.168.1.27:9527/api/riwa-api-types-0.0.44.tgz", "@sa/axios": "workspace:*", "@sa/color": "workspace:*", "@sa/hooks": "workspace:*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0f4e566..e4dd111 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.33:9527/api/riwa-api-types-0.0.30.tgz - version: http://192.168.1.33:9527/api/riwa-api-types-0.0.30.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.27:9527/api/riwa-api-types-0.0.44.tgz + version: http://192.168.1.27:9527/api/riwa-api-types-0.0.44.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 @@ -1068,9 +1068,9 @@ packages: '@quansync/fs@0.1.6': resolution: {integrity: sha512-zoA8SqQO11qH9H8FCBR7NIbowYARIPmBz3nKjgAaOUDi/xPAAu1uAgebtV7KXHTc6CDZJVRZ1u4wIGvY5CWYaw==} - '@riwa/api-types@http://192.168.1.33:9527/api/riwa-api-types-0.0.30.tgz': - resolution: {tarball: http://192.168.1.33:9527/api/riwa-api-types-0.0.30.tgz} - version: 0.0.30 + '@riwa/api-types@http://192.168.1.27:9527/api/riwa-api-types-0.0.44.tgz': + resolution: {tarball: http://192.168.1.27:9527/api/riwa-api-types-0.0.44.tgz} + version: 0.0.44 peerDependencies: '@elysiajs/eden': ^1.4.5 @@ -5057,7 +5057,7 @@ snapshots: dependencies: quansync: 0.3.0 - '@riwa/api-types@http://192.168.1.33:9527/api/riwa-api-types-0.0.30.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.27:9527/api/riwa-api-types-0.0.44.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/components/table/table-base.vue b/src/components/table/table-base.vue index 30e8c02..8a8eb8d 100644 --- a/src/components/table/table-base.vue +++ b/src/components/table/table-base.vue @@ -108,7 +108,7 @@ defineExpose({ +import { computed, ref } from 'vue'; +import type { Treaty } from '@elysiajs/eden'; +import { client, safeClient } from '@/service/api'; + +defineOptions({ name: 'WithdrawApprovedComplete' }); +const emit = defineEmits<{ + (e: 'close'): void; +}>(); + +const props = defineProps<{ + data: Treaty.Data['data'][number]; +}>(); + +const withdrawType = computed(() => props.data.withdrawMethod); + +const input = ref(''); +const loading = ref(false); + +async function handleSubmit() { + loading.value = true; + await safeClient( + client.api.admin.withdraw({ orderId: props.data.id }).complete.post({ + bankTransferProof: withdrawType.value === 'bank' ? input.value : undefined, + txHash: withdrawType.value === 'crypto' ? input.value : undefined, + cashPickupCode: withdrawType.value === 'cash' ? input.value : undefined + }) + ).finally(() => { + loading.value = false; + }); + window.$message?.success('操作成功'); + setTimeout(() => { + emit('close'); + }, 300); +} + + + + + diff --git a/src/views/withdraw/approved/index.vue b/src/views/withdraw/approved/index.vue index aa45cbe..a5de19d 100644 --- a/src/views/withdraw/approved/index.vue +++ b/src/views/withdraw/approved/index.vue @@ -1,9 +1,11 @@ diff --git a/src/views/withdraw/fiat/index.vue b/src/views/withdraw/fiat/index.vue index 2037a36..48009b1 100644 --- a/src/views/withdraw/fiat/index.vue +++ b/src/views/withdraw/fiat/index.vue @@ -1,15 +1,15 @@