ios端显示,底部tab出现异常:
都是按照官方的教程写的,在安卓手机上显示正常,代码如下所示:
client_index.html全部代码
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title></title>
<link rel="stylesheet" type="text/css" href="__wap2apptabbar.css" />
<script src="__wap2apptabbar.js" type="text/javascript" charset="utf-8"></script>
<style type="text/css">
/*自定义选项卡文字颜色示例*/
.tab-item {
color: black;//选项卡文字默认为黑色
}
.tab-item.active {
color:#f16b6f;//选项卡文字高亮时为红色
}
</style>
</head>
<body>
<script>
new TabBar({
list: [{
url: "https://zuetu.com",
text: "羽荼",
iconPath: 'icon/t1.png',
selectedIconPath: 'icon/tl1.png'
}, {
url: "https://zuetu.com/bbs",
text: "论坛",
iconPath: 'icon/t2.png',
selectedIconPath: 'icon/tl2.png'
}, {
url: "findworld.html",
text: "发现",
iconPath: 'icon/t3.png',
selectedIconPath: 'icon/tl3.png'
},
{
url: "https://zuetu.com/notifications",
text: "消息",
iconPath: 'icon/t4.png',
selectedIconPath: 'icon/tl4.png'
},
{
url: "me.html",
text: "我的",
iconPath: 'icon/t5.png',
selectedIconPath: 'icon/tl5.png'
}]
});
</script>
</body>
</html>
sitemap json部分关键代码,在正确位置:
"tabBar": {//选项卡配置,仅首页支持
"height": "50px",//选项卡高度,默认为50px
"list": [
{
"url": "https://zuetu.com" //tab1页面地址
}, {
"url": "https://zuetu.com/bbs" //tab2页面地址
}, {
"url": "findworld.html" //tab3页面地址
},{
"url": "https://zuetu.com/notifications" //tab4页面地址
},{
"url": "me.html" //tab5页面地址
}
]
},
无论是不是引用本地页面作为一个选项卡都还是有问题,在源站添加或者删除mui.js都没任何作用,以下为日志信息:
19:33:57.916 正在建立手机连接...
19:34:02.819 正在同步手机端程序文件...
19:34:08.214 同步手机端程序文件完成
19:34:09.779 联机调试并非打包,调试基座 HBuilder 是默认的测试包,权限、图标都不可自定义。只有在点菜单"发行-发行为原生安装包"时才能自定义这些设置
19:34:09.800 iOS9.0及以上系统需要在"设置"-"通用"-"设备管理"(或"描述文件")中信任DCloud企业证书(Digital Heaven开头的证书)才可以正常使用
19:34:09.821 如手机上HBuilder调试基座未启动,请手动启动。如应用未更新,请在手机上杀掉基座进程重启
19:34:25.397 Script error.
19:34:25.418 filename:
19:34:25.439 lineno:0
19:34:25.460 [W2A]:wap2app[3.9.4]开始注入
19:34:25.481 launch
19:34:25.502 show
19:34:25.522 [W2A]:init
19:34:25.543 [W2A]:plusready
19:34:25.563 当前应用版本:1.0.0
19:34:25.583 [W2A]:[羽荼Zuetu]启动成功
19:34:25.605 [W2A]:args[{}]
19:34:27.430 JQMIGRATE: Migrate is installed, version 1.4.1
19:34:28.435 ReferenceError: Can't find variable: mui
19:34:28.456 filename:https://zuetu.com/
19:34:28.477 lineno:698
19:34:28.497 SecurityError: Blocked a frame with origin "https://zuetu.com" from accessing a cross-origin frame. Protocols, domains, and ports must match.
19:34:28.517 filename:https://zuetu.com/
19:34:28.538 lineno:1
19:34:28.559 SecurityError: Blocked a frame with origin "https://zuetu.com" from accessing a cross-origin frame. Protocols, domains, and ports must match.
19:34:28.579 filename:https://zuetu.com/
19:34:28.599 lineno:1
19:34:28.621 SecurityError: Blocked a frame with origin "https://zuetu.com" from accessing a cross-origin frame. Protocols, domains, and ports must match.
19:34:28.640 filename:https://zuetu.com/
19:34:28.661 lineno:1
19:34:29.462 SecurityError: Blocked a frame with origin "https://zuetu.com" from accessing a cross-origin frame. Protocols, domains, and ports must match.
19:34:29.483 filename:https://zuetu.com/
19:34:29.503 lineno:1
19:34:29.527 SecurityError: Blocked a frame with origin "https://zuetu.com" from accessing a cross-origin frame. Protocols, domains, and ports must match.
19:34:29.547 filename:https://zuetu.com/
19:34:29.567 lineno:1
19:34:29.587 SecurityError: Blocked a frame with origin "https://zuetu.com" from accessing a cross-origin frame. Protocols, domains, and ports must match.
19:34:29.607 filename:https://zuetu.com/
19:34:29.627 lineno:1
19:34:29.648 65
我现在怀疑这压根就是一个bug
wgtyvgxyusgxu (作者)
现在官方还没来
2019-11-02 19:24