Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.12.1^2
zouap 3 years ago
parent
commit
d5f8a6f812
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      routers/home.go

+ 3
- 0
routers/home.go View File

@@ -8,6 +8,7 @@ package routers
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"strconv"
"strings"
@@ -754,11 +755,13 @@ func GetRankUser(index string) ([]map[string]interface{}, error) {
}
resultOrg := make([]map[string]interface{}, 0)
for _, userRank := range result {
log.Info("userRank" + userRank)
tmpIndex := strings.Index(userRank, " ")
userName := userRank
score := 0
label := ""
if tmpIndex != -1 {
log.Info("len=" + fmt.Sprint(len(userRank)) + " index=" + fmt.Sprint(tmpIndex))
userName = userRank[0:tmpIndex]
left := userRank[tmpIndex+1:]
tmpIndex1 := strings.Index(left, " ")


Loading…
Cancel
Save