From fa35f8828cb80db25218748bf66f45e785002aa3 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期五, 26 七月 2019 20:02:43 +0800
Subject: [PATCH] fix score
---
extend/util/util.go | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/extend/util/util.go b/extend/util/util.go
index a4a66ca..5d51602 100644
--- a/extend/util/util.go
+++ b/extend/util/util.go
@@ -192,6 +192,9 @@
}
func ParseScore(compareScore float32) float32 {
+ if compareScore < 1 {
+ compareScore = compareScore * 100
+ }
f, _ := strconv.ParseFloat(fmt.Sprintf("%2.2f", compareScore), 32)
return float32(f)
}
\ No newline at end of file
--
Gitblit v1.8.0