Alipay running error page can not find resolved to pages/login/login not found

reproduce bug

When I first ran the uniapp project on the Alipay developer tool, my login page was always under pages/index/login and ran normally on other developer tools, but it kept reporting errors on the Alipay developer tool.

Error screenshot

insert image description here

Directory Structure

insert image description here

Solution 1

Add *** "lazyCodeLoading" : "requiredComponents"*** in the manifest.json file, and you're done

"mp-alipay" : {
    
    
"usingComponents" : true,
"appid" : "你的支付宝小程序ID",
"lazyCodeLoading" : "requiredComponents",//这一句
"uniStatistics" : {
    
    
"enable" : true
}
},

Solution 2

If method 1 does not work, create a new directory and put the page that just reported the error into it.
A page needs to create a new directory

Guess you like

Origin blog.csdn.net/qq_51463650/article/details/128860721