fix point consume type
This commit is contained in:
@@ -206,7 +206,8 @@ async function loadPageData(): Promise<void> {
|
||||
|
||||
function getChangeTypeText(changeType?: PointLedger["changeType"]): string {
|
||||
return ({
|
||||
EARN: "积分变化",
|
||||
EARN: "发放积分",
|
||||
CONSUME: "消费积分",
|
||||
REVOKE: "撤销积分",
|
||||
ADJUST: "人工调整"
|
||||
} as Record<string, string>)[changeType || ""] || "未知流水";
|
||||
|
||||
@@ -194,6 +194,7 @@ const endDateVisible = ref(false);
|
||||
const changeTypeOptions = [
|
||||
{ label: "全部类型", value: "ALL" },
|
||||
{ label: "获得 EARN", value: "EARN" },
|
||||
{ label: "消费 CONSUME", value: "CONSUME" },
|
||||
{ label: "撤销 REVOKE", value: "REVOKE" },
|
||||
{ label: "调整 ADJUST", value: "ADJUST" }
|
||||
];
|
||||
@@ -386,7 +387,10 @@ function getLedgerDelta(item: PointLedger): string {
|
||||
|
||||
function getLedgerShortType(item: PointLedger): string {
|
||||
if (item.changeType === "EARN") {
|
||||
return 0 < (item.pointDelta || 0) ? "获得" : "消耗";
|
||||
return "获得";
|
||||
}
|
||||
if (item.changeType === "CONSUME") {
|
||||
return "消耗";
|
||||
}
|
||||
return item.changeType === "REVOKE" ? "撤销" : "调整";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user