v1.2
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 /* 2 * 版本 v1.2 3 * 20120616 自动ajax的版本 4 * 这个版本是1.0模拟版本后的第一个自动版本,速度更快,无随机错误 5 * 哎 6 * 该版本17号已经无法使用 7 */ 8 (function($){ 9 var W,w=window; 10 w.trace=function(){ 11 console.log(arguments); 12 }; 13 w.log=function(){ 14 if(W.Controller){ 15 W.Controller.log(arguments[0]); 16 }else{ 17 console.log(arguments); 18 } 19 }; 20 w.wxl=w.wxl||{}; 21 W=w.wxl; 22 W.Timers={}; 23 W.runing=false; 24 W.HB=[]; 25 //配置 26 W.Config={debug:false,num:0,autoStart:true,delay:500}; 27 //状态 1为进行0为停止 28 W.s=0; 29 //函数 30 W.Fun={}; 31 W.Fun.LoadJS=function( id, fileUrl ) { 32 var scriptTag = document.getElementById( id ); 33 var oHead = document.getElementsByTagName('HEAD').item(0); 34 var oScript= document.createElement("script"); 35 if ( scriptTag ) oHead.removeChild( scriptTag ); 36 oScript.id = id; 37 oScript.type = "text/javascript"; 38 oScript.src=fileUrl ; 39 oHead.appendChild(oScript); 40 }; 41 W.Fun.getJQ=function(){ 42 if(window.jQuery){ 43 $ = window.jQuery; 44 W.ready(); 45 }else{ 46 trace("等待JQ"); 47 setTimeout(W.Fun.getJQ,100); 48 } 49 }; 50 W.Fun.debug=function(){ 51 if(W.Config.debug==false)return; 52 console.log(arguments); 53 }; 54 W.Fun.getSB=function(){ 55 W.Fun.debug("W.Fun.getSB"); 56 log("调用一次"); 57 new W.Ajax(); 58 }; 59 W.start=function(){ 60 W.s=1;W.Fun.getSB(); 61 W.Controller.btn.text("结束"); 62 if(W.Timers.main==null){ 63 W.Timers.main=new W.Timer(W.Config.delay,W.Fun.getSB); 64 } 65 W.Timers.main.start(); 66 W.Controller.clearLogTimer.start(); 67 trace("主计时器开始"); 68 log("主计时器开始"); 69 W.runing=true; 70 }; 71 W.stop=function(){ 72 W.s=0; 73 W.Controller.btn.text("开始"); 74 W.Timers.main.stop(); 75 W.Controller.clearLogTimer.stop(); 76 trace("主计时器停止"); 77 log("主计时器停止"); 78 W.runing=false; 79 }; 80 W.Timer=function(D,F,A,T){ 81 this.delay=D; 82 this.thisObj=T; 83 this.args=A; 84 this.setCall=function(A){if(typeof(A)=="function")_call=A}; 85 var _id,_back,_call=F; 86 _back=function(){_call.apply(this.thisObj,this.args)}; 87 this.start=function(){ 88 if(_id)return; 89 _id=setInterval(_back,this.delay); 90 }; 91 this.stop=function(){ 92 clearInterval(_id); 93 _id=null; 94 }; 95 if(typeof(F)=="function"&&typeof(D)=="number"){this.start();} 96 }; 97 W.Ajax=function(A){ 98 var B=KISSY; 99 W.Config.num++; 100 if(A==undefined)A="bag"; 101 this.type=A; 102 var THIS=this; 103 var callBack=function(S){ 104 var txt=""; 105 if(THIS.type == "bag"){ 106 if(S.isSuccess === "T"){ 107 txt += "成功"; 108 trace(S); 109 W.Controller.hb.append("<span>"+S.user.name+" </span>") 110 }else{ 111 txt += "失败"; 112 } 113 txt += (",剩余"+(200000-S.param.prizeBestow).toString()+",随机"+S.param.ratio); 114 log(txt); 115 }else{} 116 }; 117 this.load=function(){ 118 /* 119 if(this.type=="bag"){ 120 Volcano.getLottery("bag", this.callback); 121 }else{ 122 Volcano.getLottery("cat", this.callback); 123 } 124 */ 125 var N = "http://promotion.taobao.com/tmall/furinkazan.do?we=1"; 126 N += Volcano.Bus.awardCode; 127 N += "&ua=" + encodeURIComponent(ua); 128 N += "&RandomNum=" + new Date().getTime(); 129 N += "&stra=" + (A === "bag" ? "1" : "2"); 130 var D = "tml" + B.guid(); 131 B.io({ 132 url: N, 133 type: "get", 134 dataType: "jsonp", 135 jsonpCallback: D, 136 success: callBack, 137 error: function () { 138 log("连接失败"); 139 } 140 }); 141 }; 142 this.load(); 143 }; 144 //自动控制台 145 var Controller_class=function(){ 146 this.view=$('<div><div class="wxl_box" style="opacity:.5;background:#fff;position:absolute;"></div><div class="wxl_box" style="z-index:10;position:relative;">日志<button>开始</button><div class="wxl_log">1122</div><div class="wxl_all"></div></div></div>'); 147 this.view.css({"400px",height:"260px",position:"absolute",top:0,right:0}); 148 this.view.children(".wxl_box").css({top:0,left:0,right:0,bottom:0,padding:"8px"}); 149 this.msgBox=this.view.find(".wxl_log"); 150 this.btn=this.view.find("button"); 151 this.btn.click(function(){ 152 if(W.runing){W.stop();}else{W.start();} 153 }); 154 this.hb=this.view.find(".wxl_all"); 155 $("body").eq(0).append(this.view); 156 this.msgBox.css({height:"200px",border:"1px solid",padding:"4px","overflow-y":"scroll"}); 157 this.clearLog=function(){W.Controller.msgBox.html("");log("自动清除日志");}; 158 this.clearLogTimer = new W.Timer(60000,this.clearLog); 159 this.gc=function(){ 160 this.view.remove(); 161 }; 162 this.log=function(A){ 163 this.msgBox.append("<div>"+A+"</div>"); 164 this.msgBox.scrollTop(this.msgBox.scrollTop()+100); 165 }; 166 }; 167 W.ready=function(){ 168 trace("脚本开始"); 169 if(W.Controller){ 170 W.Controller.gc(); 171 W.Controller=null; 172 } 173 W.Controller=new Controller_class(); 174 if(W.Config.autoStart){W.start();} 175 }; 176 if(window.jQuery){ 177 $ = window.jQuery; 178 W.ready(); 179 }else{ 180 W.Fun.LoadJS("wxl","https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"); 181 W.Fun.getJQ(); 182 } 183 trace("脚本初始化完毕"); 184 185 //开始 186 //windo.wxl.start(); 187 //停止 188 //windo.wxl.stop(); 189 })();
v1.4
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
/* * 版本 v1.4 * 20120617 js在页面上的版本 * 目前依旧不会自动停止和自动开始,能用就不错了 * 哎 * 这个脚本17日晚就不能用了 */ (function($){ var W,w=window; w.trace=function(){ console.log(arguments); }; w.log=function(){ if(W.Controller){ W.Controller.log(arguments[0]); }else{ console.log(arguments); } }; w.wxl=w.wxl||{}; W=w.wxl; W.Timers={}; W.runing=false; W.HB=[]; //配置 W.Config={debug:false,num:0,autoStart:true,delay:500}; //状态 1为进行0为停止 W.s=0; //函数 W.Fun={}; W.Fun.LoadJS=function( id, fileUrl ) { var scriptTag = document.getElementById( id ); var oHead = document.getElementsByTagName('HEAD').item(0); var oScript= document.createElement("script"); if ( scriptTag ) oHead.removeChild( scriptTag ); oScript.id = id; oScript.type = "text/javascript"; oScript.src=fileUrl ; oHead.appendChild(oScript); }; W.Fun.getJQ=function(){ if(window.jQuery){ $ = window.jQuery; W.ready(); }else{ trace("等待JQ"); setTimeout(W.Fun.getJQ,100); } }; W.Fun.debug=function(){ if(W.Config.debug==false)return; console.log(arguments); }; W.Fun.getSB=function(){ W.Fun.debug("W.Fun.getSB"); log("调用一次"); new W.Ajax(); }; W.start=function(){ W.s=1;W.Fun.getSB(); W.Controller.btn.text("结束"); if(W.Timers.main==null){ W.Timers.main=new W.Timer(W.Config.delay,W.Fun.getSB); } W.Timers.main.start(); W.Controller.clearLogTimer.start(); trace("主计时器开始"); log("主计时器开始"); W.runing=true; }; W.stop=function(){ W.s=0; W.Controller.btn.text("开始"); W.Timers.main.stop(); W.Controller.clearLogTimer.stop(); trace("主计时器停止"); log("主计时器停止"); W.runing=false; }; W.Timer=function(D,F,A,T){ this.delay=D; this.thisObj=T; this.args=A; this.setCall=function(A){if(typeof(A)=="function")_call=A}; var _id,_back,_call=F; _back=function(){_call.apply(this.thisObj,this.args)}; this.start=function(){ if(_id)return; _id=setInterval(_back,this.delay); }; this.stop=function(){ clearInterval(_id); _id=null; }; if(typeof(F)=="function"&&typeof(D)=="number"){this.start();} }; W.Ajax=function(A){ var B=KISSY; W.Config.num++; if(A==undefined)A="bag"; this.type=A; var THIS=this; var callBack=function(S){ var txt=""; if(THIS.type == "bag"){ if(S.isSuccess === "T"){ txt += "成功"; trace(S); W.Controller.hb.append("<span>"+S.user.name+" </span>") }else{ txt += "失败"; } txt += (",剩余"+(200000-S.param.prizeBestow).toString()+",随机"+S.param.ratio); log(txt); }else{} }; this.load=function(){ //var _awardCode = Volcano?Volcano.Bus.awardCode:W.Config.awardCode; var _awardCode = W.Config.awardCode; var N = "http://promotion.taobao.com/tmall/furinkazan.do?we=1"; N +=_awardCode; N += "&ua=" + encodeURIComponent(ua); N += "&RandomNum=" + new Date().getTime(); N += "&stra=" + (A === "bag" ? "1" : "2"); var D = "tml" + B.guid(); B.io({ url: N, type: "get", dataType: "jsonp", jsonpCallback: D, success: callBack, error: function () { log("连接失败"); } }); }; this.load(); }; W.Fun.get_awardCode=function(){ var reg=/awardCode\: \'([a-z0-9\=\&]+)\',/i; var _js=$("#J_Vol").next("script").next("script"); var arr=_js.html().match(reg); if(arr.length&&arr[1]){ W.Config.awardCode=arr[1]; }else{ W.Config.autoStart=false; alert("没有发现awardCode,脚本无法运行!"); } }; //自动控制台 var Controller_class=function(){ this.view=$('<div><div class="wxl_box" style="opacity:.5;background:#fff;position:absolute;"></div><div class="wxl_box" style="z-index:10;position:relative;">日志<button>开始</button><div class="wxl_log">1122</div><div class="wxl_all"></div></div></div>'); this.view.css({"400px",height:"260px",position:"absolute",top:0,right:0}); this.view.children(".wxl_box").css({top:0,left:0,right:0,bottom:0,padding:"8px"}); this.msgBox=this.view.find(".wxl_log"); this.btn=this.view.find("button"); this.btn.click(function(){ if(W.runing){W.stop();}else{W.start();} }); this.hb=this.view.find(".wxl_all"); $("body").eq(0).append(this.view); this.msgBox.css({height:"200px",border:"1px solid",padding:"4px","overflow-y":"scroll"}); this.clearLog=function(){W.Controller.msgBox.html("");log("自动清除日志");}; this.clearLogTimer = new W.Timer(60000,this.clearLog); this.gc=function(){ this.view.remove(); }; this.log=function(A){ this.msgBox.append("<div>"+A+"</div>"); this.msgBox.scrollTop(this.msgBox.scrollTop()+100); }; }; W.ready=function(){ trace("脚本开始"); if(W.Controller){ W.Controller.gc(); W.Controller=null; } W.Controller=new Controller_class(); W.Fun.get_awardCode(); if(W.Config.autoStart){W.start();} }; if(window.jQuery){ $ = window.jQuery; W.ready(); }else{ W.Fun.LoadJS("wxl","https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"); W.Fun.getJQ(); } trace("脚本初始化完毕"); //开始 //windo.wxl.start(); //停止 //windo.wxl.stop(); })();
v1.5金砖/抓猫
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 /* 2 * 版本 v1.5 3 * 20120618 适合这个时间的 4 * 哎 5 * 第一个按钮是金砖,第二个按钮是猫 6 * 模式: 7 * 自定义ajax可以捕获输出; 8 * 函数调用更原始; 9 */ 10 (function($){ 11 var W,w=window; 12 w.trace=function(){ 13 console.log(arguments); 14 }; 15 w.log=function(){ 16 if(W.Controller){ 17 W.Controller.log(arguments[0]); 18 }else{ 19 console.log(arguments); 20 } 21 }; 22 w.wxl=w.wxl||{}; 23 W=w.wxl; 24 W.Timers={}; 25 W.runing=false; 26 W.HB=[]; 27 //配置 28 W.Config={debug:false,num:0,autoStart:true,delay:500,ajaxModel:1}; 29 //状态 1为进行0为停止 30 W.s=0; 31 //函数 32 W.Fun={}; 33 W.Fun.LoadJS=function( id, fileUrl ) { 34 var scriptTag = document.getElementById( id ); 35 var oHead = document.getElementsByTagName('HEAD').item(0); 36 var oScript= document.createElement("script"); 37 if ( scriptTag ) oHead.removeChild( scriptTag ); 38 oScript.id = id; 39 oScript.type = "text/javascript"; 40 oScript.src=fileUrl ; 41 oHead.appendChild(oScript); 42 }; 43 W.Fun.getJQ=function(){ 44 if(window.jQuery){ 45 $ = window.jQuery; 46 W.ready(); 47 }else{ 48 trace("等待JQ"); 49 setTimeout(W.Fun.getJQ,100); 50 } 51 }; 52 W.Fun.debug=function(){ 53 if(W.Config.debug==false)return; 54 console.log(arguments); 55 }; 56 W.Fun.getSB=function(){ 57 W.Fun.debug("W.Fun.getSB"); 58 log("调用一次"); 59 new W.Ajax(); 60 }; 61 W.Fun.getCat=function(){ 62 W.Fun.debug("W.Fun.getSB"); 63 log("cat一次"); 64 new W.Ajax("cat"); 65 }; 66 W.start=function(){ 67 W.s=1;W.Fun.getSB(); 68 W.Controller.btn.text("结束"); 69 if(W.Timers.main==null){ 70 W.Timers.main=new W.Timer(W.Config.delay,W.Fun.getSB); 71 } 72 W.Timers.main.start(); 73 W.Controller.clearLogTimer.start(); 74 trace("主计时器开始"); 75 log("主计时器开始"); 76 W.runing=true; 77 }; 78 W.stop=function(){ 79 W.s=0; 80 W.Controller.btn.text("开始"); 81 W.Timers.main.stop(); 82 W.Controller.clearLogTimer.stop(); 83 trace("主计时器停止"); 84 log("主计时器停止"); 85 W.runing=false; 86 }; 87 W.Timer=function(D,F,A,T){ 88 this.delay=D; 89 this.thisObj=T; 90 this.args=A; 91 this.setCall=function(A){if(typeof(A)=="function")_call=A}; 92 var _id,_back,_call=F; 93 _back=function(){_call.apply(this.thisObj,this.args)}; 94 this.start=function(){ 95 if(_id)return; 96 _id=setInterval(_back,this.delay); 97 }; 98 this.stop=function(){ 99 clearInterval(_id); 100 _id=null; 101 }; 102 if(typeof(F)=="function"&&typeof(D)=="number"){this.start();} 103 }; 104 W.Ajax=function(A){ 105 var B=KISSY; 106 W.Config.num++; 107 if(A==undefined)A="bag"; 108 this.type=A; 109 var THIS=this; 110 var callBack=function(S){ 111 var txt=""; 112 if(THIS.type == "cat"){ 113 if(S.isSuccess === "T"){ 114 txt += "成功"; 115 trace(S); 116 W.Controller.hb.append("<span>"+S.user.name+" </span>") 117 }else{ 118 txt += "失败"; 119 } 120 txt += (",剩余"+(200000-S.param.prizeBestow).toString()+",随机"+S.param.ratio); 121 }else{ 122 if(S.isSuccess === "T"){ 123 txt += "您砸中了"; 124 W.Controller.hb.append("<span>金砖 </span>") 125 }else{ 126 if(S.param){ 127 txt += "没砸中,别人砸到了,"; 128 txt += S.param.nick; 129 }else{ 130 txt += "没砸中"; 131 txt += (",frame="+S.frame+",no="+S.no); 132 } 133 } 134 } 135 log(txt); 136 }; 137 this.load=function(){ 138 if(W.Config.ajaxModel==1){ 139 Volcano.BrickRate=1; 140 Volcano.Brick.manager.breakBrick(); 141 }else{ 142 var _awardCode = W.Config.awardCode; 143 var stra = 3; 144 if(this.type=="cat")stra=2; 145 var urls = "http://promotion.taobao.com/tmall/furinkazan.do?we=1", 146 runed = false; 147 urls+=Volcano.Bus.awardCode; 148 urls+="&ua="+encodeURIComponent(ua); 149 urls+="&RandomNum=" + new Date().getTime(); 150 urls+="&stra="+stra; 151 var D = "VolBrickCb"; 152 B.io({ 153 url: urls, 154 type: "get", 155 dataType: "jsonp", 156 jsonpCallback: D, 157 success: callBack, 158 error: function () { 159 log("连接失败"); 160 } 161 }); 162 window[D] = function (d){ 163 runed = true; 164 callBack(d); 165 //if(window.VolBrickCb)window.VolBrickCb(d); 166 }; 167 UA_Opt.Token = new Date().getTime()+":"+Math.random(); 168 UA_Opt.reload(); 169 } 170 }; 171 this.load(); 172 }; 173 W.Fun.get_awardCode=function(){ 174 var reg=/awardCode\: \'([a-z0-9\=\&]+)\',/i; 175 var _js=$("#J_Vol").next("script").next("script"); 176 if(_js==null)return; 177 var arr=_js.html().match(reg); 178 if(arr.length&&arr[1]){ 179 W.Config.awardCode=arr[1]; 180 }else{ 181 W.Config.autoStart=false; 182 alert("没有发现awardCode,脚本无法运行!"); 183 } 184 }; 185 //自动控制台 186 var Controller_class=function(){ 187 var _v='<div>'; 188 _v+='<div class="wxl_box" style="opacity:.5;background:#fff;position:absolute;"></div>'; 189 _v+='<div class="wxl_box" style="z-index:10;position:relative;">'; 190 _v+='日志<button id="wxl_start">开始</button><button id="wxl_cat">猫开始</button>模式:<button id="wxl_ajaxModel">函数调用</button>'; 191 _v+='<div class="wxl_log">1122</div><div class="wxl_all"></div>'; 192 _v+='</div></div>'; 193 this.view=$(_v); 194 this.view.css({"400px",height:"260px",position:"absolute",top:0,right:0}); 195 this.view.children(".wxl_box").css({top:0,left:0,right:0,bottom:0,padding:"8px"}); 196 this.msgBox=this.view.find(".wxl_log"); 197 this.btn=this.view.find("#wxl_start"); 198 this.btnCat=this.view.find("#wxl_cat"); 199 this.view.find("#wxl_ajaxModel").click(function(){ 200 if($(this).text()=="函数调用"){ 201 $(this).text("自定义ajax"); 202 W.Config.ajaxModel=0; 203 }else{ 204 W.Config.ajaxModel=1; 205 $(this).text("函数调用"); 206 } 207 }); 208 this.btn.click(function(){ 209 if(W.runing){W.stop();}else{W.start();} 210 }); 211 this.btnCat.click(function(){ 212 if($(this).text()=="猫停止"){W.Timers.cat.stop();$(this).text("猫开始");}else{W.Timers.cat.start();$(this).text("猫停止");} 213 }); 214 this.hb=this.view.find(".wxl_all"); 215 $("body").eq(0).append(this.view); 216 this.msgBox.css({height:"200px",border:"1px solid",padding:"4px","overflow-y":"scroll"}); 217 this.clearLog=function(){W.Controller.msgBox.html("");log("自动清除日志");}; 218 this.clearLogTimer = new W.Timer(60000,this.clearLog); 219 this.gc=function(){ 220 this.view.remove(); 221 }; 222 this.log=function(A){ 223 this.msgBox.append("<div>"+A+"</div>"); 224 this.msgBox.scrollTop(this.msgBox.scrollTop()+100); 225 }; 226 }; 227 W.ready=function(){ 228 trace("脚本开始"); 229 if(W.Controller){ 230 W.Controller.gc(); 231 W.Controller=null; 232 } 233 W.Controller=new Controller_class(); 234 //W.Fun.get_awardCode(); 235 W.Timers.cat=new W.Timer(200,W.Fun.getCat); 236 W.Timers.cat.stop(); 237 if(W.Config.autoStart){W.start();} 238 }; 239 if(window.jQuery){ 240 $ = window.jQuery; 241 W.ready(); 242 }else{ 243 W.Fun.LoadJS("wxl","https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"); 244 W.Fun.getJQ(); 245 } 246 trace("脚本初始化完毕"); 247 248 //开始 249 //windo.wxl.start(); 250 //停止 251 //windo.wxl.stop(); 252 })();
这些代码留着用吧,没啥意思 6月15-6月18一共抢到了17个5元红包
下面的这个已经是很老的代码了:
先上代码吧,没怎么做UI,需要控制的先使用控制台好了
(function($){ var w=window; w.trace=function(){ console.log(arguments); }; w.wxl={}; //临时数据 w.wxl.t={}; w.wxl.HB=[]; //配置 w.wxl.c={debug:false,num:0,autoStart:true}; //状态 1为进行0为停止 w.wxl.s=0; //函数 w.wxl.fun={}; w.wxl.fun.LoadJS=function( id, fileUrl ) { var scriptTag = document.getElementById( id ); var oHead = document.getElementsByTagName('HEAD').item(0); var oScript= document.createElement("script"); if ( scriptTag ) oHead.removeChild( scriptTag ); oScript.id = id; oScript.type = "text/javascript"; oScript.src=fileUrl ; oHead.appendChild( oScript); }; w.wxl.fun.autoStart=function(){ if(window.jQuery){ $ = window.jQuery; w.wxl.start(); trace("自动开始"); }else{ setTimeout(w.wxl.fun.autoStart,100); } } w.wxl.fun.debug=function(){ if(w.wxl.c.debug==false)return; console.log(arguments); }; w.wxl.fun.getSB=function(){ w.wxl.fun.debug("w.wxl.fun.getSB"); if($("#J_BagBox").length){ w.wxl.fun.getClick(); w.wxl.t.a=null; }else{ w.wxl.t.a=setTimeout(w.wxl.fun.getSB,500); } }; w.wxl.fun.getCB=function(a){ w.wxl.fun.debug("w.wxl.fun.getCB"); if($(".vol-dialog").length){ a.call(); w.wxl.t.b=null; }else{ w.wxl.t.b=setTimeout(w.wxl.fun.getCB,200); } }; w.wxl.fun.getClick=function(){ trace("模拟点击"+(w.wxl.HB.length?",已经抢到["+w.wxl.HB.join(",")+"]":"")); var btn=$("#J_BagBox").next(".vol-btn"); btn.click(); w.wxl.fun.getCB(w.wxl.fun.checkTxt) }; w.wxl.fun.checkTxt=function(){ w.wxl.fun.debug("w.wxl.fun.checkTxt"); var txt=$(".vol-dialog").html(); var hasnext=false; if(txt.indexOf("正在为您抽奖")>=0){ w.wxl.t.d=setTimeout(w.wxl.fun.checkTxt,100); //trace("等待"); w.wxl.fun.debug("等待"); //hasnext=true; return; }else if(txt.indexOf("差一点就抢到了,再来一次吧。")>=0){ trace("差一点就抢到了,再来一次吧。剩余"+$(".vol-dialog-left b").text()+"个"); hasnext=true; }else if(txt.indexOf("别灰心,下个整点再来吧")>=0){ trace("别灰心,下个整点再来吧"); }else if(txt.indexOf("获得")>=0){ trace("抢到一个"+$(".vol-dialog-hi").text()+"红包"); w.wxl.HB.push($(".vol-dialog-hi").text()); hasnext=true; }else{ trace("不知道是啥"); trace(txt); } if(hasnext){ w.wxl.fun.closeAndNext(); //w.wxl.t.e=setTimeout(w.wxl.fun.closeAndNext,1000); }else{ alert("亲,结束了哦"); } }; w.wxl.fun.closeAndNext=function(){ $(".vol-dialog a.vol-dialog-close")[0].click(); if(w.wxl.s==1){ trace("1s后继续"); w.wxl.t.c=setTimeout(w.wxl.fun.getSB,1000); }else{ trace("亲,结束了哦"); } }; w.wxl.start=function(){w.wxl.s=1;w.wxl.fun.getSB();} w.wxl.stop=function(){window.wxl.s=0;} if(window.jQuery){ $ = window.jQuery; }else{ w.wxl.fun.LoadJS("wxl","https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"); } if(w.wxl.c.autoStart){w.wxl.fun.autoStart();} //开始 //window.wxl.start(); //停止 //window.wxl.stop(); })();