广告平台(站长下代理使用)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

hdl_account.go 1.5 KiB

4 months ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. package hdl
  2. import (
  3. "applet/app/e"
  4. "applet/app/lib/validate"
  5. "applet/app/md"
  6. "applet/app/svc"
  7. "github.com/gin-gonic/gin"
  8. )
  9. // AccountBase
  10. // @Summary 账号信息
  11. // @Tags 账号中心------嘉俊
  12. // @Description 账号信息
  13. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  14. // @Accept json
  15. // @Produce json
  16. // @Success 200 {object} md.AccountBase "具体看返回内容"
  17. // @Failure 400 {object} md.Response "具体错误"
  18. // @Router /api/account/base [GET]
  19. func AccountBase(c *gin.Context) {
  20. svc.AccountBase(c)
  21. }
  22. // AccountUpdatePassword
  23. // @Summary 企业认证保存
  24. // @Tags 账号中心------嘉俊
  25. // @Description 资质认证-企业认证保存
  26. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  27. // @Accept json
  28. // @Produce json
  29. // @Param args body md.AccountUpdatePasswordReq true "请求参数"
  30. // @Success 200 {string} "具体看返回内容"
  31. // @Failure 400 {object} md.Response "具体错误"
  32. // @Router /api/account/update/password [POST]
  33. func AccountUpdatePassword(c *gin.Context) {
  34. var req md.AccountUpdatePasswordReq
  35. err := c.ShouldBindJSON(&req)
  36. if err != nil {
  37. err = validate.HandleValidateErr(err)
  38. err1 := err.(e.E)
  39. e.OutErr(c, err1.Code, err1.Error())
  40. return
  41. }
  42. err = svc.AccountUpdatePassword(c, req)
  43. if err != nil {
  44. e.OutErr(c, 400, err)
  45. return
  46. }
  47. e.OutSuc(c, "success", nil)
  48. return
  49. }