组件内调用wx.navigateTo路由跳转失败
methods: {
toDetails(event) {
let id = event.currentTarget.dataset.id;
wx.navigateTo({
url: '/page/product_details'
})
}
}
navigateTo:fail page "page/product_details" is not found
页面是已经创建了的 app.json
"pages": [
"pages/index/index",
"pages/commodity/index",
"pages/shopping_cart/index",
"pages/user_center/index",
"pages/product_details/index",
"pages/test/test"
]
微信小程序开发问题解答
微信小程序开发者回答:
路径没写对吧,你下面都写的pages,上面写的page?
本文网址:http://www.91bianli.com/weixinxiaochengxu/14652.html