趴趴熊
趴趴熊
  • 发布:2015-12-15 17:27
  • 更新:2015-12-15 17:27
  • 阅读:1442

将获得的数据Demo,真机测试没有问题,云打包后就无法展现。刷新一下,数据才能展示出来

分类:HBuilder

<!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>
<script src="js/mui.min.js"></script>
<script src = 'js/jquery-1.11.3.min.js' ></script>
<link href="css/mui.min.css" rel="stylesheet"/>
<script type="text/javascript" charset="utf-8">
mui.init();
mui.plusReady(
function(){
mui.ajax(url,{
data:{
"longitude":121.464296,
"latitude":31.035349
},
dataType:'json',
type:'get',
timeout:2000,
success:function(data){
// var re = JSON.stringify(data.data);
// alert(re);
demo(data);
},
error:function(xhr, type, errorThrown){
alert(xhr+'+'+type+'+'+errorThrown);
}
})
}
)
//提取数据及数据展现
function demo(Object){
var content = $('.mui-content');
var html = "<ul class='mui-table-view'>";
html += "<li class = 'mui-table-view-cell'>";
html += "<span>"+Object.data[0].locationName+"</span>";
html += "</li>";
html += "</ul>";
content.append(html);
}
</script>
</head>
<body>
<header class = 'mui-bar mui-bar-nav'>
<a class = 'mui-action-back mui-icon mui-icon-left-nav'></a>
<h1 class = 'mui-title'>网点</h1>
</header>
<div class = 'mui-content'>

</div>  

</body>

</html>

2015-12-15 17:27 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复