Commit dc000a55 by 吴善钰

区域碰撞、时空伴随、时空回溯,调用地图手机号归属地接口,显示手机归属地

parent 2377913a
......@@ -53,7 +53,8 @@ function getSfzhYchy(obj){
if (zjhm.length == 18) {
url += "<img src=\"/images/asjxx_ychy.png\" width=20 height=20 onclick='sksjzcYchy(this,\""+obj.objectValue+"\",\""+ zjhm +"\",\""+obj.objectType+"\",\"1\")'/>";
} else {
url += "<img src=\"/images/asjxx_ychy.png\" width=20 height=20 onclick='sksjzcYchy(this,\""+obj.objectValue+"\",\""+ zjhm +"\",\""+obj.objectType+"\",\"3\")'/>";
getPhoneCity(zjhm);
url += "<span style='color: rgb(255, 255, 255);padding: 0 3px;font-size: 8px;border-radius: 3px;background: #228b22;height: 14px;display: none;' id='"+ zjhm +"'></span><img src=\"/images/asjxx_ychy.png\" width=20 height=20 onclick='sksjzcYchy(this,\""+obj.objectValue+"\",\""+ zjhm +"\",\""+obj.objectType+"\",\"3\")'/>";
}
}
return url;
......@@ -128,6 +129,41 @@ function getXbmc(rows){
return sexStr;
}
/*
调用脑图手机号码归属地接口,获取号码归属地
mapPath在ychy.js里定义的
*/
function getPhoneCity(phoneNo){
var data = JSON.stringify({
"phoneNo":phoneNo
});
$.ajax({
url: mapPath + "/selectCityByPhoneNo", //请求的url地址
dataType:"json", //返回格式为json
contentType : 'application/json;charset=UTF-8',
async:true,//请求是否异步,默认为异步,这也是ajax重要特性
data:data, //参数值,键值对
type:"POST", //请求方式
success:function(req){
console.log(req);
var data = req.data;
console.log(data);
if (data.length > 0) {
var city = data[0].CITY;
if (city != null && city != "" && city != undefined) {
$('#'+phoneNo).append(city);
$('#'+phoneNo).css('display','inline');
}
console.log(city);
}
},
error:function(){
console.log("调用地图手机号码归属地接口出错!");
}
});
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment