app.json定义了tabBar的测试按钮跳转到test
{ "pages" :[ "pages/index/index" , "pages/test/test" ], "window" :{ "backgroundTextStyle" : "light" , "navigationBarBackgroundColor" : "#fff" , "navigationBarTitleText" : "WeChat" , "navigationBarTextStyle" : "black" }, "tabBar" : { "list" : [ { "pagePath" : "pages/index/index" , "text" : "首页" }, { "pagePath" : "pages/test/test" , "text" : "测试" } ] } } |
index.js中定义了test按钮跳转到test页面
test: function (){ wx.navigateTo({ url: '../test/test' }) } |
会导致test按钮无法执行跳转代码
switchTab
好吧- -没认真看API,谢谢