大禹治水优化好
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user