This topic created in 3026 days ago, the information mentioned may be changed or developed.
等于号左边是支付宝传来的'0.01'这样的字符串,右边是一个数字表示分
if(parseInt(parseFloat(req.body.total_fee) * 100) == amount ){
}
3 replies • 2018-07-17 10:17:01 +08:00
 |
|
1
huoru Jul 10, 2018
支付宝不用分来存这么 6 的吗
|
 |
|
2
xcstream Jul 11, 2018
parseInt 改成 Math.round 了
|
 |
|
3
cqu1980 Jul 17, 2018
@ xcstream parseInt 会出问题,改 Math.round 比较好,主要是经常会出现 9999 的情况。
|