Skip to content

Commit

Permalink
Update calculator.html
Browse files Browse the repository at this point in the history
--ci
  • Loading branch information
linianhui committed Mar 10, 2024
1 parent 2ad1238 commit e8e84f0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/tool/loan/calculator.html
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,13 @@
var monthParam = parseInt(blog.getLocationParam(2, 360));
var rateParam = parseFloat(blog.getLocationParam(3, 4.2));
var dateParam = new Date(blog.getLocationParam(4, new Date()));
var aseParam = parseInt(blog.getLocationParam(5, 1)) == 1;
return {
amount: amountParam,
month: monthParam,
rate: rateParam,
date: dateParam
date: dateParam,
asc: aseParam,
};
}

Expand All @@ -255,7 +257,7 @@
month: defaultParam.month,
rate: defaultParam.rate,
date: defaultParam.date,
asc: true
asc: defaultParam.ase,
}
},
filters: {
Expand Down Expand Up @@ -285,7 +287,8 @@

blog.log("calculate result", result);
var dateString = this.date.getFullYear() + "-" + (this.date.getMonth() + 1) + "-" + this.date.getDate();
blog.setLocationParams(this.amount, this.month, this.rate, dateString);
var ascString = this.asc ? 1 : 0;
blog.setLocationParams(this.amount, this.month, this.rate, dateString, ascString);

return result;
}
Expand Down

0 comments on commit e8e84f0

Please sign in to comment.