command_gold2chipwheel.go 609 B

12345678910111213141516171819202122232425262728293031
  1. package client
  2. import (
  3. "encoding/json"
  4. )
  5. func ChipWheel(userId, bet int, ipAddress string) int {
  6. msg := "ChipWheel"
  7. var req SlotScore_req
  8. req.UserId = userId
  9. req.Param = bet
  10. req.IpAddress = ipAddress
  11. d, _ := json.Marshal(req)
  12. resp := DoRequest(msg, string(d))
  13. return resp.RetCode
  14. }
  15. func GetChipWheelConfig() string {
  16. msg := "GetChipWheelConfig"
  17. resp := DoRequest(msg, "")
  18. return resp.Data
  19. }
  20. func GetChipWheelHistory(userId int) string {
  21. msg := "GetChipWheelHistory"
  22. var req Request_base
  23. req.UserId = userId
  24. d, _ := json.Marshal(req)
  25. resp := DoRequest(msg, string(d))
  26. return resp.Data
  27. }