From aff0d9019a8c6eea5178757587e18cf55e1b665e Mon Sep 17 00:00:00 2001 From: Seven Date: Mon, 12 Jan 2026 12:58:37 +0700 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E8=BD=AC=E8=B4=A6?= =?UTF-8?q?=E7=BB=99=E7=94=A8=E6=88=B7=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E8=B7=AF=E7=94=B1=E5=92=8C=E4=BA=8C=E7=BB=B4=E7=A0=81?= =?UTF-8?q?=E6=89=AB=E6=8F=8F=E6=88=90=E5=8A=9F=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 2 + src/router/index.ts | 6 + src/views/scan-qr/index.vue | 16 +- src/views/wallet/transfer-to-user.vue | 254 ++++++++++++++++++++++++++ 4 files changed, 273 insertions(+), 5 deletions(-) create mode 100644 src/views/wallet/transfer-to-user.vue diff --git a/components.d.ts b/components.d.ts index 28f4ecd..6c75204 100644 --- a/components.d.ts +++ b/components.d.ts @@ -20,6 +20,7 @@ declare module 'vue' { IIcRoundArrowForwardIos: typeof import('~icons/ic/round-arrow-forward-ios')['default'] IonApp: typeof import('@ionic/vue')['IonApp'] IonAvatar: typeof import('@ionic/vue')['IonAvatar'] + IonBackButton: typeof import('@ionic/vue')['IonBackButton'] IonBadge: typeof import('@ionic/vue')['IonBadge'] IonButton: typeof import('@ionic/vue')['IonButton'] IonButtons: typeof import('@ionic/vue')['IonButtons'] @@ -79,6 +80,7 @@ declare global { const IIcRoundArrowForwardIos: typeof import('~icons/ic/round-arrow-forward-ios')['default'] const IonApp: typeof import('@ionic/vue')['IonApp'] const IonAvatar: typeof import('@ionic/vue')['IonAvatar'] + const IonBackButton: typeof import('@ionic/vue')['IonBackButton'] const IonBadge: typeof import('@ionic/vue')['IonBadge'] const IonButton: typeof import('@ionic/vue')['IonButton'] const IonButtons: typeof import('@ionic/vue')['IonButtons'] diff --git a/src/router/index.ts b/src/router/index.ts index 90cec83..e805c06 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -95,6 +95,12 @@ const routes: Array = [ component: () => import("@/views/wallet/transfer.vue"), meta: { requiresAuth: true }, }, + { + path: "/transfer_to_user/:id", + props: true, + component: () => import("@/views/wallet/transfer-to-user.vue"), + meta: { requiresAuth: true }, + }, { path: "/wallet/funding", component: () => import("@/views/wallet/funding.vue"), diff --git a/src/views/scan-qr/index.vue b/src/views/scan-qr/index.vue index bd21a57..977995b 100644 --- a/src/views/scan-qr/index.vue +++ b/src/views/scan-qr/index.vue @@ -4,13 +4,19 @@ import { toastController } from "@ionic/vue"; const router = useRouter(); const scanner = useTemplateRef>("scanner"); -function handleSuccess(value: string) { - toastController.create({ - message: String(value), - duration: 2000, +async function handleSuccess(value: string) { + const toast = await toastController.create({ + message: "扫描成功", + duration: 1000, position: "bottom", color: "success", - }).then(toast => toast.present()); + }); + await toast.present(); + + if (value.startsWith("/transfer_to_user/")) { + // 完整路径 + router.replace(value); + } } function handleError(error: Error) { diff --git a/src/views/wallet/transfer-to-user.vue b/src/views/wallet/transfer-to-user.vue new file mode 100644 index 0000000..7994d3a --- /dev/null +++ b/src/views/wallet/transfer-to-user.vue @@ -0,0 +1,254 @@ + + +