hello_logic.go 726 B

123456789101112131415161718192021222324252627282930313233
  1. package auth
  2. import (
  3. "context"
  4. "git.i2edu.net/i2/go-zero/core/logx"
  5. "git.i2edu.net/i2/i2-bill-api/internal/svc"
  6. )
  7. type HelloLogic struct {
  8. logx.Logger
  9. ctx context.Context
  10. svcCtx *svc.ServiceContext
  11. }
  12. func NewHelloLogic(ctx context.Context, svcCtx *svc.ServiceContext) HelloLogic {
  13. return HelloLogic{
  14. Logger: logx.WithContext(ctx),
  15. ctx: ctx,
  16. svcCtx: svcCtx,
  17. }
  18. }
  19. func (l *HelloLogic) Hello() error {
  20. // todo: add your logic here and delete this line
  21. // l.svcCtx.Wechat.GetAccessToken()
  22. // _, err := l.svcCtx.Transformer.GetUser(l.ctx, &transform.UserRequest{Phone: "123123"})
  23. // if err != nil {
  24. // logx.Error(err)
  25. // }
  26. l.svcCtx.Wechat.GenQrCode("1234", "pages/stuInput/stuInput")
  27. return nil
  28. }