小程序
小游戏
企业微信
微信支付
扫描小程序码分享
文件打包超限后,进行了分包,原来主包页面(tab页面)跳转另一个页面是用wx.navigateTo进行跳转
例如:
wx.navigateTo({
url: '/pages/para_set/para_set'
})
现在para_set页面在分包中了,此时点击 ,页面不会跳转了,应该怎么修改呢
5 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
已经解决了
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
从根目录写起
你的pages/para_set/para_set不是在主包的pages中的吗
那你这样写,没跳过去??
url: '/pages_person/pages/discount/discount'
{
"pages": [
"pages/subscribe/subscribe",
"pages/matching/matching",
"pages/answer/answer",
"pages/person/person",
"pages/project/project",
"pages/login/login",
"pages/register/register",
"pages/forget/forget",
"pages/para_set/para_set",
"pages/answerpara/answerpara",
"pages/policeInfo/policeInfo",
"pages/subject/subject",
"pages/analyzeURL/analyzeURL"
],
"subPackages":[
"root": "pages_matching",
"pages/popup/popup"
]
},
"root": "pages_answer",
"pages/star_answer/star_answer",
"pages/answer_result/answer_result",
"pages/answer_result2/answer_result2"
"root": "pages_person",
"pages/personInfo/personInfo",
"pages/companypara/companypara",
"pages/companyInfo/companyInfo",
"pages/companylist/companylist",
"pages/test_apply/test_apply",
"pages/answerdetail/answerdetail",
"pages/feedback/feedback",
"pages/itemprogress/itemprogress",
"pages/evaluation/evaluation",
"pages/discount/discount",
"pages/coupon_detail/coupon_detail"
}
"window": {
"navigationStyle": "custom"
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于匹配当前地区的政策"
"tabBar": {
"list": [
"pagePath": "pages/subscribe/subscribe",
"text": "政策汇",
"iconPath": "pages/img/subscribe1.png",
"selectedIconPath": "pages/img/subscribe2.png"
"pagePath": "pages/matching/matching",
"text": "资金评估",
"iconPath": "pages/img/matching1.png",
"selectedIconPath": "pages/img/matching2.png"
"pagePath": "pages/project/project",
"text": "立项查询",
"iconPath": "pages/img/project1.png",
"selectedIconPath": "pages/img/project2.png"
"pagePath": "pages/answer/answer",
"text": "测评系统",
"iconPath": "pages/img/answer1.png",
"selectedIconPath": "pages/img/answer2.png"
"pagePath": "pages/person/person",
"text": "会员中心",
"iconPath": "pages/img/person1.png",
"selectedIconPath": "pages/img/person2.png"
"selectedColor": "#f25050",
"color": "#aaaaaa",
"position": "bottom"
"sitemapLocation": "sitemap.json"
把配置文件贴处来吧
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
已经解决了
从根目录写起
你的pages/para_set/para_set不是在主包的pages中的吗
那你这样写,没跳过去??
wx.navigateTo({
url: '/pages_person/pages/discount/discount'
})
{
"pages": [
"pages/subscribe/subscribe",
"pages/matching/matching",
"pages/answer/answer",
"pages/person/person",
"pages/project/project",
"pages/login/login",
"pages/register/register",
"pages/forget/forget",
"pages/para_set/para_set",
"pages/answerpara/answerpara",
"pages/policeInfo/policeInfo",
"pages/subject/subject",
"pages/analyzeURL/analyzeURL"
],
"subPackages":[
{
"root": "pages_matching",
"pages": [
"pages/popup/popup"
]
},
{
"root": "pages_answer",
"pages": [
"pages/star_answer/star_answer",
"pages/answer_result/answer_result",
"pages/answer_result2/answer_result2"
]
},
{
"root": "pages_person",
"pages": [
"pages/personInfo/personInfo",
"pages/companypara/companypara",
"pages/companyInfo/companyInfo",
"pages/companylist/companylist",
"pages/test_apply/test_apply",
"pages/answerdetail/answerdetail",
"pages/feedback/feedback",
"pages/itemprogress/itemprogress",
"pages/evaluation/evaluation",
"pages/discount/discount",
"pages/coupon_detail/coupon_detail"
]
}
],
"window": {
"navigationStyle": "custom"
},
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于匹配当前地区的政策"
}
},
"tabBar": {
"list": [
{
"pagePath": "pages/subscribe/subscribe",
"text": "政策汇",
"iconPath": "pages/img/subscribe1.png",
"selectedIconPath": "pages/img/subscribe2.png"
},
{
"pagePath": "pages/matching/matching",
"text": "资金评估",
"iconPath": "pages/img/matching1.png",
"selectedIconPath": "pages/img/matching2.png"
},
{
"pagePath": "pages/project/project",
"text": "立项查询",
"iconPath": "pages/img/project1.png",
"selectedIconPath": "pages/img/project2.png"
},
{
"pagePath": "pages/answer/answer",
"text": "测评系统",
"iconPath": "pages/img/answer1.png",
"selectedIconPath": "pages/img/answer2.png"
},
{
"pagePath": "pages/person/person",
"text": "会员中心",
"iconPath": "pages/img/person1.png",
"selectedIconPath": "pages/img/person2.png"
}
],
"selectedColor": "#f25050",
"color": "#aaaaaa",
"position": "bottom"
},
"sitemapLocation": "sitemap.json"
}
把配置文件贴处来吧