收藏
回答

小程序分包之后,从分包中的页面跳转到当前分包中的另外一个页面报错:MiniProgramError?

pages.json中的配置如下:

"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
		{
			"path" : "pages/planet/planet",
			"style" : 
			{
				"navigationBarTitleText" : "星球",
				"enablePullDownRefresh" : false
			}
		},
		{
			"path" : "pages/aiCreate/aiCreate",
			"style" : 
			{
				"navigationBarTitleText" : "AI创作",
				"enablePullDownRefresh" : false,
				"usingComponents": {
					"ai-text": "../../pagesB/aiText/aiText",
					"ai-picture": "../../pagesB/aiPicture/aiPicture",
					"taskList": "../../pagesB/taskList/taskList"
					// "mp-msg": "weui-miniprogram/msg/msg"
				},
				"componentPlaceholder": {
					"ai-text": "view",
					"ai-picture": "view",
					"taskList": "view"
				}
			}
		},
		{
			"path": "pages/aiPlaza/aiPlaza",
			"style" :
			{
				"navigationBarTitleText" : "AI广场",
				"enablePullDownRefresh" : false,
				"usingComponents": {
					"ai-attention": "../../pagesA/aiAttention/aiAttention",
					"ai-all": "../../pagesA/aiAll/aiAll"
				},
				"componentPlaceholder": {
					"ai-attention": "view",
					"ai-all": "view"
				}
			}
		},
		{
			"path": "pages/mySettings/mySettings",
			"style" :
			{
				"navigationBarTitleText" : "设置",
				"enablePullDownRefresh" : false
			}
		},
		{
			"path": "pages/writerDetail/writerDetail",
			"style" :
			{
				"navigationBarTitleText" : "作者",
				"enablePullDownRefresh" : false
			}
		},
		{
			"path": "pages/login/login",
			"style": {
				"navigationBarTitleText": "",
				"enablePullDownRefresh": false
			}
		}
	],
	"subPackages": [
		{
			"root": "pagesA/",
			"pages": [{
					"path": "aiAll/aiAll"
				},
				{
					"path": "aiAttention/aiAttention"
				},
				{
					"path": "aiPicture/aiPicture"
				}
			]
		},
		{
			"root": "pagesB/",
			"name": "pack2",
			"pages": [{
					"path": "aiText/aiText"	
				},
				{
					"path": "register/register"
				},
				{
					"path": "taskList/taskList"
				}
			]
		}
	]

当从页面aiText/aiText跳转到taskList/taskList的时候报错:
aiText页面中跳转部分的代码如下:

报错如下:


请各位帮忙看看,有没有遇到类似的问题,是怎么解决的,谢谢!

回答关注问题邀请回答
收藏

1 个回答

  • 社区技术运营专员--阳光
    社区技术运营专员--阳光
    05-16

    请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

    05-16
    有用
    回复
登录 后发表内容