command_purchase.go 540 B

123456789101112131415161718192021222324
  1. package client
  2. import (
  3. "encoding/json"
  4. )
  5. // 100K购信息(期数\元宝数量\倒计时\抽奖码集合)
  6. func PurchaseInfo(userId int) Response {
  7. msg := "PurchaseInfo"
  8. var req Request_base
  9. req.UserId = userId
  10. d, _ := json.Marshal(req)
  11. return DoRequest(msg, string(d))
  12. }
  13. // 100K购抽奖(返回操作结果\抽奖码)
  14. func PurchaseBet(userId int, ipAddress string) Response {
  15. msg := "PurchaseBet"
  16. var req Request_base
  17. req.UserId = userId
  18. req.IpAddress = ipAddress
  19. d, _ := json.Marshal(req)
  20. return DoRequest(msg, string(d))
  21. }