分包
{
"easycom": {
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
},
"pages": [
{
"path": "pages/user/home",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "pages/login/index",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
],
"style": "v2",
"sitemapLocation": "sitemap.json",
"subPackages": [{
"root": "pages/fenbao1/",
"pages": [
{
"path": "demand",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true
}
},
{
"path": "recyclingList",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
]
},
{
"root": "pages/fenbao2/",
"pages": [
{
"path": "searchCustomer",
"style": {
"navigationBarTitleText": "查询客户信息",
"enablePullDownRefresh": true
}
}
]
},
{
"root": "pages/newDemand/",
"pages": [{
"path": "demand_menu",
"style": {
"navigationBarTitleText": "回收需求管理",
"enablePullDownRefresh": false
}
},
]
}
],
"tabBar": {
"backgroundColor": "#ffffff",
"borderStyle": "black",
"selectedColor": "#3C9CFF",
"color": "#666666",
"list": [{
"pagePath": "pages/user/home",
"iconPath": "/static/tabBar/home.png",
"selectedIconPath": "/static/tabBar/home-default.png",
"text": "首页"
},
{
"pagePath": "pages/user/user",
"iconPath": "/static/tabBar/user.png",
"selectedIconPath": "/static/tabBar/user-default.png",
"text": "我的"
}
]
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"condition": {
"current": 0,
"list": [{
"name": "",
"path": "",
"query": ""
}]
}
}
1、如果分包后主包还是超了可以把图片放在云服务上,把主包文件夹中一些大的js或者json等的文件移到子包中
2、在hbuilderx中的运行 -> 运行到小程序模拟器 -> 运行时是否压缩代码,勾选
3、微信小程序模拟器中的本地设置把压缩的都勾选