Skip to content

Commit

Permalink
fix: 修正加贈邏輯
Browse files Browse the repository at this point in the history
  • Loading branch information
itshenrywu committed Feb 1, 2025
1 parent c2bc3a2 commit ca2bb5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gen.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ logs.sort((a, b) => new Date(b.day) - new Date(a.day));
let totalPoint = 0;
logs = logs.reduceRight((acc, log) => {
log.pay = log.point * 5;
if(totalPoint >= 150) { // 消費滿 $750,多送 150 點
if(log.pay >= 750) { // 消費滿 $750,多送 150 點
log.point += 150;
}
totalPoint += log.point;
Expand Down
2 changes: 1 addition & 1 deletion index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
td .number:nth-child(2) {
display: inline-block;
min-width: 3em;
min-width: 3.4em;
}
</style>
</head>
Expand Down

0 comments on commit ca2bb5b

Please sign in to comment.