From 914cf7bf26c100b5af62c55b00c58884fee4cbd0 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期五, 26 七月 2019 20:50:45 +0800
Subject: [PATCH] add face-viturl-web-camid

---
 extend/util/util.go |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/extend/util/util.go b/extend/util/util.go
index 84e0527..5d51602 100644
--- a/extend/util/util.go
+++ b/extend/util/util.go
@@ -192,6 +192,9 @@
 }
 
 func ParseScore(compareScore float32) float32 {
-	f, _ := strconv.ParseFloat(fmt.Sprintf("%.2f", compareScore*100), 32)
+	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