微信缓存以及苹果手机无法返回上一页以及history不识别(前端网备份)

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" alt=""></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");
posted @ 2019-06-10 11:51  影思密达ing  阅读(300)  评论(0编辑  收藏  举报