小程序
小游戏
企业微信
微信支付
扫描小程序码分享
3 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
https://developers.weixin.qq.com/miniprogram/dev/framework/subpackages/basic.html?search-key=%E5%88%86%E5%8C%85
最下面有一个demo,你可以下载下来参考官方的配置一下,你这个报错肯定是路径写得有问题
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
非常感谢
好的
在分包写的页面不要在pages数组中写。。。。。你自己仔细看文档去
{
"pages": [
"page/main",
"page/function",
"page/guide",
"page/me",
"settings/1.1",
"settings/setting",
"settings/about"
],
"subPackages": [
"root": "function",
"cal",
"map",
"situs",
"player",
"PEcal",
"scenery",
"notice",
"noticeDetail"
]
},
"root": "module",
"module1",
"module2",
"module3",
"module4",
"module5",
"module6",
"module7",
"sharePage",
"web",
"building"
}
"preloadRule": {
"page/main": {
"network": "all",
"packages": [
"module"
"page/function": {
"function"
"module/sharePage": {
"__APP__"
"window": {
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"navigationBarTitleText": "东师青年",
"navigationStyle": "custom",
"backgroundColor": "#efeef4",
"backgroundTextStyle": "dark",
"backgroundColorTop": "#f5f5f7",
"backgroundColorBottom": "#efeef4",
"pageOrientation": "auto"
"tabBar": {
"custom": false,
"color": "#8a8a8a",
"selectedColor": "#3cc51f",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"position": "bottom",
"list": [
"pagePath": "page/main",
"text": "首页",
"iconPath": "icon/tab/home.png",
"selectedIconPath": "icon/tab/@Home.png"
"pagePath": "page/function",
"text": "功能",
"iconPath": "icon/tab/function.png",
"selectedIconPath": "icon/tab/@Function.png"
"pagePath": "page/guide",
"text": "东师指南",
"iconPath": "icon/tab/guide.png",
"selectedIconPath": "icon/tab/@Guide.png"
"pagePath": "page/me",
"text": "我的东师",
"iconPath": "icon/tab/me.png",
"selectedIconPath": "icon/tab/@Me.png"
"networkTimeout": {
"request": 5000,
"connectSocket": 8000,
"uploadFile": 8000,
"downloadFile": 25000
"workers": "worker",
"debug": true,
"resizable": true,
"permission": {
"scope.userLocation": {
"desc": "您的位置信息将用于校园地图导航"
"requiredBackgroundModes": [
"audio"
"usingComponents": {
"share": "components/share",
"nav": "components/nav"
这是我的app.json
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
https://developers.weixin.qq.com/miniprogram/dev/framework/subpackages/basic.html?search-key=%E5%88%86%E5%8C%85
最下面有一个demo,你可以下载下来参考官方的配置一下,你这个报错肯定是路径写得有问题
非常感谢
好的
在分包写的页面不要在pages数组中写。。。。。你自己仔细看文档去
{
"pages": [
"page/main",
"page/function",
"page/guide",
"page/me",
"settings/1.1",
"settings/setting",
"settings/about"
],
"subPackages": [
{
"root": "function",
"pages": [
"cal",
"map",
"situs",
"player",
"PEcal",
"scenery",
"notice",
"noticeDetail"
]
},
{
"root": "module",
"pages": [
"module1",
"module2",
"module3",
"module4",
"module5",
"module6",
"module7",
"sharePage",
"web",
"building"
]
}
],
"preloadRule": {
"page/main": {
"network": "all",
"packages": [
"module"
]
},
"page/function": {
"network": "all",
"packages": [
"function"
]
},
"module/sharePage": {
"network": "all",
"packages": [
"__APP__"
]
}
},
"window": {
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"navigationBarTitleText": "东师青年",
"navigationStyle": "custom",
"backgroundColor": "#efeef4",
"backgroundTextStyle": "dark",
"backgroundColorTop": "#f5f5f7",
"backgroundColorBottom": "#efeef4",
"pageOrientation": "auto"
},
"tabBar": {
"custom": false,
"color": "#8a8a8a",
"selectedColor": "#3cc51f",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"position": "bottom",
"list": [
{
"pagePath": "page/main",
"text": "首页",
"iconPath": "icon/tab/home.png",
"selectedIconPath": "icon/tab/@Home.png"
},
{
"pagePath": "page/function",
"text": "功能",
"iconPath": "icon/tab/function.png",
"selectedIconPath": "icon/tab/@Function.png"
},
{
"pagePath": "page/guide",
"text": "东师指南",
"iconPath": "icon/tab/guide.png",
"selectedIconPath": "icon/tab/@Guide.png"
},
{
"pagePath": "page/me",
"text": "我的东师",
"iconPath": "icon/tab/me.png",
"selectedIconPath": "icon/tab/@Me.png"
}
]
},
"networkTimeout": {
"request": 5000,
"connectSocket": 8000,
"uploadFile": 8000,
"downloadFile": 25000
},
"workers": "worker",
"debug": true,
"resizable": true,
"permission": {
"scope.userLocation": {
"desc": "您的位置信息将用于校园地图导航"
}
},
"requiredBackgroundModes": [
"audio"
],
"usingComponents": {
"share": "components/share",
"nav": "components/nav"
}
}
这是我的app.json