uni-app 微信小程序前端,Vue 2 语法,家庭教育任务管理。
| Task | Location | Notes |
|---|---|---|
| 页面组件 | pages/*/ |
login, index, tasks, rewards, profile, guide, games等 |
| 页面注册 | pages.json |
TabBar配置和页面路径 |
| 应用配置 | manifest.json |
AppID: wx5ba8038ef16fb245 |
| 全局样式 | uni.scss |
SCSS变量和全局样式 |
| 应用入口 | App.vue |
全局生命周期和配置 |
| 组件库 | components/ |
地址选择器、任务卡片等可复用组件 |
| API配置 | config/ |
baseUrl和请求封装 |
pages/
├── index/ # 首页(角色分流)
├── login/ # 登录页
├── tasks/ # 任务管理
├── rewards/ # 心愿单
├── profile/ # 个人中心
├── guide/ # 成长规划师功能
├── games/ # 小游戏
└── parent/ # 家长专属功能
pages.json 中定义 5 个 TabBar 页面(TabBar 文案,非五维维度名):
pages/index/index - 角色分流入口pages/body/index - 身体健康维度pages/mind/index - 心智维度pages/action/index - 对应五维"行"(behavior),行为决定关系pages/profile/profile - 个人设置和积分onLoad、onShowpages.json 中注册uni.navigateTo、uni.redirectTouni.request,统一在 config.baseUrlcomponents/address-picker.vue 四级联动组件pages.json 注册config.baseUrl?.,微信小程序不支持 → 使用 && 代替(如 currentWish?.title 改为 currentWish && currentWish.title)pages/match/street-match.vue - 街道地址匹配功能pages/family/address-edit.vue - 家庭地址管理components/address-picker.vue - 省市区街道联动npm install # 安装依赖
npm run dev:mp-weixin # 开发模式 (微信小程序)
npm run build:mp-weixin # 构建生产版本
wx5ba8038ef16fb245config/index.js 的 baseUrl