小程序-使用switchTab跳转后页面不刷新的问题

wx.switchTab({ 
url: '../index/index', 
success: function (e) { 
var page = getCurrentPages().pop(); 
if (page == undefined || page == null) return; 
page.onLoad(); 
} 
}) 

switchTab成功跳转后调用success,此时可以拿到跳转后页面的page对象,从而调用页面onLoad方法重载页面;微信后期应该会加相应的参数来决定是否刷新跳转

你可能感兴趣的:(小程序-使用switchTab跳转后页面不刷新的问题)