wap2app的项目,在hbuilder本地用mui创建了setting.html。
在setting.html中用href跳转到远程网页a时,在a页面中按手机的后退按钮,会报Uncaught ReferenceError: mui is not defined错误。
怎样才能让手机的后退生效呢?
a页面中没有引用到mui。在sitemap中关于a的设定都生效了。
titleNView中autoBackButton为true时,会报同样的错误。这个问题可以用自己添加的后退按钮回避。
sitemap中a的设定:
{
"webviewId": "a",
"matchUrls": [
{
"pathname": "/news/self/"
},{
"pathname": "/news/self"
}
],
"webviewParameter": {
"titleNView":{
"autoBackButton":"false",
"backgroundColor":"#f7f7f7",
"titleColor": "#000000",
"splitLine":{
"color":"#cccccc"
},
"buttons": [
{
"float": "left",
"fontSize": "27px",
"type":"back",
"onclick": "javascript:plus.webview.getWebviewById('a').evalJS('history.back();');"
}
]
},
"easyConfig":{
"back":{
"history":false //不允许执行history.back
}
}
}
},