微吧跳转

This commit is contained in:
2020-08-30 13:33:45 +08:00
parent 03d8bbe860
commit 4d6f30d4a3
3 changed files with 26 additions and 4 deletions

View File

@ -142,9 +142,20 @@ function jumpPage(ipxSizeBottom) {
});
//当前激活选项
var activeTab = subpages[0];
document.addEventListener("NAV_TO", function(e){
var id = parseInt(e.detail);
var $all = $(".mui-bar-tab a");
if (id > $all.length || id < 0) return;
var href = $all.eq(id).attr('href');
plus.webview.show(href, "fade-in", 300);
activeTab = href;
$all.eq(id).trigger('tap').click();
})
//选项卡点击事件
mui('.mui-bar-tab').on('tap', 'a', function(e) {
var targetTab = this.getAttribute('href');
console.log(targetTab);
if (targetTab == activeTab) {
// var targetTab = plus.webview.getWebviewById(targetTab);
// mui.fire(targetTab, 'refresh');
@ -282,8 +293,9 @@ $('.mui-bar').on('tap', '.mui-tab-item', function(e) {
$('.nav_out').removeClass('ni');
}
nav(num);
})
document.addEventListener('plusready', function() {
checkArguments();
}, false);