DEV_DSW b906058cdc feat: add service order component
- add CreateServiceOrder component and associated icon assets
- create reusable resolveChatSocketUrl utility with comprehensive test cases
- update development env config to use production websocket endpoint
- fix ChatCardAi layout by replacing inline-block with flex-1 class
- refactor ChatMainList websocket initialization to use the new socket utility
- switch to using environment variable for access token instead of getAccessToken
- correct relative import path for CreateServiceOrder in ChatMainList
2026-06-01 11:44:56 +08:00
2026-06-01 11:44:56 +08:00
2026-05-25 23:40:50 +08:00
2026-05-26 12:14:31 +08:00

nianxx-h5

基于 Vite 的 H5 Web 项目Vue 3 + TypeScript

技术栈

  • Vite 5
  • Vue 3 + TypeScript
  • vue-router 4
  • Pinia
  • Vant 4
  • Tailwind CSS v4通过 @tailwindcss/vite
  • vue-i18n
  • axios统一请求库封装见下文

目录约定

  • 入口:src/main.ts
  • 路由:src/router/index.ts
  • 页面:src/pages/
  • 组件:src/components/
  • 国际化:src/i18n/
  • 全局样式:src/styles/main.css
  • 工具:src/utils/
  • 共享类型:src/shared/

本地开发

使用 Yarn。

yarn
yarn dev

常用命令:

  • yarn dev:启动开发服务器(端口 5174
  • yarn typecheckvue-tsc --noEmit
  • yarn build:类型检查 + 构建
  • yarn preview:预览构建产物
  • yarn test:运行 src/**/*.test.tsNode 原生 test runner

需要编译/测试时请手动确认执行。

路由

当前已在 router/index.ts 配置页面路由(按 src/pages/ 目录落地):

  • //home:首页
  • /login:登录
  • /booking:预定
  • /goods/goods/album:商品详情/相册
  • /quick/quick/list:快速预定
  • /order/order/detail:订单列表/详情
  • /service/order:工单列表

统一请求库

统一请求库实现:

必须配置环境变量:

  • VITE_API_BASE_URL

可选配置:

  • VITE_API_TIMEOUT_MS(默认 15000

特殊说明uni-* 痕迹)

代码中存在 uni.* API、<uni-icons> 等用法。若最终运行环境为纯 H5 Web需要确认这些能力的提供方式注入/替换/降级)。

历史遗留问题清单(待逐个替换)

以下为当前仓库可证实的缺失/不一致点,建议按优先级逐步处理:

  • @/request/api/* 在多个页面/组件被引用,但仓库内暂无对应实现
  • @/utils 存在目录级导入,但暂无 src/utils/index.*
  • @/store 被引用但实际目录为 src/stores/
  • @/hooks/*@/constant/* 被引用但当前仓库未找到对应目录
  • src/utils/requets.ts 为空文件且命名疑似拼写遗留

更详细的引用点列表见:.trae/documents/统一请求库封装计划.md

协作规范

仓库协作约定见 AGENTS.md

Description
C端H5项目
Readme 7.4 MiB
Languages
Vue 59.3%
TypeScript 22.2%
JavaScript 8.4%
HTML 7.2%
SCSS 2.1%
Other 0.8%