From 3f9867512bea0a8415ca9a52c9726244864bc9ba Mon Sep 17 00:00:00 2001 From: xream Date: Tue, 22 Jul 2025 17:40:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B5=81=E9=87=8F=E5=9B=9B=E8=88=8D?= =?UTF-8?q?=E4=BA=94=E5=85=A5=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/package.json | 2 +- backend/src/utils/flow.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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]); }