时间:2019-04-30 来源:小程序工厂
问题已解决,我将分包放在主包pages里面就可以了,依据官方提供的demo。
{
"pages": [
"page/tabBar/component/index",
"page/tabBar/API/index"
],
"subPackages": [
{
"root": "page/component/",
"pages": [
"pages/view/view"
]
},
{
"root": "page/API/",
"pages": [
"pages/login/login",
"pages/get-user-info/get-user-info"
]
}
],
"networkTimeout": {
"request": 10000,
"connectSocket": 10000,
"uploadFile": 10000,
"downloadFile": 10000
},
"debug": false
}
而并没有采用官方提供的目录结构:
├── app.js
├── app.json
├── app.wxss
├── packageA
│ └── pages
│ ├── cat
│ └── dog
├── packageB
│ └── pages
│ ├── apple
│ └── banana
├── pages
│ ├── index
│ └── logs
└── utils
麻烦提供出现问题的机型和微信版本,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)
app.json里面注册的不太对吧。相对路径和绝对路径。看看有没有问题