window.addEventListener(‘pageshow‘, function(e) {
var da = history.length;
console.log(history.length);//监听history返回的是数字
getData();
});
function getData(){
$.post("/myteam/getData.json?time="+new Date().getTime(),function(data){
// console.log(data);
if(data.code == 0){
var dl=data.data;
// console.log("dl",dl);
$(".us_ul .weui-cells").html("");
for(var i=0; i<dl.length; i++){
console.log("dlf",dl);
var count = dl[i].count;
var id = dl[i].id;
var name = dl[i].name;
//console.log(deviceId);/*<strong>编码:</strong><span>‘+deviceId+‘</span> */
/*$(".us_ul .weui-cells").append(‘<a href="/team/addMember.html"><li id="‘+id+‘">‘+name+‘ (<span>‘+count+‘</span>) <i onclick="del(\‘‘+id+‘\‘)"><img src="../images/user2.jpg" ></i> </li></a>‘);*/
$(".us_ul .weui-cells").append(‘<a id="‘+id+‘" class="weui-cell weui-cell_access"><div onclick="tz(\‘‘+id+‘\‘)" class="weui-cell__bd"><p>‘+name+‘ (<span>‘+count+‘</span>) </p></div></a>‘);
}
}
},"json");