组件内调用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?
😂已经解决了