Merge pull request #23 from songquanpeng/main

Fork Sync: Update from parent repository
This commit is contained in:
quzard 2023-06-12 09:45:48 +08:00 committed by GitHub
commit d5091492bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View File

@ -17,6 +17,7 @@ func GroupRatio2JSONString() string {
} }
func UpdateGroupRatioByJSONString(jsonStr string) error { func UpdateGroupRatioByJSONString(jsonStr string) error {
GroupRatio = make(map[string]float64)
return json.Unmarshal([]byte(jsonStr), &GroupRatio) return json.Unmarshal([]byte(jsonStr), &GroupRatio)
} }

View File

@ -39,6 +39,7 @@ func ModelRatio2JSONString() string {
} }
func UpdateModelRatioByJSONString(jsonStr string) error { func UpdateModelRatioByJSONString(jsonStr string) error {
ModelRatio = make(map[string]float64)
return json.Unmarshal([]byte(jsonStr), &ModelRatio) return json.Unmarshal([]byte(jsonStr), &ModelRatio)
} }

View File

@ -29,7 +29,7 @@ function renderType(type) {
function renderBalance(type, balance) { function renderBalance(type, balance) {
if (type === 5) { if (type === 5) {
return <span>{balance.toFixed(2)}</span> return <span>¥{(balance / 10000).toFixed(2)}</span>
} }
return <span>${balance.toFixed(2)}</span> return <span>${balance.toFixed(2)}</span>
} }