From 984aff06b6c59aa77d8a3ef1a5a24a697c8bbe5a Mon Sep 17 00:00:00 2001 From: Seven Date: Wed, 24 Dec 2025 19:22:30 +0700 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E8=BD=AC=E8=B4=A6?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E5=8C=85=E5=90=AB=E8=BD=AC=E8=B4=A6?= =?UTF-8?q?=E8=A7=86=E5=9B=BE=E5=8F=8A=E7=9B=B8=E5=85=B3=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=EF=BC=9B=E6=9B=B4=E6=96=B0=20API=20=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E4=BE=9D=E8=B5=96=E8=87=B3=200.0.64?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/copilot-instructions.md | 8 +- package.json | 2 +- pnpm-lock.yaml | 12 +-- src/router/elegant/imports.ts | 1 + src/router/elegant/routes.ts | 12 ++- src/router/elegant/transform.ts | 1 + src/typings/elegant-router.d.ts | 3 + src/views/transfer/index.vue | 141 ++++++++++++++++++++++++++++++++ 8 files changed, 168 insertions(+), 12 deletions(-) create mode 100644 src/views/transfer/index.vue diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 9dcd6ec..a38243a 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -113,10 +113,10 @@ soybean-admin/ ### API 服务 -- API 定义位于 `src/service/api/` -- 使用 `@sa/axios` 封装的请求实例 -- 请求配置在 `src/service/request/` 中 -- 支持 TypeScript 类型定义 +- API 定义位于 `src/service/api/client` +- API 全部使用safeClient实例 + client.api.admin 发送请求 +- 字段严格遵循每个rpc接口的类型定义 +- 支持请求拦截、响应处理和错误处理 ### 样式开发 diff --git a/package.json b/package.json index e0eac3a..c6d2faa 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.27:9527/api/riwa-api-types-0.0.59.tgz", + "@riwa/api-types": "http://192.168.1.27:9527/api/riwa-api-types-0.0.64.tgz", "@sa/axios": "workspace:*", "@sa/color": "workspace:*", "@sa/hooks": "workspace:*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f741668..bb16d0d 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.27:9527/api/riwa-api-types-0.0.59.tgz - version: http://192.168.1.27:9527/api/riwa-api-types-0.0.59.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.64.tgz + version: http://192.168.1.27:9527/api/riwa-api-types-0.0.64.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.27:9527/api/riwa-api-types-0.0.59.tgz': - resolution: {tarball: http://192.168.1.27:9527/api/riwa-api-types-0.0.59.tgz} - version: 0.0.59 + '@riwa/api-types@http://192.168.1.27:9527/api/riwa-api-types-0.0.64.tgz': + resolution: {tarball: http://192.168.1.27:9527/api/riwa-api-types-0.0.64.tgz} + version: 0.0.64 peerDependencies: '@elysiajs/eden': ^1.4.5 @@ -5057,7 +5057,7 @@ snapshots: dependencies: quansync: 0.3.0 - '@riwa/api-types@http://192.168.1.27:9527/api/riwa-api-types-0.0.59.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.64.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/router/elegant/imports.ts b/src/router/elegant/imports.ts index 203bc73..b7e5979 100644 --- a/src/router/elegant/imports.ts +++ b/src/router/elegant/imports.ts @@ -25,6 +25,7 @@ export const views: Record Promise import("@/views/rwa/product/index.vue"), rwa_producttype: () => import("@/views/rwa/productType/index.vue"), rwa_subscribe: () => import("@/views/rwa/subscribe/index.vue"), + transfer: () => import("@/views/transfer/index.vue"), user_bank: () => import("@/views/user/bank/index.vue"), user_bankcard: () => import("@/views/user/bankcard/index.vue"), user_list: () => import("@/views/user/list/index.vue"), diff --git a/src/router/elegant/routes.ts b/src/router/elegant/routes.ts index 0f1b481..0793c22 100644 --- a/src/router/elegant/routes.ts +++ b/src/router/elegant/routes.ts @@ -214,5 +214,15 @@ export const generatedRoutes: GeneratedRoute[] = [ } } ] - } + }, + { + name: 'transfer', + path: '/transfer', + component: 'layout.base$view.transfer', + meta: { + title: 'transfer', + i18nKey: 'route.transfer', + order: 4 + } + }, ]; diff --git a/src/router/elegant/transform.ts b/src/router/elegant/transform.ts index 635c54f..1c4decd 100644 --- a/src/router/elegant/transform.ts +++ b/src/router/elegant/transform.ts @@ -175,6 +175,7 @@ const routeMap: RouteMap = { "rwa_product": "/rwa/product", "rwa_producttype": "/rwa/producttype", "rwa_subscribe": "/rwa/subscribe", + "transfer": "/transfer", "user": "/user", "user_bank": "/user/bank", "user_bankcard": "/user/bankcard", diff --git a/src/typings/elegant-router.d.ts b/src/typings/elegant-router.d.ts index 13c3cce..826cfcc 100644 --- a/src/typings/elegant-router.d.ts +++ b/src/typings/elegant-router.d.ts @@ -29,6 +29,7 @@ declare module "@elegant-router/types" { "rwa_product": "/rwa/product"; "rwa_producttype": "/rwa/producttype"; "rwa_subscribe": "/rwa/subscribe"; + "transfer": "/transfer"; "user": "/user"; "user_bank": "/user/bank"; "user_bankcard": "/user/bankcard"; @@ -76,6 +77,7 @@ declare module "@elegant-router/types" { | "iframe-page" | "login" | "rwa" + | "transfer" | "user" | "withdraw" >; @@ -104,6 +106,7 @@ declare module "@elegant-router/types" { | "rwa_product" | "rwa_producttype" | "rwa_subscribe" + | "transfer" | "user_bank" | "user_bankcard" | "user_list" diff --git a/src/views/transfer/index.vue b/src/views/transfer/index.vue new file mode 100644 index 0000000..235d66e --- /dev/null +++ b/src/views/transfer/index.vue @@ -0,0 +1,141 @@ + + + + +