|
$(function() {
var id = request("filter");
$("#details").trigger("create");
$.ajax({
type: "get",
async: false,
url: "http://221.214.164.186:8081/GPSMobile/getCurrGPSInfo.do",
dataType: "jsonp",
jsonp: "callbackparam", //服务端用于接收callback调用的function名的参数
jsonpCallback: "success_jsonpCallback", //callback的function名称
data: { filter: id },
success: function(json) {
$("#details").html("");
str = "<ul data-role='listview'><li data-role='list-divider' id='title'>车辆详细信息</li>";
str += "<li><a href='#'><h2>车辆手机号码:</h2><p>" + json[0].terminalPhone + "</p></a></li>";
str += "<li><a href='#'><h2>车辆授权码:</h2><p>" + json[0].authorizationCode + "</p></a></li>";
str += "<li><a href='#'><h2>所经度:</h2><p>" + json[0].longitude + "</p></a></li>";
str += "<li><a href='#'><h2>所在纬度:</h2><p>" + json[0].latitude + "</p></a></li>";
str += "</ul>";
$("#details").html(str);
},
error: function() {
alert('数据接收失败');
}
});
});
<div data-role="page" id="page">
<div data-role="header" data-position="fixed" data-mini="true">
<h1>车辆信息详情</h1>
</div>
<div data-role="content" id="details">
</div>
<div data-role="footer" data-position="fixed" data-mini="true">
<!-- <h4>页面脚注</h4>-->
<div data-role="navbar">
<ul>
<li><a href="#">当前车辆位置</a></li>
<li><a href="#">车辆状况列表</a></li>
<li><a href="#">司机上报</a></li>
</ul>
</div>
</div>
</div>
|
|