判断是否是VIP
This commit is contained in:
@@ -55,4 +55,10 @@ export class WalletData extends BaseData {
|
|||||||
public get vipExpire(): number {
|
public get vipExpire(): number {
|
||||||
return this._vipExpire;
|
return this._vipExpire;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 判断用户是否是VIP */
|
||||||
|
public get isVip(): boolean {
|
||||||
|
const now = Math.floor(Date.now() / 1000); // 当前时间戳(秒)
|
||||||
|
return this._vipExpire > now;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user