大禹治水优化好

This commit is contained in:
YZ\249929363
2024-08-16 14:17:58 +08:00
parent 5fac81125d
commit 9e66517c71
111 changed files with 19910 additions and 10350 deletions
File diff suppressed because one or more lines are too long
+10 -3
View File
@@ -9,8 +9,11 @@ var GameTool = {
let name = "user_" + cc.fx.GameConfig.GM_INFO.gameId;
var data = JSON.parse(localStorage.getItem(name));
if(data == "undifend" || data==null || data == ""){
let url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback="+location.href;
window.location.href = url;
var urlNow = window.location.href;
if(!this.containsTrain(urlNow)){
let url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback="+location.href;
window.location.href = url;
}
}
else{
cc.fx.StorageMessage.setStorage(name,data);
@@ -18,6 +21,10 @@ var GameTool = {
}
},
containsTrain(str) {
return /from=train/i.test(str);
},
//埋点上传
setGameData(){
//GAME_DATA 初始化 每次清零
@@ -33,7 +40,7 @@ var GameTool = {
"data": data
};
console.log("上传数据:",data);
// console.log("上传数据:",data);
cc.fx.HttpUtil.uploadUserLogData(postData,function(){})
},
//上传排行榜 type为1