更新转移系统

This commit is contained in:
COMPUTER\EDY
2026-08-20 12:36:50 +08:00
parent ecc308799c
commit c42c67ccce
145 changed files with 22601 additions and 201 deletions
+7 -1
View File
@@ -111,6 +111,9 @@ export class GameConfig {
coin: number; //用户金币
film: number; //头像抽卡代币
catArr: any[]; //用户猫数组
isFromWucai: boolean; //本次进入是否来自五彩消消乐
wucai_type: number; //五彩账号迁移状态:-1未参与,0待领奖,1待选择,2/3已完成
wucai_preview: any; //状态1登录时返回的五彩脱敏数据
jungleTreasureState?: any; //登录返回的丛林宝藏状态;未触发活动的用户不存在此属性
jungleTreasureServerNow?: number; //登录接口返回状态时的服务器时间
success: boolean; //用户游戏成功与否
@@ -317,6 +320,9 @@ export class GameConfig {
coin: 0, //用户金币
film: 0, //头像抽卡代币(以服务端返回值为准)
catArr: [1, 2, 3], //已拥有猫咪(登录返回,首页抽猫红点本地判断使用)
isFromWucai: false, //本次进入是否来自五彩消消乐
wucai_type: -1, //五彩账号迁移状态
wucai_preview: null, //五彩账号脱敏预览
success: false, //用户游戏成功与否
matchId: null, //用于埋点上传的ID
gameState: false,
@@ -338,7 +344,7 @@ export class GameConfig {
vibrateOpen: true, //震动
coinnum: 0, //每局的金币数
paid_user: false, //是否是付费用户
version: "1.0.32", //版本号
version: "1.0.33", //版本号
shushu_DistinctId: "", //数数访客ID
shushu_AccountId: "", //数数账号ID
uid: "", //用户和后端唯一id
+29 -3
View File
@@ -11,7 +11,7 @@ export default class Utils {
static httpip: string = `https://q6rvwvtnga.sealoshzh.site/`; //消消王者
//#region 安卓支付
/**获取用户信息*/
static getUserInfo(callBack) {
static getUserInfo(callBack, from?: string) {
//微信登录
if (MiniGameSdk.isWechat()) {
//@ts-ignore
@@ -35,7 +35,16 @@ export default class Utils {
isDebug = true;
}
console.log("___________发起登录请求", isDebug);
Utils.POST("login", { code: res.code, isDebug: isDebug, distinctId: cc.fx.GameConfig.GM_INFO.shushu_DistinctId }, ret => {
const loginData: any = {
code: res.code,
isDebug: isDebug,
distinctId: cc.fx.GameConfig.GM_INFO.shushu_DistinctId,
wucai_capability: 1,
};
if (from === "wucai") {
loginData.from = from;
}
Utils.POST("login", loginData, ret => {
console.log("__________请求结果:", ret);
if (!isCallBackCalled) {
isCallBackCalled = true;
@@ -1867,7 +1876,7 @@ export default class Utils {
}
}
static setForcedUpdate() {
static setForcedUpdate(callBack?) {
let uid = cc.fx.StorageMessage.getStorage("uid");
//旧的读取数据设置数据方法,以强联网为主
if (uid != undefined && uid != "" && uid != null) {
@@ -1882,7 +1891,24 @@ export default class Utils {
} else {
console.log("设置强制更新失败", res);
}
if (callBack) callBack(res);
})
}
static wucaiTransfer(action: "claim_reward" | "choose_wucai" | "choose_current", callBack?) {
const setData = {
uid: cc.fx.GameConfig.GM_INFO.uid,
action: action,
};
Utils.POST("wucaiTransfer", setData, res => {
if (res.code === 1 && res.data) {
cc.fx.GameConfig.GM_INFO.wucai_type = Number(res.data.wucai_type);
}
if (callBack) callBack(res);
if (res.code === 1) {
MiniGameSdk.API.reboot();
}
});
}
}
+1 -1
View File
@@ -455,7 +455,7 @@ var GameTool = {
// cc.fx.StorageMessage.setStorage("level", levelInfo);
// }
let max_level = 1880;
let max_level = 1900;
if (cc.fx.GameConfig.GM_INFO.level > (max_level - 1)) {
cc.fx.GameConfig.GM_INFO.level = max_level;