首页 分享苏宁超市抢购代码

苏宁超市抢购代码

打开此页面:https://yzdh.suning.com/yzdh-web/exchange/voucher1680.htm,按下f12,在console中输入以下代码,提前5分钟内输入

function setTimer(voucherId,acTime) {
  $('.single-coupon-wrap').prepend('<div id="addiframe" style="margin-bottom:15px;background:#fff;height:120px"></div>')
  setInterval(function() {
    var j = 0;
    while(j++ < 100000000);
  }, 0);
  function netTime() {
    $.ajax({
      url: 'https://api.chajie.me/time/index/index',
      async: false,
      data: "",
      type: "POST",
      dataType: "JSON",
      success: function(res) {
        ajax_res = res
      }
    })
    return ajax_res * 1000;
  }
  var interval = 1000,
    activityTime = Date.parse(new Date(acTime));
    ms = activityTime - netTime() -1000,
    count = 0,
    startTime = new Date().getTime();
  if(ms >= 0) {
    var timeCounter = setTimeout(countDownStart, interval);
  }
  function countDownStart() {
    count++;
    var offset = new Date().getTime() - (startTime + count * interval);
      nextTime = interval - offset;
      daytohour = 0;
    if(nextTime < 0) {
      nextTime = 0
    };
    ms -= interval;
    $('#addiframe').html('<div style="line-height:120px;text-align:center">离活动开始还有:' + (ms/1000) + '秒</div>');
    if(ms < 1000) {
      clearTimeout(timeCounter);
      $('#addiframe').empty()
      var x=setInterval(function(){
        var url = 'https://yzdh.suning.com/yzdh-web/voucher/sendVoucher.do?callback=callbackSendVoucherFun&voucherId='+voucherId+'&voucherType=1&couponGetSource=VIP&detect=' + encodeURIComponent(bd.rst());
          str = '<iframe width="200" style="border:1px solid #ddd;margin:10px 0 10px 10px" height="100" src="' + url + '"></iframe>';
        $('#addiframe').prepend(str);
      }, 340);
      setTimeout(function(){
        clearInterval(x)
      },1200)
    } else {
      timeCounter = setTimeout(countDownStart, nextTime);
    }
  }
}
setTimer('3419','2017-12-4 12:22:14')

参数说明:setTimer(券的id,抢券时间)

20点 3422
18点 3421
16点 3420
14点 3419
10点 3418

评论已关闭。