Merge branch 'YOUFANGAPP1.1.1' of http://192.168.0.27/dev0/youfang-app into YOUFANGAPP1.1.1
This commit is contained in:
@@ -127,12 +127,14 @@
|
|||||||
}
|
}
|
||||||
self.append(sub);
|
self.append(sub);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
//当前激活选项
|
//当前激活选项
|
||||||
var activeTab = subpages[0];
|
var activeTab = subpages[0];
|
||||||
var title = document.getElementById("title");
|
var title = document.getElementById("title");
|
||||||
//选项卡点击事件
|
//选项卡点击事件
|
||||||
mui('.mui-bar-tab').on('tap', 'a', function(e) {
|
mui('.mui-bar-tab').on('tap', 'a', function(e) {
|
||||||
|
var self = plus.webview.currentWebview();
|
||||||
plus.nativeUI.showWaiting();
|
plus.nativeUI.showWaiting();
|
||||||
var targetTab = this.getAttribute('href');
|
var targetTab = this.getAttribute('href');
|
||||||
if (targetTab == activeTab) {
|
if (targetTab == activeTab) {
|
||||||
@@ -144,7 +146,8 @@
|
|||||||
//显示目标选项卡
|
//显示目标选项卡
|
||||||
//若为iOS平台或非首次显示,则直接显示
|
//若为iOS平台或非首次显示,则直接显示
|
||||||
if(plus.webview.getWebviewById(targetTab)==null){
|
if(plus.webview.getWebviewById(targetTab)==null){
|
||||||
plus.webview.create(targetTab, targetTab, subpage_style)
|
var sub = plus.webview.create(targetTab, targetTab, subpage_style)
|
||||||
|
self.append(sub);
|
||||||
}
|
}
|
||||||
if(mui.os.ios||aniShow[targetTab]){
|
if(mui.os.ios||aniShow[targetTab]){
|
||||||
plus.webview.show(targetTab);
|
plus.webview.show(targetTab);
|
||||||
@@ -211,9 +214,9 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 推送消息跳转页面
|
// 推送消息跳转页面
|
||||||
window.addEventListener('switchView',function(event){
|
window.addEventListener('switchView',function(event){
|
||||||
|
var self = plus.webview.currentWebview();
|
||||||
console.log(event.detail.name)
|
console.log(event.detail.name)
|
||||||
plus.webview.show(plus.webview.getWebviewById("HBuilder"));
|
plus.webview.show(plus.webview.getWebviewById("HBuilder"));
|
||||||
var targetTab = event.detail.name;
|
var targetTab = event.detail.name;
|
||||||
@@ -224,7 +227,8 @@
|
|||||||
//若为iOS平台或非首次显示,则直接显示
|
//若为iOS平台或非首次显示,则直接显示
|
||||||
if(mui.os.ios||aniShow[targetTab]){
|
if(mui.os.ios||aniShow[targetTab]){
|
||||||
if(plus.webview.getWebviewById(targetTab)==null){
|
if(plus.webview.getWebviewById(targetTab)==null){
|
||||||
plus.webview.create(targetTab, targetTab, subpage_style)
|
var sub = plus.webview.create(targetTab, targetTab, subpage_style)
|
||||||
|
self.append(sub);
|
||||||
}
|
}
|
||||||
plus.webview.show(targetTab);
|
plus.webview.show(targetTab);
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
Reference in New Issue
Block a user