IOS平台,可以收到透传消息,可以启动应用程序,无法触发CLICK事件,无法跳转到其他新闻详细页
// 监听plusready事件
document.addEventListener("plusready", function() {
plus.push.addEventListener("click", function(msg) {
logoutPushMsg(msg);
}, false);
// 监听在线消息事件
plus.push.addEventListener("receive", function(msg) {
logoutPushMsg(msg);
}, false);
}, false);
function logoutPushMsg(msg) {
if (msg.payload) {
var payl = msg.payload;
var arr = payl.split('|');
if (arr[0] == 'article') {
mui.openWindow({
url: 'html/news_detail.html',
id: 'news_detail2',
extras: {
nid: arr[1]
},
styles: {
top: '0px',
bottom: '0px'
}
});
}
if (arr[0] == 'business') {
mui.openWindow({
url: 'html/product.html',
id: 'product2',
extras: {
ztid: arr[1]
},
styles: {
top: '0px',
bottom: '0px'
}
});
}
if (arr[0] == 'product') {
mui.openWindow({
url: 'html/product_detail.html',
id: 'product_detail2',
extras: {
ztid: arr[1]
},
styles: {
top: '0px',
bottom: '0px'
}
});
}
}
}
春色撩人 (作者)
请教下我的问题出在哪里呢?我发送IOS透传信息的时候,点击消息启动应用,但只能在首页,无法自动到某个新闻详细页
2016-03-09 15:35
magengshun
var curView = plus.webview.currentWebview();
curView.loadURL(“地址”);
http://www.html5plus.org/doc/zh_cn/webview.html#plus.webview.currentWebview
2016-03-09 16:03