diff --git a/backend/package.json b/backend/package.json index 2edc3e7..a4bb5ec 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.19.91", + "version": "2.19.92", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.", "main": "src/main.js", "scripts": { diff --git a/backend/src/utils/flow.js b/backend/src/utils/flow.js index 04feca2..b9d00a0 100644 --- a/backend/src/utils/flow.js +++ b/backend/src/utils/flow.js @@ -230,7 +230,7 @@ export function flowTransfer(flow, unit = 'B') { let unitIndex = unitList.indexOf(unit); return flow < 1024 || unitIndex === unitList.length - 1 - ? { value: flow.toFixed(1), unit: unit } + ? { value: (Math.round(flow * 100) / 100).toString(), unit: unit } : flowTransfer(flow / 1024, unitList[++unitIndex]); }