2
0

api.js.tpl 853 B

1234567891011121314151617181920212223242526272829303132
  1. {{if .IsPlugin}}
  2. // {{.FuncName}} {{.FuncDesc}}
  3. // @Tags {{.StructName}}
  4. // @Summary {{.FuncDesc}}
  5. // @Accept application/json
  6. // @Produce application/json
  7. // @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
  8. // @Router /{{.Abbreviation}}/{{.Router}} [{{.Method}}]
  9. export const {{.Router}} = () => {
  10. return service({
  11. url: '/{{.Abbreviation}}/{{.Router}}',
  12. method: '{{.Method}}'
  13. })
  14. }
  15. {{- else -}}
  16. // {{.FuncName}} {{.FuncDesc}}
  17. // @Tags {{.StructName}}
  18. // @Summary {{.FuncDesc}}
  19. // @Accept application/json
  20. // @Produce application/json
  21. // @Success 200 {object} response.Response{data=object,msg=string} "成功"
  22. // @Router /{{.Abbreviation}}/{{.Router}} [{{.Method}}]
  23. export const {{.Router}} = () => {
  24. return service({
  25. url: '/{{.Abbreviation}}/{{.Router}}',
  26. method: '{{.Method}}'
  27. })
  28. }
  29. {{- end -}}