|
@@ -68,7 +68,7 @@ function preload(imgs, callback) {
|
|
|
}
|
|
|
|
|
|
if (!uid || !uname) {
|
|
|
- // window.location.href = "http://www.100t.com/gjnh/2022.php";
|
|
|
+ window.location.href = "http://gjnh.100t.com/gjnh/index.php/Index/";
|
|
|
} else {
|
|
|
registUrl = registUrl + "/"+uid
|
|
|
$.post(registUrl, JSON.stringify({
|
|
@@ -81,11 +81,12 @@ if (!uid || !uname) {
|
|
|
"text-bg.png",
|
|
|
"time-box.png", "trap1.png", "trap2.png", "trap3.png", "trap4.png","mute.png"
|
|
|
], function() {})
|
|
|
+
|
|
|
waiting(function() {
|
|
|
$load.fadeOut(function() {
|
|
|
$(this).remove();
|
|
|
init();
|
|
|
- });
|
|
|
+ });
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -337,7 +338,7 @@ function reconnect(service) {
|
|
|
}
|
|
|
var isWait = true;
|
|
|
var timer = null;
|
|
|
-
|
|
|
+var limit=getQueryString("limit")||0;
|
|
|
function waiting(callback) {
|
|
|
wsWaitUrl = wsWaitUrl +"/"+uid;
|
|
|
var ws = new WebSocket(wsWaitUrl);
|
|
@@ -365,12 +366,12 @@ function waiting(callback) {
|
|
|
clearTimeout(quesTimer);
|
|
|
success();
|
|
|
}
|
|
|
- /* if(res.status == 1 && !isWait && res.data.length<100){
|
|
|
+ if(res.status == 1 && !isWait && res.data.length<=limit){
|
|
|
isQuesEnd = true;
|
|
|
clearTimeout(quesTimer);
|
|
|
window.clearInterval(timer);
|
|
|
success();
|
|
|
- } */
|
|
|
+ }
|
|
|
$ren.html(res.data.length);
|
|
|
}
|
|
|
ws.onclose = function() {
|
|
@@ -386,29 +387,3 @@ function waiting(callback) {
|
|
|
};
|
|
|
}
|
|
|
|
|
|
-function getQueryString(name) {
|
|
|
- var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
|
|
- var r = decodeURI(window.location.search.substr(1)).match(reg);
|
|
|
- if (r != null) return unescape(r[2]); return null;
|
|
|
-}
|
|
|
-var uid=getQueryString('uid');
|
|
|
-var uname=getQueryString('uname');
|
|
|
-if(!uid || !uname){
|
|
|
- window.location.href="https://www.100t.com/gjnh/2022.php";
|
|
|
-}else{
|
|
|
- registUrl = registUrl + "/"+uid
|
|
|
- $.post(registUrl,JSON.stringify({uid,uname}),function(res){
|
|
|
- preload(["bg.png","figure.png","img1.png","img2.png","img3.png","line.png","qus-top.png","text-bg.png","time-box.png","trap1.png","trap2.png","trap3.png","trap4.png"],function(){
|
|
|
- waiting(function(){
|
|
|
- $load.fadeOut(function(){
|
|
|
- $(this).remove();
|
|
|
- init();
|
|
|
- });
|
|
|
- })
|
|
|
- })
|
|
|
- })
|
|
|
- var timer = window.setInterval(function() {
|
|
|
- $.post(registUrl,JSON.stringify({uid,uname}),function(res){})
|
|
|
- }, 5000)
|
|
|
-}
|
|
|
-
|