协议调试

This commit is contained in:
chen wei bo
2025-09-09 10:31:00 +08:00
parent 8fbbca0e41
commit 52dfc3cdd3
10 changed files with 28 additions and 72 deletions
+5 -5
View File
@@ -9,7 +9,7 @@ export class AccountData extends BaseData {
// 身份类型,1:游客;2:微信;3googleplay
private _identityType = 1;
// 用户id
private _accId = 0;
private _accId: string = "";
// 是否新手
private _isNewGuide = true;
// 是否刚注册
@@ -18,7 +18,7 @@ export class AccountData extends BaseData {
public reset(): void {
this._identifier = "";
this._identityType = 1;
this._accId = 0;
this._accId = "";
this._isNewGuide = true;
this._isNewRegist = true;
}
@@ -26,7 +26,7 @@ export class AccountData extends BaseData {
public clear(): void {
this._identifier = "";
this._identityType = 1;
this._accId = 0;
this._accId = "";
this._isNewGuide = true;
this._isNewRegist = true;
}
@@ -61,12 +61,12 @@ export class AccountData extends BaseData {
}
/** 设置用户id */
public set accId(value: number) {
public set accId(value: string) {
this._accId = value;
}
/** 获取用户id */
public get accId(): number {
public get accId(): string {
return this._accId;
}
+1 -31
View File
@@ -6,28 +6,18 @@ import { BaseData } from "./BaseData";
export class PlayerData extends BaseData {
// 用户名
private _name: string = '';
// 钻石数
private _diamond: number = 0;
// vip失效时间戳
private _vipExpire: number = 0;
public reset(): void {
this._name = '';
this._diamond = 0;
this._vipExpire = 0;
}
public clear(): void {
this._name = '';
this._diamond = 0;
this._vipExpire = 0;
}
public destroy(): void {
super.destroy();
this._name = null;
this._diamond = null;
this._vipExpire = null;
}
/** 设置用户名 */
@@ -38,25 +28,5 @@ export class PlayerData extends BaseData {
/** 获取用户名 */
public get name(): string {
return this._name;
}
/** 设置钻石数 */
public set diamond(value: number) {
this._diamond = value;
}
/** 获取钻石数 */
public get diamond(): number {
return this._diamond;
}
/** 设置vip失效时间戳 */
public set vipExpire(value: number) {
this._vipExpire = value;
}
/** 获取vip失效时间戳 */
public get vipExpire(): number {
return this._vipExpire;
}
}
}
+5 -5
View File
@@ -33,12 +33,12 @@ export class ThemeData extends BaseData {
this._themeIds = [];
for (const t of list) {
const vo: proto.cs.IThemes = {
id: t.id || 0, // 主题 id
key: t.key || "", // 多语言键
name: t.name || "", // 主题名称
category: t.category || 0, // 主题枚举
id: t.id, // 主题 id
key: t.key, // 多语言键
name: t.name, // 主题名称
category: t.category, // 主题枚举
isRelease: t.isRelease, // 是否解锁
path: t.path || "", // 图片路径
path: t.path, // 图片路径
};
this._themes.set(vo.id, vo);
this._themeIds.push(vo.id);
@@ -24,7 +24,7 @@ export class MockAuthService implements IAuthService {
const expireSeconds = Math.floor(Date.now() / 1000) + 7 * 24 * 3600;
// 模拟用户ID
const accId = Math.floor(Math.random() * 1000000);
const accId = (Math.floor(Math.random() * 1000000)).toString();
// 模拟 CDN 前缀
const cdn = "https://cdn.mockserver.com/";
@@ -17,7 +17,7 @@ export class MockCommonService implements ICommonService {
let data = "";
const resName = req.resName;
if (resName === "global_config") {
if (resName === "TbGlobalConfig") {
// 全局配置
data = this.getGlobalConfig();
}
@@ -5,7 +5,7 @@ import { HttpThemeService } from "./HttpThemeService";
import { MockThemeService } from "./MockThemeService";
// 模拟开关
const USE_MOCK = true;
const USE_MOCK = false;
export class ThemeService implements IThemeService {
private static _I: ThemeService | null = null;
@@ -98,7 +98,7 @@ export class ThemePanel extends li_BaseView {
this.recId = girlData.getRecommendGirlId();
this.rectNameKey = girlData.getRecommendGrilName();
let avatarPath = girlData.getRecommendGrilAvatar();
//this.recName.string = LanguageUtils.getText(this.rectNameKey);
this.recName.string = LanguageUtils.getText(this.rectNameKey);
ResManager.I.changeBundleSpriteFrame(
this.recSprite,
avatarPath,