协议调试
This commit is contained in:
@@ -9,7 +9,7 @@ export class AccountData extends BaseData {
|
||||
// 身份类型,1:游客;2:微信;3:googleplay
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user