|
@@ -86,11 +86,11 @@ export default class HttpRequest {
|
|
|
static POST(path: string, data: { [key: string]: string }, body: Object, callback: Function = () => { }, isLogin: boolean = false) {
|
|
|
body = body || {}
|
|
|
if (CC_JSB) {
|
|
|
- if (!gameMethod.isEmpty(GameDataCenter.sevBack) && !gameMethod.isEmpty(GameDataCenter.sevBack.switch) && !gameMethod.isEmpty(GameDataCenter.sevBack.switch.clientLog)) {
|
|
|
+ if (!gameMethod.isEmpty(GameDataCenter.login.playerInfo?.switch) && !gameMethod.isEmpty(GameDataCenter.login.playerInfo?.switch.clientLog)) {
|
|
|
console.warn("C->S:", path, JSON.stringify(body))
|
|
|
}
|
|
|
} else {
|
|
|
- if (!gameMethod.isEmpty(GameDataCenter.sevBack) && !gameMethod.isEmpty(GameDataCenter.sevBack.switch) && !gameMethod.isEmpty(GameDataCenter.sevBack.switch.clientLog)) {
|
|
|
+ if (!gameMethod.isEmpty(GameDataCenter.login.playerInfo?.switch) && !gameMethod.isEmpty(GameDataCenter.login.playerInfo?.switch.clientLog)) {
|
|
|
console.warn("C->S:", path, body)
|
|
|
}
|
|
|
}
|
|
@@ -164,11 +164,11 @@ export default class HttpRequest {
|
|
|
// try {
|
|
|
if (temp && Object.keys(temp).length > 0) {
|
|
|
if (CC_JSB) {
|
|
|
- if (!gameMethod.isEmpty(GameDataCenter.sevBack) && !gameMethod.isEmpty(GameDataCenter.sevBack.switch) && !gameMethod.isEmpty(GameDataCenter.sevBack.switch.clientLog)) {
|
|
|
+ if (!gameMethod.isEmpty(GameDataCenter.sevBack) && !gameMethod.isEmpty(GameDataCenter.login.playerInfo.switch) && !gameMethod.isEmpty(GameDataCenter.login.playerInfo.switch.clientLog)) {
|
|
|
console.warn("S->C:", JSON.stringify(temp))
|
|
|
}
|
|
|
} else {
|
|
|
- if (!gameMethod.isEmpty(GameDataCenter.sevBack) && !gameMethod.isEmpty(GameDataCenter.sevBack.switch) && !gameMethod.isEmpty(GameDataCenter.sevBack.switch.clientLog)) {
|
|
|
+ if (!gameMethod.isEmpty(GameDataCenter.sevBack) && !gameMethod.isEmpty(GameDataCenter.login.playerInfo.switch) && !gameMethod.isEmpty(GameDataCenter.login.playerInfo.switch.clientLog)) {
|
|
|
console.warn("S->C:", temp)
|
|
|
}
|
|
|
}
|
|
@@ -240,11 +240,11 @@ export default class HttpRequest {
|
|
|
try {
|
|
|
if (temp && Object.keys(temp).length > 0) {
|
|
|
if (CC_JSB) {
|
|
|
- if (!gameMethod.isEmpty(GameDataCenter.sevBack) && !gameMethod.isEmpty(GameDataCenter.sevBack.switch) && !gameMethod.isEmpty(GameDataCenter.sevBack.switch.clientLog)) {
|
|
|
+ if (!gameMethod.isEmpty(GameDataCenter.login.playerInfo.switch) && !gameMethod.isEmpty(GameDataCenter.login.playerInfo.switch.clientLog)) {
|
|
|
console.warn("S->C:", JSON.stringify(temp))
|
|
|
}
|
|
|
} else {
|
|
|
- if (!gameMethod.isEmpty(GameDataCenter.sevBack) && !gameMethod.isEmpty(GameDataCenter.sevBack.switch) && !gameMethod.isEmpty(GameDataCenter.sevBack.switch.clientLog)) {
|
|
|
+ if (!gameMethod.isEmpty(GameDataCenter.login.playerInfo.switch) && !gameMethod.isEmpty(GameDataCenter.login.playerInfo.switch.clientLog)) {
|
|
|
console.warn("S->C:", temp)
|
|
|
}
|
|
|
}
|
|
@@ -263,7 +263,7 @@ export default class HttpRequest {
|
|
|
this.errCount = 0
|
|
|
let delayTime = new Date().getTime()
|
|
|
taoBaoCloud().then(res => {
|
|
|
- if (!gameMethod.isEmpty(GameDataCenter.sevBack?.switch?.clientLog)) {
|
|
|
+ if (!gameMethod.isEmpty(GameDataCenter.login.playerInfo?.switch?.clientLog)) {
|
|
|
console.log("net delay time == " + (new Date().getTime() - delayTime))
|
|
|
}
|
|
|
});
|