协议调试

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,
+2 -2
View File
@@ -5446,7 +5446,7 @@ static getTypeUrl(typeUrlPrefix?: string): string;
expire?: (number|Long|null);
/** CSLoginRes accId */
accId?: (number|Long|null);
accId?: (string|null);
/** CSLoginRes cdn */
cdn?: (string|null);
@@ -5474,7 +5474,7 @@ refreshToken: string;
expire: (number|Long);
/** CSLoginRes accId. */
accId: (number|Long);
accId: string;
/** CSLoginRes cdn. */
cdn: string;
+10 -24
View File
@@ -12790,7 +12790,7 @@ $root.cs = (function() {
* @property {string|null} [token] CSLoginRes token
* @property {string|null} [refreshToken] CSLoginRes refreshToken
* @property {number|Long|null} [expire] CSLoginRes expire
* @property {number|Long|null} [accId] CSLoginRes accId
* @property {string|null} [accId] CSLoginRes accId
* @property {string|null} [cdn] CSLoginRes cdn
*/
@@ -12843,11 +12843,11 @@ $root.cs = (function() {
/**
* CSLoginRes accId.
* @member {number|Long} accId
* @member {string} accId
* @memberof cs.CSLoginRes
* @instance
*/
CSLoginRes.prototype.accId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
CSLoginRes.prototype.accId = "";
/**
* CSLoginRes cdn.
@@ -12890,7 +12890,7 @@ $root.cs = (function() {
if (message.expire != null && Object.hasOwnProperty.call(message, "expire"))
writer.uint32(/* id 4, wireType 0 =*/32).int64(message.expire);
if (message.accId != null && Object.hasOwnProperty.call(message, "accId"))
writer.uint32(/* id 5, wireType 0 =*/40).int64(message.accId);
writer.uint32(/* id 5, wireType 2 =*/42).string(message.accId);
if (message.cdn != null && Object.hasOwnProperty.call(message, "cdn"))
writer.uint32(/* id 6, wireType 2 =*/50).string(message.cdn);
return writer;
@@ -12946,7 +12946,7 @@ $root.cs = (function() {
break;
}
case 5: {
message.accId = reader.int64();
message.accId = reader.string();
break;
}
case 6: {
@@ -13001,8 +13001,8 @@ $root.cs = (function() {
if (!$util.isInteger(message.expire) && !(message.expire && $util.isInteger(message.expire.low) && $util.isInteger(message.expire.high)))
return "expire: integer|Long expected";
if (message.accId != null && message.hasOwnProperty("accId"))
if (!$util.isInteger(message.accId) && !(message.accId && $util.isInteger(message.accId.low) && $util.isInteger(message.accId.high)))
return "accId: integer|Long expected";
if (!$util.isString(message.accId))
return "accId: string expected";
if (message.cdn != null && message.hasOwnProperty("cdn"))
if (!$util.isString(message.cdn))
return "cdn: string expected";
@@ -13037,14 +13037,7 @@ $root.cs = (function() {
else if (typeof object.expire === "object")
message.expire = new $util.LongBits(object.expire.low >>> 0, object.expire.high >>> 0).toNumber();
if (object.accId != null)
if ($util.Long)
(message.accId = $util.Long.fromValue(object.accId)).unsigned = false;
else if (typeof object.accId === "string")
message.accId = parseInt(object.accId, 10);
else if (typeof object.accId === "number")
message.accId = object.accId;
else if (typeof object.accId === "object")
message.accId = new $util.LongBits(object.accId.low >>> 0, object.accId.high >>> 0).toNumber();
message.accId = String(object.accId);
if (object.cdn != null)
message.cdn = String(object.cdn);
return message;
@@ -13072,11 +13065,7 @@ $root.cs = (function() {
object.expire = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
} else
object.expire = options.longs === String ? "0" : 0;
if ($util.Long) {
var long = new $util.Long(0, 0, false);
object.accId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
} else
object.accId = options.longs === String ? "0" : 0;
object.accId = "";
object.cdn = "";
}
if (message.name != null && message.hasOwnProperty("name"))
@@ -13091,10 +13080,7 @@ $root.cs = (function() {
else
object.expire = options.longs === String ? $util.Long.prototype.toString.call(message.expire) : options.longs === Number ? new $util.LongBits(message.expire.low >>> 0, message.expire.high >>> 0).toNumber() : message.expire;
if (message.accId != null && message.hasOwnProperty("accId"))
if (typeof message.accId === "number")
object.accId = options.longs === String ? String(message.accId) : message.accId;
else
object.accId = options.longs === String ? $util.Long.prototype.toString.call(message.accId) : options.longs === Number ? new $util.LongBits(message.accId.low >>> 0, message.accId.high >>> 0).toNumber() : message.accId;
object.accId = message.accId;
if (message.cdn != null && message.hasOwnProperty("cdn"))
object.cdn = message.cdn;
return object;