关于swich跳转页面不能刷新
<h5>问题:小程序使用swichTab跳转后页面不能刷新的问题</h5>
<h5>解决思路:</h5>
<pre><code class="language-javascript">wx.switchTab({
url:'../index/index',
success:function(e){
var page = getCurrentPages().pop();
if(page == undefined || page == null) return;
page.onLoad();
}
})</code></pre>
<h5>总结:switchTab 成功跳转后调用success,此时可以拿到跳转后页面的page对象,从而调用页面onLoad方法重载页面;微信后期应该会加相应的参数来决定是否刷新跳转。</h5>