Files
18xchat/assets/Scripts/chat18x/data/AccountData.ts
T
2025-09-09 10:31:00 +08:00

92 lines
2.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* 账号数据
*/
import { BaseData } from "./BaseData";
export class AccountData extends BaseData {
// 身份识别码,游客的话是设备号,googleplay用户的话是gp平台uid
private _identifier = "";
// 身份类型,1:游客;2:微信;3googleplay
private _identityType = 1;
// 用户id
private _accId: string = "";
// 是否新手
private _isNewGuide = true;
// 是否刚注册
private _isNewRegist = true;
public reset(): void {
this._identifier = "";
this._identityType = 1;
this._accId = "";
this._isNewGuide = true;
this._isNewRegist = true;
}
public clear(): void {
this._identifier = "";
this._identityType = 1;
this._accId = "";
this._isNewGuide = true;
this._isNewRegist = true;
}
public destroy(): void {
super.destroy();
this._identifier = null;
this._identityType = null;
this._accId = null;
this._isNewGuide = null;
this._isNewRegist = null;
}
/** 设置身份识别码 */
public set identifier(value: string) {
this._identifier = value;
}
/** 获取身份识别码 */
public get identifier(): string {
return this._identifier;
}
/** 设置身份类型 */
public set identityType(value: number) {
this._identityType = value;
}
/** 获取身份类型 */
public get identityType(): number {
return this._identityType;
}
/** 设置用户id */
public set accId(value: string) {
this._accId = value;
}
/** 获取用户id */
public get accId(): string {
return this._accId;
}
/** 设置是否新手 */
public set isNewGuide(value: boolean) {
this._isNewGuide = value;
}
/** 获取是否新手 */
public get isNewGuide(): boolean {
return this._isNewGuide;
}
/** 设置是否刚注册 */
public set isNewRegist(value: boolean) {
this._isNewRegist = value;
}
/** 获取是否刚注册 */
public get isNewRegist(): boolean {
return this._isNewRegist;
}
}