2025-08-16 16:14:10 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 账号数据
|
|
|
|
|
|
*/
|
|
|
|
|
|
import { BaseData } from "./BaseData";
|
|
|
|
|
|
|
|
|
|
|
|
export class AccountData extends BaseData {
|
|
|
|
|
|
// 身份识别码,游客的话是设备号,googleplay用户的话是gp平台uid
|
|
|
|
|
|
private _identifier = "";
|
|
|
|
|
|
// 身份类型,1:游客;2:微信;3:googleplay
|
|
|
|
|
|
private _identityType = 1;
|
2025-09-08 15:10:51 +08:00
|
|
|
|
// 用户id
|
2025-09-09 10:30:46 +08:00
|
|
|
|
private _accId: string = "";
|
2025-08-16 16:14:10 +08:00
|
|
|
|
// 是否新手
|
|
|
|
|
|
private _isNewGuide = true;
|
|
|
|
|
|
// 是否刚注册
|
2025-08-25 16:27:18 +08:00
|
|
|
|
private _isNewRegist = true;
|
|
|
|
|
|
|
|
|
|
|
|
public reset(): void {
|
|
|
|
|
|
this._identifier = "";
|
|
|
|
|
|
this._identityType = 1;
|
2025-09-09 10:30:46 +08:00
|
|
|
|
this._accId = "";
|
2025-08-25 16:27:18 +08:00
|
|
|
|
this._isNewGuide = true;
|
|
|
|
|
|
this._isNewRegist = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public clear(): void {
|
|
|
|
|
|
this._identifier = "";
|
|
|
|
|
|
this._identityType = 1;
|
2025-09-09 10:30:46 +08:00
|
|
|
|
this._accId = "";
|
2025-08-25 16:27:18 +08:00
|
|
|
|
this._isNewGuide = true;
|
|
|
|
|
|
this._isNewRegist = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public destroy(): void {
|
|
|
|
|
|
super.destroy();
|
|
|
|
|
|
this._identifier = null;
|
|
|
|
|
|
this._identityType = null;
|
2025-09-08 15:10:51 +08:00
|
|
|
|
this._accId = null;
|
2025-08-25 16:27:18 +08:00
|
|
|
|
this._isNewGuide = null;
|
|
|
|
|
|
this._isNewRegist = null;
|
|
|
|
|
|
}
|
2025-08-16 16:14:10 +08:00
|
|
|
|
|
|
|
|
|
|
/** 设置身份识别码 */
|
|
|
|
|
|
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;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-09-08 15:10:51 +08:00
|
|
|
|
/** 设置用户id */
|
2025-09-09 10:30:46 +08:00
|
|
|
|
public set accId(value: string) {
|
2025-09-08 15:10:51 +08:00
|
|
|
|
this._accId = value;
|
2025-08-16 16:14:10 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-09-08 15:10:51 +08:00
|
|
|
|
/** 获取用户id */
|
2025-09-09 10:30:46 +08:00
|
|
|
|
public get accId(): string {
|
2025-09-08 15:10:51 +08:00
|
|
|
|
return this._accId;
|
2025-08-16 16:14:10 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置是否新手 */
|
|
|
|
|
|
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;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|