fix point rule unit
This commit is contained in:
@@ -296,7 +296,15 @@ function getRuleConditionText(rule: PointRule): string {
|
||||
textList.push(`来源事件:${sourceEvent.value?.name || sourceEvent.value?.id || condition.sourceEventId}`);
|
||||
}
|
||||
if (condition.tiers?.length) {
|
||||
textList.push(condition.tiers.map(tier => `${tier.min}~${tier.max ?? "以上"}:${0 < tier.pointValue ? "发放" : "消耗"} ${Math.abs(tier.pointValue)} 分`).join(","));
|
||||
const tierSourceEvent = sourceEvent.value || (condition.sourceEventId === triggerEvent.value?.id ? triggerEvent.value : undefined);
|
||||
textList.push(condition.tiers.map(tier => {
|
||||
const minText = formatEventNumberValue(tierSourceEvent, tier.min);
|
||||
const maxText = tier.max === undefined || tier.max === null ? "以上" : formatEventNumberValue(tierSourceEvent, tier.max);
|
||||
const pointText = tier.pointValue === 0
|
||||
? "不产生积分流水"
|
||||
: `${0 < tier.pointValue ? "发放" : "消耗"} ${Math.abs(tier.pointValue)} 分`;
|
||||
return `${minText}~${maxText}:${pointText}`;
|
||||
}).join(","));
|
||||
}
|
||||
return textList.join(";") || "无额外条件";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user