Commit d337745d6ffa03259756b66e717267fec1fd0094
1 parent
ad77ccd7
Exists in
master
提交
Showing
2 changed files
with
14 additions
and
0 deletions
Show diff stats
src/HttpServer/logic/function.go
src/HttpServer/logic/logic.go
... | ... | @@ -2315,6 +2315,19 @@ func HandlerQueryBuyCat(w http.ResponseWriter, data string, uuid int) { |
2315 | 2315 | tmp.Coin = strconv.FormatInt(v.CurPrice, 10) |
2316 | 2316 | resp.Data = append(resp.Data, tmp) |
2317 | 2317 | } |
2318 | + _, highest := uinfo.CalcHigestCatName() | |
2319 | + offset := highest - len(uinfo.BuyCatInfo) | |
2320 | + if offset > 0 { | |
2321 | + for i := 0; i < offset; i++ { | |
2322 | + cfg := jsonconf.GetCatConfig(len(uinfo.BuyCatInfo) + i + 1) | |
2323 | + if cfg != nil { | |
2324 | + var tmp BuyCatDesc | |
2325 | + tmp.CatId = len(uinfo.BuyCatInfo) + i + 1 | |
2326 | + tmp.Coin = cfg.Price | |
2327 | + resp.Data = append(resp.Data, tmp) | |
2328 | + } | |
2329 | + } | |
2330 | + } | |
2318 | 2331 | |
2319 | 2332 | resp.Code = 0 |
2320 | 2333 | break | ... | ... |