From b8ad2e71f12ae3f1c40c156e2c41a3bf644dd21e Mon Sep 17 00:00:00 2001 From: weinan2087 Date: Fri, 30 Sep 2022 17:16:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=BB=8F=E9=AA=8C=E5=80=BC?= =?UTF-8?q?=E4=B8=BA0=E6=97=B6=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E8=BF=9B=E5=BA=A6=E6=9D=A1=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/tools.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/tools.js b/src/utils/tools.js index 368735ad..36bc33a9 100644 --- a/src/utils/tools.js +++ b/src/utils/tools.js @@ -277,6 +277,7 @@ export function experienceValue(total) { data.start = 'LV1'; data.end = 'LV2'; data.endValue = 600; + if(total == 0){total = 1;} data.percentage = parseFloat((total / 600) * 100); } else if(total > 300 || total == 300 || total < 600){ data.start = 'LV2'; @@ -324,6 +325,8 @@ export function experienceValue(total) { data.endValue = 30000; data.percentage = parseFloat((total / 30000) * 100); } + console.log("&&&&&&&&&&&&&&&&&&&&&&&"); + console.log(data); return data; } export function translate(field) {