You've already forked qlg.frontend
微吧跳转
This commit is contained in:
14
js/start.js
14
js/start.js
@ -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);
|
||||
|
Reference in New Issue
Block a user