|
@@ -128,9 +128,10 @@ func getLotteryReceive(lotteryRep config.LotteryReceiveReq) (int, string) {
|
|
|
defer resp.Body.Close()
|
|
|
var info map[string]interface{}
|
|
|
result, _ := ioutil.ReadAll(resp.Body)
|
|
|
- if err = json.Unmarshal(result, &info); err == nil {
|
|
|
- fmt.Println("==============json str 转map=======================", info)
|
|
|
+ if err = json.Unmarshal(result, &info); err != nil {
|
|
|
+ return 0, err.Error()
|
|
|
}
|
|
|
+ fmt.Println("==============json str 转map=======================", info)
|
|
|
codeInt, err2 := strconv.Atoi(fmt.Sprint(info["Code"]))
|
|
|
if err2 != nil {
|
|
|
return 0, err2.Error()
|