point.go 564 B

12345678910111213141516171819202122232425262728
  1. package http
  2. import (
  3. "go-common/app/service/main/vip/model"
  4. "go-common/library/log"
  5. bm "go-common/library/net/http/blademaster"
  6. )
  7. func buyVipWithPoint(c *bm.Context) {
  8. var (
  9. err error
  10. )
  11. arg := new(model.ArgBuyPoint)
  12. if err = c.Bind(arg); err != nil {
  13. log.Error("buyVipWithPoint Bind err(%+v)", err)
  14. return
  15. }
  16. if err = vipSvc.BuyVipWithPoint(c, arg.Mid, arg.Month); err != nil {
  17. log.Error("BuyVipWithPoint(%d) err(%+v)", arg.Mid, err)
  18. c.JSON(nil, err)
  19. return
  20. }
  21. c.JSON(nil, nil)
  22. }
  23. func rule(c *bm.Context) {
  24. c.JSON(vipSvc.PointRule(c))
  25. }