|
|
@@ -2,7 +2,7 @@
|
|
|
* @Author: mojunshou 1637302775@qq.com
|
|
|
* @Date: 2025-04-11 10:16:41
|
|
|
* @LastEditors: mojunshou 1637302775@qq.com
|
|
|
- * @LastEditTime: 2025-04-29 18:59:59
|
|
|
+ * @LastEditTime: 2025-04-30 18:33:10
|
|
|
* @Description:
|
|
|
*/
|
|
|
// ServerHandler.ts
|
|
|
@@ -51,7 +51,7 @@ export class ServerHandler {
|
|
|
}
|
|
|
|
|
|
onWxLoginInfo(str: string) {
|
|
|
- console.log('[服务器] 微信登录返回', str);
|
|
|
+ //console.log('[服务器] 微信登录返回', str);
|
|
|
// let
|
|
|
this.getAccountInfo();
|
|
|
}
|
|
|
@@ -66,7 +66,7 @@ export class ServerHandler {
|
|
|
}
|
|
|
|
|
|
onAccountInfo(str: string) {
|
|
|
- console.log('[服务器] 获取账号信息返回', str);
|
|
|
+ //console.log('[服务器] 获取账号信息返回', str);
|
|
|
const data = JSON.parse(str);
|
|
|
const account = smc.account.AccountModel;
|
|
|
const game = smc.game.GameModel;
|
|
|
@@ -102,7 +102,7 @@ export class ServerHandler {
|
|
|
}
|
|
|
|
|
|
onDailyReward(str: string) {
|
|
|
- console.log('[服务器] 每日奖励返回', str);
|
|
|
+ //console.log('[服务器] 每日奖励返回', str);
|
|
|
let result = JSON.parse(str);
|
|
|
smc.account.AccountModel.hbCoin = result.props["1004"];
|
|
|
smc.account.AccountModel.xcCount = result.props["1007"]; //消除次数
|
|
|
@@ -127,7 +127,7 @@ export class ServerHandler {
|
|
|
}
|
|
|
|
|
|
onHbTxInfo(str: string) {
|
|
|
- console.log('[服务器] 获取红包页面信息返回', str);
|
|
|
+ //console.log('[服务器] 获取红包页面信息返回', str);
|
|
|
let result = JSON.parse(str);
|
|
|
smc.account.AccountModel.hbCoin = result.props["1004"] || 0;
|
|
|
smc.account.AccountModel.xcCount = result.props["1007"] || 0; //消除次数
|
|
|
@@ -177,7 +177,7 @@ export class ServerHandler {
|
|
|
|
|
|
//提现列表
|
|
|
onRecordList(str: string) {
|
|
|
- console.log('[服务器] 提现列表返回', str);
|
|
|
+ //console.log('[服务器] 提现列表返回', str);
|
|
|
const result = JSON.parse(str);
|
|
|
if (result.count > 0) {
|
|
|
smc.game.GameModel.recordList = result.list;
|
|
|
@@ -194,7 +194,7 @@ export class ServerHandler {
|
|
|
}
|
|
|
|
|
|
onGameAwardInfo(str: string) {
|
|
|
- console.log('[服务器] 获取通关信息', str);
|
|
|
+ //console.log('[服务器] 获取通关信息', str);
|
|
|
const result = JSON.parse(str);
|
|
|
smc.game.GameModel.passViewInfo = result;
|
|
|
oops.message.dispatchEvent(GameEvent.openView, 'openPassView');
|
|
|
@@ -210,7 +210,7 @@ export class ServerHandler {
|
|
|
|
|
|
//提现返利
|
|
|
onRebates(str: string) {
|
|
|
- console.log('[服务器] 提现返利信息', str);
|
|
|
+ //console.log('[服务器] 提现返利信息', str);
|
|
|
let result = JSON.parse(str);
|
|
|
smc.game.GameModel.cashNum = result.props["1004"];
|
|
|
smc.account.AccountModel.hbCoin = result.props["1004"];
|
|
|
@@ -229,7 +229,7 @@ export class ServerHandler {
|
|
|
|
|
|
//双倍惊喜返回
|
|
|
onDoubleSurprise(str: string) {
|
|
|
- console.log('[服务器] 恭喜翻倍信息', str);
|
|
|
+ //console.log('[服务器] 恭喜翻倍信息', str);
|
|
|
let result = JSON.parse(str);
|
|
|
smc.game.GameModel.doubleRewardInfo = result;
|
|
|
oops.message.dispatchEvent(GameEvent.openView, "openDoubleSurprise");
|
|
|
@@ -250,7 +250,7 @@ export class ServerHandler {
|
|
|
}
|
|
|
|
|
|
onEliminationSuccess(str: string) {
|
|
|
- console.log('[服务器] 消除成功返回', str);
|
|
|
+ //console.log('[服务器] 消除成功返回', str);
|
|
|
let result = JSON.parse(str);
|
|
|
if (result?.props && result?.changes) {
|
|
|
const props = result.props;
|
|
|
@@ -278,7 +278,7 @@ export class ServerHandler {
|
|
|
}
|
|
|
|
|
|
onSign(str: string) {
|
|
|
- console.log('[服务器] 签名返回', str);
|
|
|
+ //console.log('[服务器] 签名返回', str);
|
|
|
let result = JSON.parse(str);
|
|
|
smc.game.GameModel.sign = result?.sign || "";
|
|
|
}
|
|
|
@@ -297,7 +297,7 @@ export class ServerHandler {
|
|
|
}
|
|
|
//直接领取通关奖励返回
|
|
|
onGetPassRewards(str: string) {
|
|
|
- console.log('[服务器] 直接领取通关奖励成功返回', str);
|
|
|
+ //console.log('[服务器] 直接领取通关奖励成功返回', str);
|
|
|
let result = JSON.parse(str);
|
|
|
//全部取小数点后两位
|
|
|
smc.game.GameModel.changeHbCoin = result.changes['1004'] || 0;
|
|
|
@@ -332,7 +332,7 @@ export class ServerHandler {
|
|
|
|
|
|
//少量领取翻倍奖励返回
|
|
|
onGetDoubleRewards(str: string) {
|
|
|
- console.log('[服务器] 少量领取双倍奖励成功返回', str);
|
|
|
+ //console.log('[服务器] 少量领取双倍奖励成功返回', str);
|
|
|
let result = JSON.parse(str);
|
|
|
smc.game.GameModel.changeHbCoin = result.changes['1004'] || 0;
|
|
|
smc.game.GameModel.changeWxCoin = result.changes['1005'] || 0;
|
|
|
@@ -347,7 +347,7 @@ export class ServerHandler {
|
|
|
const sign = smc.game.GameModel.sign;
|
|
|
// const level = smc.account.AccountModel.curLevel;
|
|
|
let type = smc.game.GameModel.viewType;
|
|
|
- console.log("获取视频奖励类型", type)
|
|
|
+ //console.log("获取视频奖励类型", type)
|
|
|
const param = {
|
|
|
url: ProtocolEvent.GetVideorReward,
|
|
|
param: {
|
|
|
@@ -362,7 +362,7 @@ export class ServerHandler {
|
|
|
}
|
|
|
|
|
|
onGetVideorReward(str: string) {
|
|
|
- console.log('[服务器] 获取视频奖励放回', str);
|
|
|
+ //console.log('[服务器] 获取视频奖励放回', str);
|
|
|
let result = JSON.parse(str);
|
|
|
if (result.tipThreshold) {
|
|
|
oops.gui.toast("今日奖励已领取,请明天再来吧")
|
|
|
@@ -398,7 +398,7 @@ export class ServerHandler {
|
|
|
}
|
|
|
|
|
|
onGetNextLevel(str: string) {
|
|
|
- console.log('[服务器] 下一关数据返回', str);
|
|
|
+ //console.log('[服务器] 下一关数据返回', str);
|
|
|
let result = JSON.parse(str);
|
|
|
smc.account.AccountModel.curLevel = result.currentLevelData.level;
|
|
|
smc.game.GameModel.curScore = result.currentLevelData.score;
|
|
|
@@ -424,7 +424,7 @@ export class ServerHandler {
|
|
|
|
|
|
|
|
|
onRestartGame(str: string) {
|
|
|
- console.log('[服务器] 重新开始游戏返回', str);
|
|
|
+ //console.log('[服务器] 重新开始游戏返回', str);
|
|
|
let result = JSON.parse(str);
|
|
|
smc.account.AccountModel.curLevel = result.currentLevelData.level;
|
|
|
smc.game.GameModel.curScore = result.currentLevelData.score;
|
|
|
@@ -448,7 +448,7 @@ export class ServerHandler {
|
|
|
}
|
|
|
|
|
|
onWechatReward(str: string) {
|
|
|
- console.log("[服务器] 微信提现请求成功", str);
|
|
|
+ //console.log("[服务器] 微信提现请求成功", str);
|
|
|
let result = JSON.parse(str);
|
|
|
smc.game.GameModel.txNum = result.changes["8001"];
|
|
|
smc.game.GameModel.txType = 1;
|
|
|
@@ -472,7 +472,7 @@ export class ServerHandler {
|
|
|
}
|
|
|
|
|
|
onHbReward(str: string) {
|
|
|
- console.log('[服务器] 红包币提现返回', str);
|
|
|
+ //console.log('[服务器] 红包币提现返回', str);
|
|
|
let result = JSON.parse(str);
|
|
|
const wxCash = result.changes["8001"];
|
|
|
smc.game.GameModel.txNum = wxCash;
|
|
|
@@ -499,7 +499,7 @@ export class ServerHandler {
|
|
|
}
|
|
|
|
|
|
onGetWechatTxInfo(str: string) {
|
|
|
- console.log('[服务器] 获取微信提现页信息返回', str);
|
|
|
+ //console.log('[服务器] 获取微信提现页信息返回', str);
|
|
|
let result = JSON.parse(str);
|
|
|
smc.game.GameModel.wechat_tx_info = result;
|
|
|
oops.message.dispatchEvent(GameEvent.openView, "openWechatWithdrawalView");
|
|
|
@@ -516,7 +516,7 @@ export class ServerHandler {
|
|
|
}
|
|
|
|
|
|
onGetDoubleSpeedTime(str: string) {
|
|
|
- console.log('[服务器] 获取二倍速时长返回', str);
|
|
|
+ //console.log('[服务器] 获取二倍速时长返回', str);
|
|
|
let result = JSON.parse(str);
|
|
|
smc.game.GameModel.doubleSpeedTime = result.duration;
|
|
|
oops.message.dispatchEvent(GameEvent.openView, "openDoubleSpeedView");
|
|
|
@@ -533,7 +533,7 @@ export class ServerHandler {
|
|
|
}
|
|
|
|
|
|
onGetGuideInfo(str: string) {
|
|
|
- console.log('[服务器] 获取引导界面信息返回', str);
|
|
|
+ //console.log('[服务器] 获取引导界面信息返回', str);
|
|
|
let result = JSON.parse(str);
|
|
|
smc.game.GameModel.loadbarInfo = result;
|
|
|
}
|
|
|
@@ -554,7 +554,7 @@ export class ServerHandler {
|
|
|
}
|
|
|
|
|
|
onUpdatePopupState(str: string) {
|
|
|
- console.log('[服务器] 更新弹出事件返回', str);
|
|
|
+ //console.log('[服务器] 更新弹出事件返回', str);
|
|
|
let result = JSON.parse(str);
|
|
|
smc.game.GameModel.popupShow = result.status || true;
|
|
|
}
|
|
|
@@ -572,7 +572,7 @@ export class ServerHandler {
|
|
|
}
|
|
|
|
|
|
onGetFee(str: string) {
|
|
|
- console.log('[服务器] 领取手续费返回', str);
|
|
|
+ //console.log('[服务器] 领取手续费返回', str);
|
|
|
let result = JSON.parse(str);
|
|
|
// smc.game.GameModel.fee = result.fee;
|
|
|
}
|
|
|
@@ -593,12 +593,12 @@ export class ServerHandler {
|
|
|
}
|
|
|
|
|
|
onSaveCurLevelInfo(str: string) {
|
|
|
- console.log('[服务器] 保存当前关卡信息返回', str);
|
|
|
+ //console.log('[服务器] 保存当前关卡信息返回', str);
|
|
|
let result = JSON.parse(str);
|
|
|
}
|
|
|
|
|
|
onRequestFail(code: number, str: string) {
|
|
|
- console.log('[服务器] 请求失败', code, str);
|
|
|
+ //console.log('[服务器] 请求失败', code, str);
|
|
|
oops.gui.toast("网络错误,请稍后重试~")
|
|
|
}
|
|
|
|