代码
tonext(){
console.log('tonexttest')
wx.navigateTo({
url: `src/views/scanrecord/scanrecord?eid=`+1,
fail(res){
console.log(res)
}
})
}
在APP.JSON中已声明要路转的页面
"pages": [
"src/views/index/index",
"src/views/scanrecord/scanrecord",
"src/views/mine/mine"
],
运行时报错
{errMsg: "navigateTo:fail page "src/views/index/src/views/scanrecord/scanrecord?eid=1" is not found"}
看到前面加了 ‘src/views/index’ 这是为什么
另外使用redirectTO也是一样的情况
不是TAB页面
已解决,忘记加"/"了