BUG:在app.js执行switchTab跳转自动添加page/index
wx.switchTab({
url: ‘pages/index/index’,
success: function (e) {
var page = getCurrentPages().pop();
if (page == undefined || page == null) return;
page.onShow();
}
})
这一段代码放到app.js某个网络成功后执行,然而控制台报错:
switchTab:fail url “pages/index/pages/index/index” is not in app.json
为什么会自动给加上pages/index??