分包加载页面问题
小程序使用了分包加载,分包配置如下:
"subpackages" : [ { "root" : "rentHouse" , "pages" : [ "detail/index" , "index/index" , "list/index" , "search/index" ] }, { "root" : "apartments" , "pages" : [ "brand/index/index" , "brand/detail/index" , "room/index/index" , "room/detail/index" , "singleFamily/list/index" , "singleFamily/detail/index" , "store/index/index" , "store/list/index" ] } ], |
当我在/rentHouse/index/index的分包页面使用navigateTo跳转到同分包的页面时会出现错误警告,并跳转的目标页面空白。
### 跳转代码如下
wx.navigateTo({ url: `/rentHouse/detail/index?id=${item.id}` }); |
### 错误提示如下
Page[rentHouse/detail/index] not found. May be caused by: 1. Forgot to add page route in app.json. 2. Invoking Page() in async task |
项目东西太多,不好分出代码片段。
1 回复
你好,请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。