🐞 fix(活动): 高级签到购买逻辑
This commit is contained in:
@@ -98,7 +98,7 @@ export async function getPlayerSignInData(activityId: number, serverId: number,
|
||||
export async function makeSignInVIP(roleId: string, roleName: string, sid: string, serverId: number,
|
||||
activityId: number, productID: string) {
|
||||
let activityData: ActivityModelType = await getActivityById(activityId);
|
||||
if (activityData.type !== ACTIVITY_TYPE.SIGN_IN_VIP) {
|
||||
if (activityData.type !== ACTIVITY_TYPE.SIGN_IN_VIP && activityData.type !== ACTIVITY_TYPE.COMMON_SIGN_IN) {
|
||||
return STATUS.ACTIVITY_TYPE_ERROR;
|
||||
}
|
||||
let createTime = await getRoleCreateTime(roleId);
|
||||
@@ -127,3 +127,13 @@ export async function canBuyVip(lv: number) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
export async function checkSignInCanBuy(roleId: string, serverId: number, activityId: number, productID: string) {
|
||||
|
||||
let playerData = await getPlayerSignInData(activityId, serverId, roleId);
|
||||
if (!playerData || playerData.isVip) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
Reference in New Issue
Block a user