feat: 更新 @riwa/api-types 的依赖地址;调整 pnpm 锁定文件

This commit is contained in:
2025-12-30 17:48:18 +07:00
parent 5ed7781f36
commit 7ce60b860c
3 changed files with 15 additions and 47 deletions

View File

@@ -70,77 +70,45 @@ API 集成:
使用 TypeScript 严格模式,避免 any 类型 使用 TypeScript 严格模式,避免 any 类型
组件命名使用 PascalCase文件名使用 PascalCase 或 kebab-case 组件命名使用 PascalCase文件名使用 PascalCase 或 kebab-case
使用 @/ 作为 src 目录的别名 使用 @/ 作为 src 目录的别名
使用 #/ 作为类型定义的别名
颜色主题使用ion-color 变量,支持深色模式和浅色模式 颜色主题使用ion-color 变量,支持深色模式和浅色模式
2. 项目结构 2. 组件结构
```
src/
├── api/ # API 接口层
│ ├── enum.ts # 枚举定义
│ ├── index.ts # API 客户端配置
│ └── types.ts # API 类型定义
├── auth/ # 认证模块
│ ├── index.ts # 认证逻辑
│ ├── type.ts # 认证类型定义
│ └── components/ # 登录/注册组件
├── components/ # 可复用组件
│ ├── layout/ # 布局组件
│ └── ui/ # UI 基础组件
├── composables/ # Vue 组合式函数
├── locales/ # 国际化文件
├── router/ # 路由配置
├── store/ # Pinia 状态管理
├── theme/ # 主题样式文件
├── types/ # TypeScript 类型定义
├── utils/ # 工具函数
└── views/ # 页面组件
├── chat/ # 聊天页面
├── deposit/ # 充值页面
├── issue/ # 发行申请页面
├── market/ # 市场页面
├── onchain-address/ # 链上地址管理
├── riwa/ # 主页面
├── trade/ # 交易页面及相关组件
├── trade-settings/ # 交易设置(银行管理等)
├── user/ # 用户中心及设置
└── withdraw/ # 提现页面
```
3. 组件结构
使用 Ionic 组件库IonPage, IonHeader, IonContent, IonToolbar 等) 使用 Ionic 组件库IonPage, IonHeader, IonContent, IonToolbar 等)
页面组件放在 views 目录 页面组件放在 views 目录
可复用组件放在 components 目录 可复用组件放在 components 目录
每个页面组件必须包裹在 <IonPage> 中 每个页面组件必须包裹在 <IonPage> 中
4. 路由配置 3. 路由配置
使用 @ionic/vue-router 创建路由 使用 @ionic/vue-router 创建路由
采用嵌套路由结构,主要页面在 /layout 下 采用嵌套路由结构,主要页面在 /layout 下
懒加载页面组件以优化性能 懒加载页面组件以优化性能
路由配置在 router/index.ts 路由配置在 router/index.ts
支持路由守卫 (router/guard.ts) 支持路由守卫 (router/guard.ts)
5. 样式管理 4. 样式管理
TailwindCSS 4.x 作为主要样式框架,集成 Ionic CSS Variables TailwindCSS 4.x 作为主要样式框架,集成 Ionic CSS Variables
支持深色模式和浅色模式切换 支持深色模式和浅色模式切换
TailwindCSS 配置扩展了 Ionic 颜色变量 TailwindCSS 配置扩展了 Ionic 颜色变量
主题文件theme/variables.css, theme/ionic.css 主题文件theme/variables.css, theme/ionic.css
6. 自动导入配置 5. 自动导入配置
Vue 组合式函数自动导入composables、utils、store 目录 Vue 组合式函数自动导入composables、utils、store 目录
Vue 生态自动导入vue、vue-router、@vueuse/core、vue-i18n、pinia Vue 生态自动导入vue、vue-router、@vueuse/core、vue-i18n、pinia
组件自动导入IonicResolver、@iconify 图标 组件自动导入IonicResolver、@iconify 图标
支持目录作为命名空间 支持目录作为命名空间
7. 原生功能集成 6. 原生功能集成
通过 Capacitor 插件访问原生功能 通过 Capacitor 插件访问原生功能
配置文件capacitor.config.ts 配置文件capacitor.config.ts
iOS 构建目录ios iOS 构建目录ios
使用前检查平台兼容性 使用前检查平台兼容性
8. API 集成模式 7. API 集成模式
使用 @elysiajs/eden 进行类型安全的 API 调用 使用 @elysiajs/eden 进行类型安全的 API 调用
项目专用 API 类型定义:@riwa/api-types 项目专用 API 类型定义:@riwa/api-types
API 配置集中在 src/api/index.ts API 配置集中在 src/api/index.ts
枚举定义统一在 src/api/enum.ts 枚举定义统一在 src/api/enum.ts
9. 认证系统 8. 认证系统
集成 better-auth 提供现代认证功能 集成 better-auth 提供现代认证功能
认证逻辑封装在 src/auth/index.ts 认证逻辑封装在 src/auth/index.ts
支持登录、注册组件复用 支持登录、注册组件复用
认证状态管理通过 useAuth composable 认证状态管理通过 useAuth composable
10.图表集成 9. 图表集成
使用 TradingView Charting Library 集成金融图表 使用 TradingView Charting Library 集成金融图表
图表组件封装在 src/tradingview/index.tsx 图表组件封装在 src/tradingview/index.tsx
TradingView 官方文档https://www.tradingview.com/charting-library-docs/latest/getting_started/ TradingView 官方文档https://www.tradingview.com/charting-library-docs/latest/getting_started/

View File

@@ -33,7 +33,7 @@
"@elysiajs/eden": "^1.4.5", "@elysiajs/eden": "^1.4.5",
"@ionic/vue": "^8.7.11", "@ionic/vue": "^8.7.11",
"@ionic/vue-router": "^8.7.11", "@ionic/vue-router": "^8.7.11",
"@riwa/api-types": "http://192.168.1.27:9527/api/riwa-api-types-0.0.67.tgz", "@riwa/api-types": "http://192.168.1.3:9527/api/riwa-api-types-0.0.67.tgz",
"@tailwindcss/vite": "^4.1.18", "@tailwindcss/vite": "^4.1.18",
"@vee-validate/yup": "^4.15.1", "@vee-validate/yup": "^4.15.1",
"@vueuse/core": "^14.1.0", "@vueuse/core": "^14.1.0",

10
pnpm-lock.yaml generated
View File

@@ -57,8 +57,8 @@ importers:
specifier: ^8.7.11 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)) 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': '@riwa/api-types':
specifier: http://192.168.1.27:9527/api/riwa-api-types-0.0.67.tgz specifier: http://192.168.1.3:9527/api/riwa-api-types-0.0.67.tgz
version: http://192.168.1.27:9527/api/riwa-api-types-0.0.67.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))) version: http://192.168.1.3:9527/api/riwa-api-types-0.0.67.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': '@tailwindcss/vite':
specifier: ^4.1.18 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)) 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))
@@ -1401,8 +1401,8 @@ packages:
resolution: {integrity: sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==} resolution: {integrity: sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==}
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
'@riwa/api-types@http://192.168.1.27:9527/api/riwa-api-types-0.0.67.tgz': '@riwa/api-types@http://192.168.1.3:9527/api/riwa-api-types-0.0.67.tgz':
resolution: {tarball: http://192.168.1.27:9527/api/riwa-api-types-0.0.67.tgz} resolution: {tarball: http://192.168.1.3:9527/api/riwa-api-types-0.0.67.tgz}
version: 0.0.67 version: 0.0.67
peerDependencies: peerDependencies:
'@elysiajs/eden': ^1.4.5 '@elysiajs/eden': ^1.4.5
@@ -6644,7 +6644,7 @@ snapshots:
'@pkgr/core@0.2.9': {} '@pkgr/core@0.2.9': {}
'@riwa/api-types@http://192.168.1.27:9527/api/riwa-api-types-0.0.67.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/api-types@http://192.168.1.3:9527/api/riwa-api-types-0.0.67.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: 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)) '@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))