From 1c14b5db126c906106660889804f0705503f41ce Mon Sep 17 00:00:00 2001 From: kola-web Date: Tue, 3 Feb 2026 12:34:37 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=88=9D=E6=AD=A5=E5=BC=80?= =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .trae/rules/project_rules.md | 9 + .trae/skills/wechat-miniprogram-skill/SKILL.md | 23 + project.config.json | 2 +- project.private.config.json | 112 +- src/app.json | 28 +- src/app.ts | 16 +- src/components/pickerArea/index.scss | 10 +- src/components/pickerAreaBak/index.json | 7 - src/components/pickerAreaBak/index.scss | 0 src/components/pickerAreaBak/index.ts | 76 -- src/components/pickerAreaBak/index.wxml | 13 - src/components/popup/index.json | 3 +- src/components/popup/index.scss | 1232 +-------------------- src/components/popup/index.ts | 3 - src/components/popup/index.wxml | 386 +------ src/components/uploadFile/index.js | 4 +- src/components/uploadFile/index.wxml | 61 +- src/doctor/components/doctor-tab-bar/index.scss | 11 +- src/doctor/components/doctor-tab-bar/index.ts | 52 +- src/doctor/components/doctor-tab-bar/index.wxml | 13 +- src/doctor/pages/articleList/index.json | 8 + src/doctor/pages/articleList/index.scss | 91 ++ src/doctor/pages/articleList/index.ts | 8 + src/doctor/pages/articleList/index.wxml | 30 + src/doctor/pages/changeNickname/index.json | 8 + src/doctor/pages/changeNickname/index.scss | 33 + src/doctor/pages/changeNickname/index.ts | 11 + src/doctor/pages/changeNickname/index.wxml | 11 + src/doctor/pages/changeTel/index.json | 8 + src/doctor/pages/changeTel/index.scss | 53 + src/doctor/pages/changeTel/index.ts | 78 ++ src/doctor/pages/changeTel/index.wxml | 33 + src/doctor/pages/home/index.json | 9 + src/doctor/pages/home/index.scss | 329 ++++++ src/doctor/pages/home/index.ts | 142 +++ src/doctor/pages/home/index.wxml | 203 ++++ src/doctor/pages/invite/index.json | 8 + src/doctor/pages/invite/index.scss | 101 ++ src/doctor/pages/invite/index.ts | 11 + src/doctor/pages/invite/index.wxml | 34 + src/doctor/pages/login/index.json | 9 + src/doctor/pages/login/index.scss | 139 +++ src/doctor/pages/login/index.ts | 154 +++ src/doctor/pages/login/index.wxml | 60 + src/doctor/pages/loginForm/index.json | 11 + src/doctor/pages/loginForm/index.scss | 163 +++ src/doctor/pages/loginForm/index.ts | 165 +++ src/doctor/pages/loginForm/index.wxml | 65 ++ src/doctor/pages/my/index.json | 8 + src/doctor/pages/my/index.scss | 99 ++ src/doctor/pages/my/index.ts | 23 + src/doctor/pages/my/index.wxml | 41 + src/doctor/pages/patientList/index.json | 8 + src/doctor/pages/patientList/index.scss | 285 +++++ src/doctor/pages/patientList/index.ts | 28 + src/doctor/pages/patientList/index.wxml | 125 +++ src/doctor/pages/stat/index.json | 8 + src/doctor/pages/stat/index.scss | 199 ++++ src/doctor/pages/stat/index.ts | 11 + src/doctor/pages/stat/index.wxml | 125 +++ src/ground/components/ground-tab-bar/index.json | 7 + src/ground/components/ground-tab-bar/index.scss | 15 + src/ground/components/ground-tab-bar/index.ts | 47 + src/ground/components/ground-tab-bar/index.wxml | 9 + src/ground/pages/changeNickname/index.json | 8 + src/ground/pages/changeNickname/index.scss | 33 + src/ground/pages/changeNickname/index.ts | 11 + src/ground/pages/changeNickname/index.wxml | 11 + src/ground/pages/changeTel/index.json | 8 + src/ground/pages/changeTel/index.scss | 53 + src/ground/pages/changeTel/index.ts | 78 ++ src/ground/pages/changeTel/index.wxml | 33 + src/ground/pages/home/index.json | 9 + src/ground/pages/home/index.scss | 345 ++++++ src/ground/pages/home/index.ts | 252 +++++ src/ground/pages/home/index.wxml | 273 +++++ src/ground/pages/invite/index.json | 8 + src/ground/pages/invite/index.scss | 101 ++ src/ground/pages/invite/index.ts | 11 + src/ground/pages/invite/index.wxml | 34 + src/ground/pages/login/index.json | 9 + src/ground/pages/login/index.scss | 119 ++ src/ground/pages/login/index.ts | 154 +++ src/ground/pages/login/index.wxml | 55 + src/ground/pages/my/index.json | 8 + src/ground/pages/my/index.scss | 95 ++ src/ground/pages/my/index.ts | 23 + src/ground/pages/my/index.wxml | 37 + src/ground/pages/pharmacist/index.json | 8 + src/ground/pages/pharmacist/index.scss | 172 +++ src/ground/pages/pharmacist/index.ts | 13 + src/ground/pages/pharmacist/index.wxml | 84 ++ src/ground/pages/stat/index.json | 8 + src/ground/pages/stat/index.scss | 199 ++++ src/ground/pages/stat/index.ts | 11 + src/ground/pages/stat/index.wxml | 125 +++ src/images/bg1.png | Bin 0 -> 510645 bytes src/images/bg2.png | Bin 0 -> 714597 bytes src/images/bg3.png | Bin 0 -> 691648 bytes src/images/bg4.png | Bin 0 -> 701725 bytes src/images/bg5.png | Bin 0 -> 1269800 bytes src/images/bg6.png | Bin 0 -> 138799 bytes src/images/bg7.png | Bin 0 -> 619133 bytes src/images/bg8.png | Bin 0 -> 1021523 bytes src/images/bg9.png | Bin 0 -> 175682 bytes src/images/cache/a1.png | Bin 0 -> 353187 bytes src/images/cache/a2.png | Bin 0 -> 262024 bytes src/images/cache/bg1.png | Bin 0 -> 317024 bytes src/images/cache/bg2.png | Bin 0 -> 226658 bytes src/images/cache/c1.png | Bin 0 -> 178633 bytes src/images/cache/p1.png | Bin 0 -> 55962 bytes src/images/cache/p2.png | Bin 0 -> 44926 bytes src/images/cache/p3.png | Bin 0 -> 59328 bytes src/images/cache/p4.png | Bin 0 -> 61193 bytes src/images/cache/p5.png | Bin 0 -> 55962 bytes src/images/content1.png | Bin 0 -> 42816 bytes src/images/content2.png | Bin 0 -> 34521 bytes src/images/icon1.png | Bin 0 -> 1373 bytes src/images/icon10.png | Bin 0 -> 1175 bytes src/images/icon11.png | Bin 0 -> 596 bytes src/images/icon12.png | Bin 0 -> 598 bytes src/images/icon13.png | Bin 0 -> 504 bytes src/images/icon14.png | Bin 0 -> 1449 bytes src/images/icon15.png | Bin 0 -> 1496 bytes src/images/icon16.png | Bin 0 -> 1045 bytes src/images/icon17.png | Bin 0 -> 1266 bytes src/images/icon18.png | Bin 0 -> 601 bytes src/images/icon19.png | Bin 0 -> 16198 bytes src/images/icon2.png | Bin 0 -> 398 bytes src/images/icon20.png | Bin 0 -> 15999 bytes src/images/icon21.png | Bin 0 -> 622 bytes src/images/icon3.png | Bin 0 -> 449 bytes src/images/icon4.png | Bin 0 -> 1435 bytes src/images/icon5.png | Bin 0 -> 1487 bytes src/images/icon6.png | Bin 0 -> 1070 bytes src/images/icon7.png | Bin 0 -> 956 bytes src/images/icon8.png | Bin 0 -> 497 bytes src/images/icon9.png | Bin 0 -> 428 bytes src/images/start1.png | Bin 0 -> 1843460 bytes src/images/tabbar/tab1-active.png | Bin 0 -> 1130 bytes src/images/tabbar/tab1.png | Bin 0 -> 1292 bytes src/images/tabbar/tab2-active.png | Bin 0 -> 1279 bytes src/images/tabbar/tab2.png | Bin 0 -> 1318 bytes src/images/tabbar/tab3-active.png | Bin 0 -> 1432 bytes src/images/tabbar/tab3.png | Bin 0 -> 1485 bytes src/images/tabbar/tab4-active.png | Bin 0 -> 1118 bytes src/images/tabbar/tab4.png | Bin 0 -> 1298 bytes src/images/tabbar/tab5-active.png | Bin 0 -> 1234 bytes src/images/tabbar/tab5.png | Bin 0 -> 1310 bytes src/images/tabbar/tab6-active.png | Bin 0 -> 1443 bytes src/images/tabbar/tab6.png | Bin 0 -> 1513 bytes src/images/tabbar/tab7-active.png | Bin 0 -> 1222 bytes src/images/tabbar/tab7.png | Bin 0 -> 1284 bytes src/images/tabbar/tabbar1-1-active.png | Bin 2044 -> 0 bytes src/images/tabbar/tabbar1-1.png | Bin 1677 -> 0 bytes src/images/tabbar/tabbar1-2-active.png | Bin 1570 -> 0 bytes src/images/tabbar/tabbar1-2.png | Bin 1235 -> 0 bytes src/images/tabbar/tabbar1-3-active.png | Bin 1406 -> 0 bytes src/images/tabbar/tabbar1-3.png | Bin 1170 -> 0 bytes src/images/tabbar/tabbar2-1-active.png | Bin 2021 -> 0 bytes src/images/tabbar/tabbar2-1.png | Bin 1674 -> 0 bytes src/images/tabbar/tabbar2-2-active.png | Bin 934 -> 0 bytes src/images/tabbar/tabbar2-2.png | Bin 808 -> 0 bytes src/images/tabbar/tabbar2-3-active.png | Bin 903 -> 0 bytes src/images/tabbar/tabbar2-3.png | Bin 753 -> 0 bytes src/images/tabbar/tabbar2-4-active.png | Bin 1442 -> 0 bytes src/images/tabbar/tabbar2-4.png | Bin 1170 -> 0 bytes src/images/tabbar/tabbar3-1-active.png | Bin 1885 -> 0 bytes src/images/tabbar/tabbar3-1.png | Bin 1660 -> 0 bytes src/images/tabbar/tabbar3-2-active.png | Bin 1305 -> 0 bytes src/images/tabbar/tabbar3-2.png | Bin 1170 -> 0 bytes src/images/tabbar/tabbar3-3-active.png | Bin 894 -> 0 bytes src/images/tabbar/tabbar3-3.png | Bin 806 -> 0 bytes src/pages/index/index.scss | 124 ++- src/pages/index/index.ts | 276 +---- src/pages/index/index.wxml | 45 +- src/pages/start/index.wxml | 2 +- src/pages/work/index.json | 6 + src/pages/work/index.scss | 71 ++ src/pages/work/index.ts | 23 + src/pages/work/index.wxml | 39 + src/patient/components/patient-tab-bar/index.json | 7 - src/patient/components/patient-tab-bar/index.scss | 19 - src/patient/components/patient-tab-bar/index.ts | 66 -- src/patient/components/patient-tab-bar/index.wxml | 14 - 185 files changed, 6037 insertions(+), 2117 deletions(-) create mode 100644 .trae/rules/project_rules.md create mode 100644 .trae/skills/wechat-miniprogram-skill/SKILL.md delete mode 100644 src/components/pickerAreaBak/index.json delete mode 100644 src/components/pickerAreaBak/index.scss delete mode 100644 src/components/pickerAreaBak/index.ts delete mode 100644 src/components/pickerAreaBak/index.wxml create mode 100644 src/doctor/pages/articleList/index.json create mode 100644 src/doctor/pages/articleList/index.scss create mode 100644 src/doctor/pages/articleList/index.ts create mode 100644 src/doctor/pages/articleList/index.wxml create mode 100644 src/doctor/pages/changeNickname/index.json create mode 100644 src/doctor/pages/changeNickname/index.scss create mode 100644 src/doctor/pages/changeNickname/index.ts create mode 100644 src/doctor/pages/changeNickname/index.wxml create mode 100644 src/doctor/pages/changeTel/index.json create mode 100644 src/doctor/pages/changeTel/index.scss create mode 100644 src/doctor/pages/changeTel/index.ts create mode 100644 src/doctor/pages/changeTel/index.wxml create mode 100644 src/doctor/pages/home/index.json create mode 100644 src/doctor/pages/home/index.scss create mode 100644 src/doctor/pages/home/index.ts create mode 100644 src/doctor/pages/home/index.wxml create mode 100644 src/doctor/pages/invite/index.json create mode 100644 src/doctor/pages/invite/index.scss create mode 100644 src/doctor/pages/invite/index.ts create mode 100644 src/doctor/pages/invite/index.wxml create mode 100644 src/doctor/pages/login/index.json create mode 100644 src/doctor/pages/login/index.scss create mode 100644 src/doctor/pages/login/index.ts create mode 100644 src/doctor/pages/login/index.wxml create mode 100644 src/doctor/pages/loginForm/index.json create mode 100644 src/doctor/pages/loginForm/index.scss create mode 100644 src/doctor/pages/loginForm/index.ts create mode 100644 src/doctor/pages/loginForm/index.wxml create mode 100644 src/doctor/pages/my/index.json create mode 100644 src/doctor/pages/my/index.scss create mode 100644 src/doctor/pages/my/index.ts create mode 100644 src/doctor/pages/my/index.wxml create mode 100644 src/doctor/pages/patientList/index.json create mode 100644 src/doctor/pages/patientList/index.scss create mode 100644 src/doctor/pages/patientList/index.ts create mode 100644 src/doctor/pages/patientList/index.wxml create mode 100644 src/doctor/pages/stat/index.json create mode 100644 src/doctor/pages/stat/index.scss create mode 100644 src/doctor/pages/stat/index.ts create mode 100644 src/doctor/pages/stat/index.wxml create mode 100644 src/ground/components/ground-tab-bar/index.json create mode 100644 src/ground/components/ground-tab-bar/index.scss create mode 100644 src/ground/components/ground-tab-bar/index.ts create mode 100644 src/ground/components/ground-tab-bar/index.wxml create mode 100644 src/ground/pages/changeNickname/index.json create mode 100644 src/ground/pages/changeNickname/index.scss create mode 100644 src/ground/pages/changeNickname/index.ts create mode 100644 src/ground/pages/changeNickname/index.wxml create mode 100644 src/ground/pages/changeTel/index.json create mode 100644 src/ground/pages/changeTel/index.scss create mode 100644 src/ground/pages/changeTel/index.ts create mode 100644 src/ground/pages/changeTel/index.wxml create mode 100644 src/ground/pages/home/index.json create mode 100644 src/ground/pages/home/index.scss create mode 100644 src/ground/pages/home/index.ts create mode 100644 src/ground/pages/home/index.wxml create mode 100644 src/ground/pages/invite/index.json create mode 100644 src/ground/pages/invite/index.scss create mode 100644 src/ground/pages/invite/index.ts create mode 100644 src/ground/pages/invite/index.wxml create mode 100644 src/ground/pages/login/index.json create mode 100644 src/ground/pages/login/index.scss create mode 100644 src/ground/pages/login/index.ts create mode 100644 src/ground/pages/login/index.wxml create mode 100644 src/ground/pages/my/index.json create mode 100644 src/ground/pages/my/index.scss create mode 100644 src/ground/pages/my/index.ts create mode 100644 src/ground/pages/my/index.wxml create mode 100644 src/ground/pages/pharmacist/index.json create mode 100644 src/ground/pages/pharmacist/index.scss create mode 100644 src/ground/pages/pharmacist/index.ts create mode 100644 src/ground/pages/pharmacist/index.wxml create mode 100644 src/ground/pages/stat/index.json create mode 100644 src/ground/pages/stat/index.scss create mode 100644 src/ground/pages/stat/index.ts create mode 100644 src/ground/pages/stat/index.wxml create mode 100644 src/images/bg1.png create mode 100644 src/images/bg2.png create mode 100644 src/images/bg3.png create mode 100644 src/images/bg4.png create mode 100644 src/images/bg5.png create mode 100644 src/images/bg6.png create mode 100644 src/images/bg7.png create mode 100644 src/images/bg8.png create mode 100644 src/images/bg9.png create mode 100644 src/images/cache/a1.png create mode 100644 src/images/cache/a2.png create mode 100644 src/images/cache/bg1.png create mode 100644 src/images/cache/bg2.png create mode 100644 src/images/cache/c1.png create mode 100644 src/images/cache/p1.png create mode 100644 src/images/cache/p2.png create mode 100644 src/images/cache/p3.png create mode 100644 src/images/cache/p4.png create mode 100644 src/images/cache/p5.png create mode 100644 src/images/content1.png create mode 100644 src/images/content2.png create mode 100644 src/images/icon1.png create mode 100644 src/images/icon10.png create mode 100644 src/images/icon11.png create mode 100644 src/images/icon12.png create mode 100644 src/images/icon13.png create mode 100644 src/images/icon14.png create mode 100644 src/images/icon15.png create mode 100644 src/images/icon16.png create mode 100644 src/images/icon17.png create mode 100644 src/images/icon18.png create mode 100644 src/images/icon19.png create mode 100644 src/images/icon2.png create mode 100644 src/images/icon20.png create mode 100644 src/images/icon21.png create mode 100644 src/images/icon3.png create mode 100644 src/images/icon4.png create mode 100644 src/images/icon5.png create mode 100644 src/images/icon6.png create mode 100644 src/images/icon7.png create mode 100644 src/images/icon8.png create mode 100644 src/images/icon9.png create mode 100644 src/images/start1.png create mode 100644 src/images/tabbar/tab1-active.png create mode 100644 src/images/tabbar/tab1.png create mode 100644 src/images/tabbar/tab2-active.png create mode 100644 src/images/tabbar/tab2.png create mode 100644 src/images/tabbar/tab3-active.png create mode 100644 src/images/tabbar/tab3.png create mode 100644 src/images/tabbar/tab4-active.png create mode 100644 src/images/tabbar/tab4.png create mode 100644 src/images/tabbar/tab5-active.png create mode 100644 src/images/tabbar/tab5.png create mode 100644 src/images/tabbar/tab6-active.png create mode 100644 src/images/tabbar/tab6.png create mode 100644 src/images/tabbar/tab7-active.png create mode 100644 src/images/tabbar/tab7.png delete mode 100644 src/images/tabbar/tabbar1-1-active.png delete mode 100644 src/images/tabbar/tabbar1-1.png delete mode 100644 src/images/tabbar/tabbar1-2-active.png delete mode 100644 src/images/tabbar/tabbar1-2.png delete mode 100644 src/images/tabbar/tabbar1-3-active.png delete mode 100644 src/images/tabbar/tabbar1-3.png delete mode 100644 src/images/tabbar/tabbar2-1-active.png delete mode 100644 src/images/tabbar/tabbar2-1.png delete mode 100644 src/images/tabbar/tabbar2-2-active.png delete mode 100644 src/images/tabbar/tabbar2-2.png delete mode 100644 src/images/tabbar/tabbar2-3-active.png delete mode 100644 src/images/tabbar/tabbar2-3.png delete mode 100644 src/images/tabbar/tabbar2-4-active.png delete mode 100644 src/images/tabbar/tabbar2-4.png delete mode 100644 src/images/tabbar/tabbar3-1-active.png delete mode 100644 src/images/tabbar/tabbar3-1.png delete mode 100644 src/images/tabbar/tabbar3-2-active.png delete mode 100644 src/images/tabbar/tabbar3-2.png delete mode 100644 src/images/tabbar/tabbar3-3-active.png delete mode 100644 src/images/tabbar/tabbar3-3.png create mode 100644 src/pages/work/index.json create mode 100644 src/pages/work/index.scss create mode 100644 src/pages/work/index.ts create mode 100644 src/pages/work/index.wxml delete mode 100644 src/patient/components/patient-tab-bar/index.json delete mode 100644 src/patient/components/patient-tab-bar/index.scss delete mode 100644 src/patient/components/patient-tab-bar/index.ts delete mode 100644 src/patient/components/patient-tab-bar/index.wxml diff --git a/.trae/rules/project_rules.md b/.trae/rules/project_rules.md new file mode 100644 index 0000000..fc0c517 --- /dev/null +++ b/.trae/rules/project_rules.md @@ -0,0 +1,9 @@ +1. 本项目是一个基于微信小程序的药品查询应用 +2. 使用原生微信小程序+typescript+scss +3. figma设计稿的宽度是375px,1px=2rpx +4. 小程序的scss单位是rpx +5. 导航栏使用自定义导航栏,使用自定义组件 /components/navbar +6. 除了onLoad比寻存在外,其他生命周期函数,无须额外定义 +7. onLoad函数中需要隐去getApp().waitLogin(),页面使用的接口需要在登录后调用 +8. 生命周期函数和事件处理函数不应使用箭头函数 +9. getApp()应提取到全局变量中,避免重复调用 diff --git a/.trae/skills/wechat-miniprogram-skill/SKILL.md b/.trae/skills/wechat-miniprogram-skill/SKILL.md new file mode 100644 index 0000000..71dfa08 --- /dev/null +++ b/.trae/skills/wechat-miniprogram-skill/SKILL.md @@ -0,0 +1,23 @@ +--- +name: wm-skill +description: 本地微信小程序开发专家指南,重点关注性能、代码大小和原生兼容性。用于用原生typescript+scss开发微信小程序。 +--- + +# 角色:微信小程序专家(原生 JS) + +## 核心原则 +- 你是一名专注于原生微信小程序开发(JavaScript)的高级开发者。 +- 优先级:性能、代码大小和原生兼容性。 +- 禁止使用:Taro、Uni-app 或任何跨平台框架。 + +## 技术规范 +- **逻辑:** 使用 ES6+ TypeScript。 +- **状态管理:** 使用 `this.setData()`。为了性能,始终使用 **数据路径** 进行部分更新(例如:`this.setData({ 'list[0].text': 'new' })`)。 +- **视图(WXML):** 在 `wx:for` 中始终包含 `wx:key`。使用 `bind:tap`(冒泡)或 `catch:tap`(非冒泡)。 +- **样式(SCSS):** 对所有响应式布局使用 `rpx`。遵循 BEM 命名约定。 +- **组件:** 优先使用 `Component()` 而不是 `Page()`,以获得可重用逻辑和更好的 `setData` 性能。 + +## 错误预防 +- **iOS 日期:** 在传递给 `new Date()` 之前,始终将 `-` 替换为 `/`(例如:`str.replace(/-/g, '/')`)。 +- **导航:** 对标签页使用 `wx.switchTab`。监控页面栈限制(10)。 +- **原生组件:** 使用 `` 覆盖在 ``、`