|
@@ -854,7 +854,7 @@
|
|
|
|
|
|
class HttpMgr {
|
|
class HttpMgr {
|
|
constructor() {
|
|
constructor() {
|
|
- this.isDev = true;
|
|
|
|
|
|
+ this.isDev = false;
|
|
HttpMgr._instance = this;
|
|
HttpMgr._instance = this;
|
|
}
|
|
}
|
|
static getInstance() {
|
|
static getInstance() {
|
|
@@ -6145,7 +6145,7 @@
|
|
show(type) {
|
|
show(type) {
|
|
super.show();
|
|
super.show();
|
|
this.curType = type == 0 ? "qiugan" : "daoju";
|
|
this.curType = type == 0 ? "qiugan" : "daoju";
|
|
- this.switchBtn("qiugan");
|
|
|
|
|
|
+ this.switchBtn("");
|
|
this.playSecretaryIdle();
|
|
this.playSecretaryIdle();
|
|
this.updateBallRod();
|
|
this.updateBallRod();
|
|
}
|
|
}
|
|
@@ -7601,6 +7601,17 @@
|
|
}
|
|
}
|
|
JSBridgeUtils.instance.loginOutForApp();
|
|
JSBridgeUtils.instance.loginOutForApp();
|
|
this.setUserDefaultNickname();
|
|
this.setUserDefaultNickname();
|
|
|
|
+ DataMgr.setCoin2(4000);
|
|
|
|
+ DataMgr.setDiamond2(0);
|
|
|
|
+ this.setDefaultQiuGanInfo();
|
|
|
|
+ }
|
|
|
|
+ setDefaultQiuGanInfo() {
|
|
|
|
+ DataMgr.setBallRod(0, 1);
|
|
|
|
+ DataMgr.setBallRod(1, 0);
|
|
|
|
+ DataMgr.setBallRod(2, 0);
|
|
|
|
+ DataMgr.setBallRod(3, 0);
|
|
|
|
+ DataMgr.setBallRod(4, 0);
|
|
|
|
+ DataMgr.setBallRod(5, 1);
|
|
}
|
|
}
|
|
setUserDefaultNickname() {
|
|
setUserDefaultNickname() {
|
|
let defUsername = "player";
|
|
let defUsername = "player";
|
|
@@ -8032,6 +8043,11 @@
|
|
Moyu.initUser(this, this.freshUser, force);
|
|
Moyu.initUser(this, this.freshUser, force);
|
|
}
|
|
}
|
|
this.freshUser();
|
|
this.freshUser();
|
|
|
|
+ console.log('zh:5秒后更新用戶資產信息');
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ console.log('setTimeout 5秒over 執行');
|
|
|
|
+ DataMgr.getUserZiChanInfo();
|
|
|
|
+ }, 5000);
|
|
}
|
|
}
|
|
event_login_in() {
|
|
event_login_in() {
|
|
console.log("zh:event_login_in被触发");
|
|
console.log("zh:event_login_in被触发");
|
|
@@ -18720,6 +18736,14 @@
|
|
xGame.eventMgr.event(COIN_CHANGE);
|
|
xGame.eventMgr.event(COIN_CHANGE);
|
|
this.updateUserInfo2Server("jb");
|
|
this.updateUserInfo2Server("jb");
|
|
}
|
|
}
|
|
|
|
+ static setCoin2(val) {
|
|
|
|
+ if (typeof val != "number") {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ this.userData.coin = val;
|
|
|
|
+ this.saveUserData();
|
|
|
|
+ xGame.eventMgr.event(COIN_CHANGE);
|
|
|
|
+ }
|
|
static setCoinFormServer(val) {
|
|
static setCoinFormServer(val) {
|
|
if (typeof val != "number") {
|
|
if (typeof val != "number") {
|
|
return;
|
|
return;
|
|
@@ -18747,6 +18771,14 @@
|
|
xGame.eventMgr.event(DIAMOND_CHANGE);
|
|
xGame.eventMgr.event(DIAMOND_CHANGE);
|
|
this.updateUserInfo2Server("zs");
|
|
this.updateUserInfo2Server("zs");
|
|
}
|
|
}
|
|
|
|
+ static setDiamond2(val) {
|
|
|
|
+ if (typeof val != "number") {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ this.userData.diamond = val;
|
|
|
|
+ this.saveUserData();
|
|
|
|
+ xGame.eventMgr.event(DIAMOND_CHANGE);
|
|
|
|
+ }
|
|
static setDiamondFormServer(val) {
|
|
static setDiamondFormServer(val) {
|
|
if (typeof val != "number") {
|
|
if (typeof val != "number") {
|
|
return;
|
|
return;
|
|
@@ -18891,6 +18923,7 @@
|
|
this.saveUserData();
|
|
this.saveUserData();
|
|
}
|
|
}
|
|
static setBallRodFormServer(haveQiuGanJsonStr) {
|
|
static setBallRodFormServer(haveQiuGanJsonStr) {
|
|
|
|
+ console.log('zh:haveQiuGanJsonStr = ' + haveQiuGanJsonStr);
|
|
if (!haveQiuGanJsonStr) {
|
|
if (!haveQiuGanJsonStr) {
|
|
console.log("setBallRodFormServer数据为空或未定义");
|
|
console.log("setBallRodFormServer数据为空或未定义");
|
|
return;
|
|
return;
|
|
@@ -18901,13 +18934,9 @@
|
|
let v = haveQiuGanJsonObj[key];
|
|
let v = haveQiuGanJsonObj[key];
|
|
let k = parseInt(key);
|
|
let k = parseInt(key);
|
|
let idx = k - 1;
|
|
let idx = k - 1;
|
|
- console.log('zh:更新IDX = ' + idx);
|
|
|
|
|
|
+ console.log('zh:开始更新IDX = ' + idx);
|
|
console.log('this.userData.ballRod[idx]===' + this.userData.ballRod[idx]);
|
|
console.log('this.userData.ballRod[idx]===' + this.userData.ballRod[idx]);
|
|
- if (this.userData.ballRod[idx] === 0) {
|
|
|
|
- console.log('zh: uuuuu ' + (k - 1));
|
|
|
|
- this.userData.ballRod[k - 1] = 1;
|
|
|
|
- this.saveUserData();
|
|
|
|
- }
|
|
|
|
|
|
+ this.userData.ballRod[idx] = v;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
static getCurBallRod() {
|
|
static getCurBallRod() {
|
|
@@ -23370,7 +23399,7 @@
|
|
show(type) {
|
|
show(type) {
|
|
super.show();
|
|
super.show();
|
|
this.curType = type == 0 ? "qiugan" : "daoju";
|
|
this.curType = type == 0 ? "qiugan" : "daoju";
|
|
- this.switchBtn("qiugan");
|
|
|
|
|
|
+ this.switchBtn("");
|
|
this.playSecretaryIdle();
|
|
this.playSecretaryIdle();
|
|
this.updateBallRod();
|
|
this.updateBallRod();
|
|
}
|
|
}
|
|
@@ -24519,6 +24548,17 @@
|
|
}
|
|
}
|
|
JSBridgeUtils.instance.loginOutForApp();
|
|
JSBridgeUtils.instance.loginOutForApp();
|
|
this.setUserDefaultNickname();
|
|
this.setUserDefaultNickname();
|
|
|
|
+ DataMgr.setCoin2(4000);
|
|
|
|
+ DataMgr.setDiamond2(0);
|
|
|
|
+ this.setDefaultQiuGanInfo();
|
|
|
|
+ }
|
|
|
|
+ setDefaultQiuGanInfo() {
|
|
|
|
+ DataMgr.setBallRod(0, 1);
|
|
|
|
+ DataMgr.setBallRod(1, 0);
|
|
|
|
+ DataMgr.setBallRod(2, 0);
|
|
|
|
+ DataMgr.setBallRod(3, 0);
|
|
|
|
+ DataMgr.setBallRod(4, 0);
|
|
|
|
+ DataMgr.setBallRod(5, 1);
|
|
}
|
|
}
|
|
setUserDefaultNickname() {
|
|
setUserDefaultNickname() {
|
|
let defUsername = "player";
|
|
let defUsername = "player";
|
|
@@ -24950,6 +24990,11 @@
|
|
Moyu.initUser(this, this.freshUser, force);
|
|
Moyu.initUser(this, this.freshUser, force);
|
|
}
|
|
}
|
|
this.freshUser();
|
|
this.freshUser();
|
|
|
|
+ console.log('zh:5秒后更新用戶資產信息');
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ console.log('setTimeout 5秒over 執行');
|
|
|
|
+ DataMgr.getUserZiChanInfo();
|
|
|
|
+ }, 5000);
|
|
}
|
|
}
|
|
event_login_in() {
|
|
event_login_in() {
|
|
console.log("zh:event_login_in被触发");
|
|
console.log("zh:event_login_in被触发");
|