基座上显示正常,但部署到南网移动门户上,Android机页面显示很大,没有缩放。

BUG
xue1225go
   2017-12-15 11:03:28发布 0收藏, 216浏览
ExMobi客户端技术
已关闭
0

在uixml页面,有个webview,设置了zoom为true。

<webview url="res:page/www/target/vacancyrate_map.html" zoom="true"></webview>

该html页面因用到地图图片,页面会很大,所以设置了meta viewport。该页面在最新基座上,Android和iOS都能正常缩放。但部署到南网移动门户上,Android没有缩放,页面撑得很大,iOS正常显示。

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8"/>

<!--<meta content="user-scalable=0;" name="viewport" />-->

<meta name="viewport" content="width=device-width, initial-scale=0.4,user-scalable=0;">

<meta name="format-detection" content="telephone=no"/>

<link rel="stylesheet" href="../../../css/jquery/jquery.mobile-1.4.5.min.css">

<link rel="stylesheet" href="../../../css/jquery/jquery-ui.min.css">

<script src="../../../script/jquery/jquery.min.js"></script>

<script src="../../../script/jquery/jquery-ui.min.js"></script>

<script src="../../../script/jquery/jquery.mobile-1.4.5.min.js"></script>

<script src="../../../script/exmobijs/bridge.js"></script>

<script src="../../../script/exmobijs/app.js"></script>

<script src="../../../script/agile/zepto.js"></script>

<script src="../../../script/agile/agile.js"></script>

<link rel="stylesheet" href="../../../css/target/vacancyrate_map.css">

</head>

<body>

<div class="map">

<img src="../../../image/map.png" width="923px" height="758px"  usemap="#Map" border="0"/>

<div class="city">

<div id="zunyi" class="citybg" style="background:url(../../../image/zunyi.png) no-repeat 0 0; top:2px; left:360px; width:412px; height:399px;"></div>

<a style="position:absolute; top:132px; left:526px; z-index:10;" href="#">zunyi</a>

<input type="hidden" value="遵义"></input>

</div>

<div class="city">

<div id="bijie" class="citybg" style="background:url(../../../image/bijie.png) no-repeat 0 0;  top:159px; left:3px; width:507px; height:296px;"></div>

<a style="position:absolute; top:255px; left:280px; z-index:10;" href="#">bijie</a>

<input type="hidden" value="毕节"></input>

</div>

<div class="city">

<div id="tongren" class="citybg" style=" background:url(../../../image/tongren.png) no-repeat 0 0; top:47px; left:625px; width:295px; height:384px;"></div>

<a style="position:absolute;top:203px; left:700px; z-index:10;" href="#">tongren</a>

<input type="hidden" value="铜仁"></input>

</div>

<div class="city">

<div id="qianxinan" class="citybg" style=" background:url(../../../image/qianxinan.png) no-repeat 0 0; top:422px; left:36px; width:337px; height:333px;"></div>

<a style="position:absolute;top:550px; left:120px; z-index:10;" href="#">qianxinan</a>

<input type="hidden" value="兴义"></input>

</div>

<div class="city">

<div id="qiannan" class="citybg" style=" background:url(../../../image/qiannan.png) no-repeat 0 0; top:280px; left:330px; width:334px; height:462px;"></div>

<a style="position:absolute;top:555px; left:420px; z-index:10;" href="#">qiannan</a>

<input type="hidden" value="都匀"></input>

</div>

<div class="city">

<div id="qiandongnan" class="citybg" style=" background:url(../../../image/qiandongnan.png) no-repeat 0 0; top:321px; left:522px; width:377px; height:422px;"></div>

<a style="position:absolute;top:495px; left:600px; z-index:10;" href="#">qiandongnan</a>

<input type="hidden" value="凯里"></input>

</div>

<div class="city">

<div id="liupanshui" class="citybg" style=" background:url(../../../image/liupanshui.png) no-repeat 0 0; top:292px; left:35px; width:243px; height:304px;"></div>

<a style="position:absolute;top:388px; left:85px; z-index:10;" href="#">liupanshui</a>

<input type="hidden" value="六盘水"></input>

</div>

<div class="city">

<div id="guiyang" class="citybg" style=" background:url(../../../image/guiyang.png) no-repeat 0 0; top:296px; left:351px; width:210px; height:228px;"></div>

<a style="position:absolute;top:333px; left:400px; z-index:10;" href="#">guiyang</a>

<input type="hidden" value="贵阳"></input>

</div>

<div class="city">

<div id="guian" class="citybg" style=" background:url(../../../image/guian.png) no-repeat 0 0; top:372px; left:345px; width:78px; height:126px;"></div>

<a style="position:absolute;top:435px; left:355px;; z-index:10;" href="#">guian</a>

<input type="hidden" value="贵安"></input>

</div>

<div class="city">

<div id="anshun" class="citybg" style=" background:url(../../../image/anshun.png) no-repeat 0 0; top:398px; left:195px; width:191px; height:249px;"></div>

<a style="position:absolute;top:510px; left:245px;; z-index:10;" href="#">anshun</a>

<input type="hidden" value="安顺"></input>

</div>

</div>

</div>

</script>

</body>

</html>

这是在南网Android机显示

错误显示.jpg(0.04M 下载次数:49)

正常情况下是,是这样

房屋空置率.png(0.34M 下载次数:41)

运行平台及版本 : Android、iOS

手机型号 : 华为、苹果

基座版本 : 最新

我通过这行代码设置缩放,

<meta name="viewport" content="width=device-width, initial-scale=0.4,user-scalable=0;”>

不用你们webview中的zoom,为什么南网还是没有缩放?

提问者追加   2017-12-18 16:47:20
  • 我通过这行代码设置缩放,
    <meta name="viewport" content="width=device-width, initial-scale=0.4,user-scalable=0;”>
    不用你们webview中的zoom,为什么南网还是没有缩放?
    xue1225go 2017-12-18 16:51:17评论
提交评论

3个回答

0

版本多少

yuanhongqian
    2017-12-18 10:44:43回答
  • 南网移动应用平台版本号5.1.0,Android显示异常,iOS显示正常。
    基座Android和iOS5.15.5.0没问题,版本最新。
    xue1225go 2017-12-18 11:58:56评论
提交评论
0

南网的移动平台版本有点老了

yuanhongqian
    2017-12-18 12:55:46回答
  • 南网移动平台,对应基座的哪个版本?
    xue1225go 2017-12-19 09:57:32评论
提交评论
0

你最好 先不要设置缩放

yuanhongqian
    2017-12-18 12:57:37回答
  • 不缩放的话,页面就要重新写了,你们啥时候更新呢?
    xue1225go 2017-12-18 14:16:17评论
提交评论

我要回答

下载APP
扫码下载栗子社区APP