微信小程序分包技术方案
一、背景与目标
- 项目形态:uni-app + Vue3 + Vite 的小程序项目,组件库为 wot-design-uni(easycom 全局引入),另含 echarts、jsencrypt 等依赖,业务页面较多。
- 小程序对包体积有硬性限制,页面与依赖持续增长后,若不做分包容易出现「主包超 2MB 无法上传」的问题。
- 分包目标:把非启动、非高频的业务页面拆到分包,压缩主包体积、缩短首屏启动时间,同时通过分包预下载降低分包页面的首次进入等待。
二、微信小程序体积限制(前提)
| 项目 | 限制 |
|---|---|
| 主包大小 | 不超过 2MB |
| 单个分包大小 | 不超过 2MB |
| 所有分包 + 主包总和 | 不超过 20MB |
超过主包 2MB 限制时,微信开发者工具会直接阻止上传,因此主包只应保留启动页、tabBar 页和高频页面。
三、当前分包现状
1. 总量
| 归属 | 页面数 | pages.json 配置位置 |
|---|---|---|
| 主包 | 23 | pages 数组 |
| 分包 pagesA | 39 | subPackages[0],root 为 pagesA |
| 分包 pagesB | 18 | subPackages[1],root 为 pagesB |
| 合计 | 80 | — |
2. 主包页面(pages 数组)
启动路由为主包第一项,即 pages/index/index。主包包含:
- 首页与入口:pages/index/index(tabBar 页)
- 登录相关:pages/login、pages/login-other、pages/password
- 管理中心:pages/management/index(tabBar 页)
- 管理中心下的高频子页:pages/management/needs(index、detail、needs-apply)、pages/management/lease(index、detail、pay-history、contract-list、contract-view)、pages/management/rent(index、rent-detail、rent-pay)
其中 tabBar 页面为 pages/index/index 与 pages/management/index,必须在主包。
3. 分包 pagesA(root: pagesA)
按业务拆分,共 39 页,包含三个模块:
- business(业务管理):业务入口、房产档案(assetArchives)、业务执行(applys)、合同管理(contractManagement)、预警信息(warningManagement)、客户档案(customerArchives)
- inspection(巡查管理):巡查首页、打卡签到、巡查详情、异常上报、巡查登记、异常问题、关联资产清单
- task(任务管理):任务首页、任务详情、任务执行
4. 分包 pagesB(root: pagesB)
按「审批 + 统计 + 缴费 + 系统 + 个人管理」拆分,共 18 页:
- audit(审批中心、审批详情)
- statistics(数据统计,内含 charts 图表组件)
- payment(缴费明细、历史缴费)
- webview(VR 全景)
- system(系统管理、信息维护、我的消息、消息详情、密码修改)
- management(我的收藏、发票下载与开票详情、信息维护与账号/企业/用户名设置)
四、目录结构与分包映射
| 源码目录 | 归属 | 说明 |
|---|---|---|
| src/pages | 主包 | 对应 pages 数组;只有注册的页面会被编译 |
| src/pagesA | 分包 pagesA | 对应 subPackages 中 root 为 pagesA 的配置 |
| src/pagesB | 分包 pagesB | 对应 subPackages 中 root 为 pagesB 的配置 |
| src/components、src/mixins、src/services、src/stores、src/utils | 主包公共资源 | 主包资源分包可引用,因此公共组件/接口/工具放主包是正确的 |
| src/static | 主包静态资源 | tabBar 图标只能使用本地图片,必须留在这里 |
| src/uni_modules | 默认进主包 | 如 lime-echart,分包若引用会一并进主包 |
| 项目根 static(README 约定) | 不打包 | 单独上传后由 VITE_APP_STATIC_URL 指向,避免占用包体积 |
编译产物(dist/*/mp-weixin)与源码一一对应:主包页面在 pages/ 下,分包页面分别输出到 pagesA/、pagesB/ 目录,并由 app.json 的 pages / subPackages / preloadRule 描述。
五、配置说明
1. pages.json 结构
- pages:主包页面数组,第一项为启动页;每项含 path 与 style。
- subPackages:分包数组,每项含 root(分包根目录,相对项目根)与 pages 数组;分包页面的 path 是相对 root 的路径,不带 root 前缀。
- preloadRule:分包预下载规则对象,键为触发页面路径,值为 { network, packages };packages 中填分包 root,
__APP__表示主包。 - 分包配置示意(结构与实际一致):
1"subPackages": [ 2 { "root": "pagesA", "pages": [ { "path": "business/index", "style": {} } ] }, 3 { "root": "pagesB", "pages": [ { "path": "system/index", "style": {} } ] } 4] 5
注意:pages.json 允许写注释(uni-app 会解析),但编译产物的 app.json 中注释会被移除。
六、注意事项(重点)
- tabBar 页面必须在主包:pages/index/index、pages/management/index 为 tabBar 页,不能移入分包,否则无法通过校验。
- 分包之间不能相互引用资源:pagesA 的页面不能 import pagesB 的组件或 JS;页面之间可以互相跳转,但资源引用只能「分包 → 主包」,不能「主包 → 分包」,也不能「分包 → 另一分包」。
- 公共资源应放主包:components、services、utils、stores、mixins 放主包是正确做法,分包可直接引用;反之把它们放进某个分包会导致其他分包无法使用。
- easycom 组件库会进主包:wot-design-uni 通过 pages.json 的 easycom 全局注册,编译产物中位于主包 node-modules 目录,会被所有分包共用,其体积直接计入主包,需控制使用范围。
- 第三方大依赖的归属:npm 依赖默认会被合入主包(common/vendor.js)。像 echarts 这类大依赖若只在个别页面使用,建议以「静态文件放分包目录」或「分包内按需引用」的方式规避,避免撑大主包。当前项目已把 echarts.min.js 放在 pagesB/static 下、统计页在分包内使用,方向正确。
- 静态资源放置位置决定归属:放在 src/static 会打进主包;放在分包 root(如 pagesB/static)下才会随分包打包;体积大的资源应走外部地址(VITE_APP_STATIC_URL)。
- 分包页面的路径写法:pages.json 中 path 不含 root;代码里跳转需写全路径(如
/pagesA/business/index);tabBar 页切换使用 uni.switchTab。 - 未注册的页面不会成为可访问页面:pages.json 中未注册的 .vue 不会被编译进包,新增页面务必同步注册,避免出现「本地有文件、线上打不开」。
- preloadRule 的方向与粒度:应由主包高频页预下载分包(而不是由分包页预下载主包);一个页面只配置一条规则;network 可选 all / wifi,仅在 wifi 下预下载可节省用户流量。
- 预下载不是免费:预下载会额外消耗流量与启动资源,只应对高频分包配置,避免一次性预下载全部分包。
- 分包 root 命名与层级:root 不能与主包目录重名或嵌套,也不能是另一个分包的子目录;分包页面 path 必须位于该 root 之下。
- 分包首次进入需下载:分包页面首次打开会有下载等待,可通过预下载、减小分包体积、首屏骨架/loading 缓解。
- 分包不影响条件编译:manifest 中的平台差异化配置(H5 / 小程序)与分包独立,互不干扰。
- 上传前的体积自检:微信开发者工具「详情 → 基本信息」可查看主包/分包体积,工具栏「代码依赖分析」可定位大文件来源;建议纳入提测/上线前的检查项。
七、验证与排查
- 本地编译:执行小程序构建命令(package.json 中的 build:mp-weixin)后,检查 dist 目录是否按 pages / pagesA / pagesB 正确产出。
- 配置核对:对比编译产物 app.json 的 pages、subPackages、preloadRule 与源码 pages.json 是否一致。
- 体积核对:微信开发者工具 > 详情 > 基本信息,查看主包与各分包体积是否超限。
- 依赖定位:微信开发者工具 > 代码依赖分析,确认大文件是否落在主包。
- 真机验证:分别从主包入口进入、直接进入分包页面(扫码指定页面路径),验证跳转与预下载是否正常。

附录:pages.json(完整)
1{ 2 "easycom": { 3 "autoscan": true, 4 "custom": { 5 // "^uni-(.*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue", 6 "^wd-(.*)": "wot-design-uni/components/wd-$1/wd-$1.vue" 7 } 8 }, 9 "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages 10 { 11 "path": "pages/index/index", 12 "style": { 13 "navigationStyle": "custom", 14 "navigationBarTitleText": "首页" 15 } 16 }, 17 { 18 "path": "pages/login", 19 "style": { 20 "navigationStyle": "custom", 21 "navigationBarTitleText": "登录" 22 } 23 }, 24 { 25 "path": "pages/login-other", 26 "style": { 27 "navigationStyle": "custom", 28 "navigationBarTitleText": "登录" 29 } 30 }, 31 { 32 "path": "pages/password", 33 "style": { 34 "navigationStyle": "custom", 35 "navigationBarTitleText": "找回密码" 36 } 37 }, 38 { 39 "path": "pages/index/index-company", 40 "style": { 41 "navigationBarTitleText": "公司介绍", 42 "navigationBarBackgroundColor": "#EAF7FF" 43 } 44 }, 45 { 46 "path": "pages/index/index-house", 47 "style": { 48 "navigationBarTitleText": "房屋信息", 49 "navigationBarBackgroundColor": "#FFF", 50 "enablePullDownRefresh": true 51 } 52 }, 53 { 54 "path": "pages/index/index-map", 55 "style": { 56 "navigationBarTitleText": "地图找地", 57 "navigationBarBackgroundColor": "#FFF" 58 } 59 }, 60 { 61 "path": "pages/index/detail", 62 "style": { 63 "navigationStyle": "custom", 64 "navigationBarTitleText": "详情信息" 65 } 66 }, 67 { 68 "path": "pages/message/index", 69 "style": { 70 "navigationStyle": "custom", 71 "navigationBarTitleText": "消息中心", 72 "enablePullDownRefresh": true 73 } 74 }, 75 { 76 "path": "pages/message/details", 77 "style": { 78 "navigationStyle": "custom", 79 "navigationBarTitleText": "消息详情" 80 } 81 }, 82 { 83 "path": "pages/management/index", 84 "style": { 85 "navigationStyle": "custom", 86 "navigationBarTitleText": "管理中心" 87 } 88 }, 89 90 { 91 "path": "pages/management/needs/index", 92 "style": { 93 "navigationStyle": "custom", 94 "navigationBarTitleText": "我的需求", 95 "enablePullDownRefresh": true 96 } 97 }, 98 { 99 "path": "pages/management/needs/detail", 100 "style": { 101 "navigationStyle": "custom", 102 "navigationBarTitleText": "需求详情" 103 } 104 }, 105 { 106 "path": "pages/management/needs/needs-apply", 107 "style": { 108 "navigationStyle": "custom", 109 "navigationBarTitleText": "需求申请" 110 } 111 }, 112 { 113 "path": "pages/management/lease/index", 114 "style": { 115 "navigationStyle": "custom", 116 "navigationBarTitleText": "我的租赁", 117 "enablePullDownRefresh": true 118 } 119 }, 120 { 121 "path": "pages/management/lease/detail", 122 "style": { 123 "navigationStyle": "custom", 124 "navigationBarTitleText": "租赁详情" 125 } 126 }, 127 { 128 "path": "pages/management/lease/pay-history", 129 "style": { 130 "navigationStyle": "custom", 131 "navigationBarTitleText": "历史缴费", 132 "enablePullDownRefresh": true 133 } 134 }, 135 { 136 "path": "pages/management/lease/contract-list", 137 "style": { 138 "navigationStyle": "custom", 139 "navigationBarTitleText": "合同列表", 140 "enablePullDownRefresh": true 141 } 142 }, 143 { 144 "path": "pages/management/lease/contract-view", 145 "style": { 146 "navigationStyle": "custom", 147 "navigationBarTitleText": "查看合同" 148 } 149 }, 150 { 151 "path": "pages/management/rent/index", 152 "style": { 153 "navigationStyle": "custom", 154 "navigationBarTitleText": "租金缴纳", 155 "enablePullDownRefresh": true 156 } 157 }, 158 { 159 "path": "pages/management/rent/rent-detail", 160 "style": { 161 "navigationStyle": "custom", 162 "navigationBarTitleText": "缴费详情" 163 } 164 }, 165 { 166 "path": "pages/management/rent/rent-pay", 167 "style": { 168 "navigationStyle": "custom", 169 "navigationBarTitleText": "租金缴纳" 170 } 171 }, 172 { 173 "path": "pages/index/topic-detail", 174 "style": { 175 "navigationStyle": "custom", 176 "navigationBarTitleText": "专题详情", 177 "enablePullDownRefresh": true 178 } 179 } 180 ], 181 // 分包配置 182 "subPackages": [{ 183 "root": "pagesA", 184 "pages": [{ 185 "path": "business/index", 186 "style": { 187 "navigationStyle": "custom", 188 "navigationBarTitleText": "业务管理" 189 } 190 }, 191 { 192 "path": "business/assetArchives/index-house", 193 "style": { 194 "navigationBarTitleText": "房屋管理", 195 "navigationBarBackgroundColor": "#FFF", 196 "enablePullDownRefresh": true 197 } 198 }, 199 { 200 "path": "business/applys/index", 201 "style": { 202 "navigationBarTitleText": "业务执行", 203 "navigationBarBackgroundColor": "#FFF", 204 "enablePullDownRefresh": true 205 } 206 }, 207 { 208 "path": "business/applys/detail", 209 "style": { 210 "navigationStyle": "custom", 211 "navigationBarTitleText": "详情信息" 212 } 213 }, 214 { 215 "path": "business/applys/followList", 216 "style": { 217 "navigationStyle": "custom", 218 "navigationBarTitleText": "跟进情况", 219 "enablePullDownRefresh": true 220 } 221 }, 222 { 223 "path": "business/applys/followDetail", 224 "style": { 225 "navigationStyle": "custom", 226 "navigationBarTitleText": "跟进详情" 227 } 228 }, 229 { 230 "path": "business/applys/followAdd", 231 "style": { 232 "navigationStyle": "custom", 233 "navigationBarTitleText": "添加跟进" 234 } 235 }, 236 { 237 "path": "business/assetArchives/detail", 238 "style": { 239 "navigationStyle": "custom", 240 "navigationBarTitleText": "详情信息" 241 } 242 }, 243 { 244 "path": "business/assetArchives/followUpStatus", 245 "style": { 246 "navigationStyle": "custom", 247 "navigationBarTitleText": "跟进情况", 248 "enablePullDownRefresh": true 249 } 250 }, 251 { 252 "path": "business/assetArchives/contractInformation", 253 "style": { 254 "navigationStyle": "custom", 255 "navigationBarTitleText": "合同信息", 256 "enablePullDownRefresh": true 257 } 258 }, 259 { 260 "path": "business/assetArchives/customerInformation", 261 "style": { 262 "navigationStyle": "custom", 263 "navigationBarTitleText": "客户信息", 264 "enablePullDownRefresh": true 265 } 266 }, 267 { 268 "path": "business/contractManagement/index", 269 "style": { 270 "navigationBarTitleText": "合同管理", 271 "navigationBarBackgroundColor": "#FFF", 272 "enablePullDownRefresh": true 273 } 274 }, 275 { 276 "path": "business/contractManagement/detail", 277 "style": { 278 "navigationStyle": "custom", 279 "navigationBarTitleText": "合同详情" 280 } 281 }, 282 { 283 "path": "business/contractManagement/meshForm", 284 "style": { 285 "navigationStyle": "custom", 286 "navigationBarTitleText": "公示信息" 287 } 288 }, 289 { 290 "path": "business/contractManagement/stampedContract", 291 "style": { 292 "navigationStyle": "custom", 293 "navigationBarTitleText": "盖章合同" 294 } 295 }, 296 { 297 "path": "business/contractManagement/contractForm", 298 "style": { 299 "navigationStyle": "custom", 300 "navigationBarTitleText": "添加合同" 301 } 302 }, 303 { 304 "path": "business/warningManagement/index", 305 "style": { 306 "navigationBarTitleText": "预警信息", 307 "navigationBarBackgroundColor": "#fff", 308 "enablePullDownRefresh": true 309 } 310 }, 311 { 312 "path": "business/customerArchives/index", 313 "style": { 314 "navigationBarTitleText": "客户档案", 315 "enablePullDownRefresh": true 316 } 317 }, 318 { 319 "path": "business/customerArchives/followUp", 320 "style": { 321 "navigationStyle": "custom", 322 "navigationBarTitleText": "跟进情况", 323 "enablePullDownRefresh": true 324 } 325 }, 326 { 327 "path": "business/customerArchives/followDetail", 328 "style": { 329 "navigationStyle": "custom", 330 "navigationBarTitleText": "跟进详情" 331 } 332 }, 333 { 334 "path": "business/customerArchives/customerDetail", 335 "style": { 336 "navigationStyle": "custom", 337 "navigationBarTitleText": "客户详情" 338 } 339 }, 340 { 341 "path": "business/customerArchives/authentication", 342 "style": { 343 "navigationStyle": "custom", 344 "navigationBarTitleText": "客户认证" 345 } 346 }, 347 { 348 "path": "business/customerArchives/customerForm", 349 "style": { 350 "navigationStyle": "custom", 351 "navigationBarTitleText": "添加客户" 352 } 353 }, 354 { 355 "path": "business/customerArchives/creditEvaluation", 356 "style": { 357 "navigationStyle": "custom", 358 "navigationBarTitleText": "信用评价", 359 "enablePullDownRefresh": true 360 } 361 }, 362 { 363 "path": "business/customerArchives/lease-history", 364 "style": { 365 "navigationStyle": "custom", 366 "navigationBarTitleText": "租赁历史", 367 "enablePullDownRefresh": true 368 } 369 }, 370 { 371 "path": "business/customerArchives/lease-detail", 372 "style": { 373 "navigationStyle": "custom", 374 "navigationBarTitleText": "租赁详情" 375 } 376 }, 377 { 378 "path": "business/customerArchives/rent-list", 379 "style": { 380 "navigationStyle": "custom", 381 "navigationBarTitleText": "缴纳情况" 382 } 383 }, 384 { 385 "path": "business/customerArchives/rent-detail", 386 "style": { 387 "navigationStyle": "custom", 388 "navigationBarTitleText": "缴纳详情" 389 } 390 }, 391 { 392 "path": "business/assetArchives/openMap", 393 "style": { 394 "navigationBarTitleText": "定位调整" 395 } 396 }, 397 { 398 "path": "inspection/index", 399 "style": { 400 "navigationBarTitleText": "巡查管理", 401 "enablePullDownRefresh": true 402 } 403 }, 404 { 405 "path": "inspection/checkIn", 406 "style": { 407 "navigationStyle": "custom", 408 "navigationBarTitleText": "打卡签到" 409 } 410 }, 411 { 412 "path": "inspection/detail", 413 "style": { 414 "navigationStyle": "custom", 415 "navigationBarTitleText": "巡查信息" 416 } 417 }, 418 { 419 "path": "inspection/abnormalsAdd", 420 "style": { 421 "navigationStyle": "custom", 422 "navigationBarTitleText": "异常上报" 423 } 424 }, 425 { 426 "path": "inspection/executionAdd", 427 "style": { 428 "navigationStyle": "custom", 429 "navigationBarTitleText": "巡查登记" 430 } 431 }, 432 { 433 "path": "inspection/abnormals-detail", 434 "style": { 435 "navigationStyle": "custom", 436 "navigationBarTitleText": "异常问题" 437 } 438 }, 439 { 440 "path": "inspection/assets-list", 441 "style": { 442 "navigationStyle": "custom", 443 "navigationBarTitleText": "关联资产清单" 444 } 445 }, 446 { 447 "path": "task/index", 448 "style": { 449 "navigationBarTitleText": "任务管理", 450 "enablePullDownRefresh": true 451 } 452 }, 453 { 454 "path": "task/detail", 455 "style": { 456 "navigationStyle": "custom", 457 "navigationBarTitleText": "任务详情" 458 } 459 }, 460 { 461 "path": "task/executionAdd", 462 "style": { 463 "navigationStyle": "custom", 464 "navigationBarTitleText": "任务执行" 465 } 466 } 467 ] 468 }, 469 { 470 "root": "pagesB", 471 "pages": [{ 472 "path": "audit/index", 473 "style": { 474 "navigationBarTitleText": "审批中心", 475 "enablePullDownRefresh": true 476 } 477 }, 478 { 479 "path": "audit/detail", 480 "style": { 481 "navigationBarTitleText": "审批详情", 482 "enablePullDownRefresh": true 483 } 484 }, 485 { 486 "path": "statistics/index", 487 "style": { 488 "navigationStyle": "custom", 489 "navigationBarTitleText": "数据统计" 490 } 491 }, 492 { 493 "path": "payment/index", 494 "style": { 495 "enablePullDownRefresh": true, 496 "navigationBarTitleText": "缴费明细" 497 } 498 }, 499 { 500 "path": "payment/payment-history", 501 "style": { 502 "navigationStyle": "custom", 503 "navigationBarTitleText": "历史缴费", 504 "enablePullDownRefresh": true 505 } 506 }, 507 { 508 "path": "webview/index", 509 "style": { 510 "navigationBarTitleText": "VR全景" 511 } 512 }, 513 { 514 "path": "system/index", 515 "style": { 516 "navigationStyle": "custom", 517 "navigationBarTitleText": "系统管理" 518 } 519 }, 520 { 521 "path": "system/setting", 522 "style": { 523 "navigationStyle": "custom", 524 "navigationBarTitleText": "信息维护" 525 } 526 }, 527 { 528 "path": "system/my-message", 529 "style": { 530 "navigationStyle": "custom", 531 "navigationBarTitleText": "我的消息", 532 "enablePullDownRefresh": true 533 } 534 }, 535 { 536 "path": "system/my-message-details", 537 "style": { 538 "navigationStyle": "custom", 539 "navigationBarTitleText": "消息详情" 540 } 541 }, 542 { 543 "path": "system/password", 544 "style": { 545 "navigationStyle": "custom", 546 "navigationBarTitleText": "密码修改" 547 } 548 }, 549 { 550 "path": "management/collection/index", 551 "style": { 552 "navigationStyle": "custom", 553 "navigationBarTitleText": "我的收藏", 554 "enablePullDownRefresh": true 555 } 556 }, 557 { 558 "path": "management/invoicing/invoice-view", 559 "style": { 560 "navigationStyle": "custom", 561 "navigationBarTitleText": "开票详情" 562 } 563 }, 564 { 565 "path": "management/invoicing/invoice-list", 566 "style": { 567 "navigationStyle": "custom", 568 "navigationBarTitleText": "发票下载", 569 "enablePullDownRefresh": true 570 } 571 }, 572 { 573 "path": "management/setting/index", 574 "style": { 575 "navigationStyle": "custom", 576 "navigationBarTitleText": "信息维护" 577 } 578 }, 579 { 580 "path": "management/setting/setting-account", 581 "style": { 582 "navigationStyle": "custom", 583 "navigationBarTitleText": "账号信息" 584 } 585 }, 586 { 587 "path": "management/setting/setting-company", 588 "style": { 589 "navigationStyle": "custom", 590 "navigationBarTitleText": "企业信息" 591 } 592 }, 593 { 594 "path": "management/setting/setting-nickname", 595 "style": { 596 "navigationStyle": "custom", 597 "navigationBarTitleText": "设置用户名" 598 } 599 } 600 ] 601 } 602 ], 603 "preloadRule": { 604 "pagesB/system/index": { 605 "network": "all", 606 "packages": ["__APP__"] 607 } 608 }, 609 "globalStyle": { 610 "navigationBarTextStyle": "black", 611 "navigationBarTitleText": "智汇资产管理系统", 612 "navigationBarBackgroundColor": "#FCFCFC", 613 "backgroundColor": "#FCFCFC" 614 }, 615 "tabBar": { 616 "custom": true, // 启用自定义 TabBar 617 "color": "#626768", 618 "selectedColor": "#2253F5", 619 "borderStyle": "white", 620 "backgroundColor": "#FFF", 621 "list": [ // 使用了自定义 TabBar,原生 list 中的文本、图标等配置会被忽略,仅用于满足小程序格式校验 622 { 623 "pagePath": "pages/index/index", 624 "text": "首页", 625 "iconPath": "static/icons/tabbar/home.png", 626 "selectedIconPath": "static/icons/tabbar/home_active.png" 627 }, 628 { 629 "pagePath": "pages/management/index", 630 "text": "管理中心", 631 "iconPath": "static/icons/tabbar/user.png", 632 "selectedIconPath": "static/icons/tabbar/user_active.png" 633 } 634 ] 635 }, 636 "condition" : { //模式配置,仅开发期间生效 637 "current": 0, //当前激活的模式(list 的索引项) 638 "list": [ 639 { 640 "name": "", //模式名称 641 "path": "", //启动页面,必选 642 "query": "" //启动参数,在页面的onLoad函数里面得到 643 } 644 ] 645 } 646} 647
参考文档
《【微信小程序】uni-app小程序项目分包技术方案》 是转载文章,点击查看原文。
