Commit 506f7882b5794642d301ed98f6ef21a9c8e1c93f
1 parent
acb74d26
Exists in
master
提交
Showing
2 changed files
with
9 additions
and
3 deletions
Show diff stats
src/HttpServer/logic/datadef.go
... | ... | @@ -155,7 +155,8 @@ type FetchfenredbagReq struct { |
155 | 155 | } |
156 | 156 | |
157 | 157 | type FetchfenredbagData struct { |
158 | - Wallgold int `json:"wallgold"` | |
158 | + Wallgold int `json:"wallgold"` | |
159 | + Getgoldnum int `json:"getgoldnum"` | |
159 | 160 | } |
160 | 161 | |
161 | 162 | type FetchfenredbagResp struct { |
... | ... | @@ -165,8 +166,9 @@ type FetchfenredbagResp struct { |
165 | 166 | } |
166 | 167 | |
167 | 168 | type FetchluckybagData struct { |
168 | - Wallgold int `json:"wallgold"` | |
169 | - Lefttimes int `json:"lefttimes"` | |
169 | + Wallgold int `json:"wallgold"` | |
170 | + Lefttimes int `json:"lefttimes"` | |
171 | + Getgoldnum int `json:"getgoldnum"` | |
170 | 172 | } |
171 | 173 | |
172 | 174 | type FetchluckybagResp struct { | ... | ... |
src/HttpServer/logic/logic.go
... | ... | @@ -848,6 +848,7 @@ func HandlerFetchluckybag(w http.ResponseWriter, data string, uniqueuuid, gameid |
848 | 848 | |
849 | 849 | resp.Data.Wallgold = uinfo.RealGold |
850 | 850 | resp.Data.Lefttimes = uinfo.LuckyBagLeftTimes |
851 | + resp.Data.Getgoldnum = addcoin | |
851 | 852 | |
852 | 853 | SaveUserInfo(uinfo, uniqueuuid) |
853 | 854 | |
... | ... | @@ -900,6 +901,7 @@ func HandlerFetchfenredbag(w http.ResponseWriter, data string, uniqueuuid, gamei |
900 | 901 | break |
901 | 902 | } |
902 | 903 | |
904 | + addgold := cfg.Free_coin | |
903 | 905 | readgold := 0 |
904 | 906 | readgold, err = AddCoinToSdk(uuid, cfg.Free_coin, gameid, channel, REDBAGTYPE_103) |
905 | 907 | if err != nil { |
... | ... | @@ -910,6 +912,7 @@ func HandlerFetchfenredbag(w http.ResponseWriter, data string, uniqueuuid, gamei |
910 | 912 | } |
911 | 913 | |
912 | 914 | if rdata.Ftype == 2 { |
915 | + addgold += cfg.Video_coin | |
913 | 916 | readgold, err = AddCoinToSdk(uuid, cfg.Video_coin, gameid, channel, REDBAGTYPE_106) |
914 | 917 | if err != nil { |
915 | 918 | logger.Info("GetUserInfo HandlerFetchfenredbag data failed:%v,for:%v", err, data) |
... | ... | @@ -923,6 +926,7 @@ func HandlerFetchfenredbag(w http.ResponseWriter, data string, uniqueuuid, gamei |
923 | 926 | uinfo.RedBagFetchIdlist = append(uinfo.RedBagFetchIdlist, rdata.Id) |
924 | 927 | |
925 | 928 | resp.Data.Wallgold = uinfo.RealGold |
929 | + resp.Data.Getgoldnum = addgold | |
926 | 930 | |
927 | 931 | SaveUserInfo(uinfo, uniqueuuid) |
928 | 932 | ... | ... |