Commit 0d8f13fbab6d4351c3be3bfc5874aca587bc2b49
1 parent
dd229061
Exists in
master
and in
1 other branch
提交
Showing
1 changed file
with
6 additions
and
0 deletions
Show diff stats
src/HttpServer/logic/httpserver.go
| @@ -212,9 +212,14 @@ func Addcoin(w http.ResponseWriter, r *http.Request) { | @@ -212,9 +212,14 @@ func Addcoin(w http.ResponseWriter, r *http.Request) { | ||
| 212 | Channel string `json:"channel"` | 212 | Channel string `json:"channel"` |
| 213 | } | 213 | } |
| 214 | 214 | ||
| 215 | + type AddcoinData struct { | ||
| 216 | + Walletgold int `json:"walletgold"` | ||
| 217 | + } | ||
| 218 | + | ||
| 215 | type AddcoinResp struct { | 219 | type AddcoinResp struct { |
| 216 | Code int `json:"code"` | 220 | Code int `json:"code"` |
| 217 | Message string `json:"message"` | 221 | Message string `json:"message"` |
| 222 | + Data AddcoinData `json:"data"` | ||
| 218 | } | 223 | } |
| 219 | 224 | ||
| 220 | Uuid := 0 | 225 | Uuid := 0 |
| @@ -266,6 +271,7 @@ func Addcoin(w http.ResponseWriter, r *http.Request) { | @@ -266,6 +271,7 @@ func Addcoin(w http.ResponseWriter, r *http.Request) { | ||
| 266 | var resp AddcoinResp | 271 | var resp AddcoinResp |
| 267 | resp.Code = 0 | 272 | resp.Code = 0 |
| 268 | resp.Message = "success" | 273 | resp.Message = "success" |
| 274 | + resp.Data.Walletgold = uinfo.RealGold | ||
| 269 | respstr, _ := json.Marshal(&resp) | 275 | respstr, _ := json.Marshal(&resp) |
| 270 | fmt.Fprint(w, string(respstr)) | 276 | fmt.Fprint(w, string(respstr)) |
| 271 | } | 277 | } |