My Awesome Book

This file file serves as your book's preface,

function roll(){
  // lottery.times走了多少步
  // lottery.cycle转动基本次数:即至少需要转动多少次再进入抽奖环节
  // lottery.prize中奖位置
  // lottery.index当前位置
  if (lottery.times > lottery.cycle+10 && lottery.prize==lottery.index) {
    stop_timer(lottery);
    click=false;
    return false;
  }else{
    lottery.times += 1;
    lottery.roll();
    lottery.timer = setTimeout(roll,lottery.speed);
    if (lottery.times<lottery.cycle) {
      lottery.speed -= 10;
    }else if(lottery.times==lottery.cycle) {
      if (isNaN(prize_data)) {
        stop_timer(lottery);
        // 这里放你传进来的特定值。字符串里面不能只是数值,必须要有文字。
        // alert(prize_data);
        click=false;
      }else {
        // 如果用断网了,就提示
        if (prize_data == null) {
          stop_timer(lottery);
          alert('无法获取到数据,请检查您的网络是否连接');
          click=false;
        }else {
          // 赋值中奖编号
          lottery.prize = prize_data;   
        };
      }
    }else{
      // 减速
      if (lottery.times > lottery.cycle+7 && ((lottery.prize==0 && lottery.index==10) || lottery.prize==lottery.index+10)) {
        lottery.speed += 110;
      }
      else{
        lottery.speed += 20;
      }
    };
    if (lottery.speed<40) {
      lottery.speed=40;
    };
  }
  return false;
};

a great place to describe your book's content and ideas.

results matching ""

    No results matching ""