From 955d5f8707f4d0886fe4e26904464e4d6c13e588 Mon Sep 17 00:00:00 2001 From: JustSong Date: Mon, 12 Jun 2023 09:11:48 +0800 Subject: [PATCH 1/2] fix: fix group list not correct (close #147) --- common/group-ratio.go | 1 + common/model-ratio.go | 1 + 2 files changed, 2 insertions(+) diff --git a/common/group-ratio.go b/common/group-ratio.go index 0a9cf4ba..b9efbdad 100644 --- a/common/group-ratio.go +++ b/common/group-ratio.go @@ -17,6 +17,7 @@ func GroupRatio2JSONString() string { } func UpdateGroupRatioByJSONString(jsonStr string) error { + GroupRatio = make(map[string]float64) return json.Unmarshal([]byte(jsonStr), &GroupRatio) } diff --git a/common/model-ratio.go b/common/model-ratio.go index bc7e7be3..fc982491 100644 --- a/common/model-ratio.go +++ b/common/model-ratio.go @@ -39,6 +39,7 @@ func ModelRatio2JSONString() string { } func UpdateModelRatioByJSONString(jsonStr string) error { + ModelRatio = make(map[string]float64) return json.Unmarshal([]byte(jsonStr), &ModelRatio) } From 8b2ef666efe51f4e455044a1977a74f034a531c0 Mon Sep 17 00:00:00 2001 From: JustSong Date: Mon, 12 Jun 2023 09:40:49 +0800 Subject: [PATCH 2/2] fix: fix OpenAI-SB balance not correct --- web/src/components/ChannelsTable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/components/ChannelsTable.js b/web/src/components/ChannelsTable.js index 999027fc..48fd521d 100644 --- a/web/src/components/ChannelsTable.js +++ b/web/src/components/ChannelsTable.js @@ -29,7 +29,7 @@ function renderType(type) { function renderBalance(type, balance) { if (type === 5) { - return {balance.toFixed(2)} + return ¥{(balance / 10000).toFixed(2)} } return ${balance.toFixed(2)} }