initdb.js 720 B

123456789101112131415161718192021222324252627
  1. import service from '@/utils/request'
  2. // @Tags InitDB
  3. // @Summary 初始化用户数据库
  4. // @Produce application/json
  5. // @Param data body request.InitDB true "初始化数据库参数"
  6. // @Success 200 {string} string "{"code":0,"data":{},"msg":"自动创建数据库成功"}"
  7. // @Router /init/initdb [post]
  8. export const initDB = (data) => {
  9. return service({
  10. url: '/init/initdb',
  11. method: 'post',
  12. data
  13. })
  14. }
  15. // @Tags CheckDB
  16. // @Summary 初始化用户数据库
  17. // @Produce application/json
  18. // @Success 200 {string} string "{"code":0,"data":{},"msg":"探测完成"}"
  19. // @Router /init/checkdb [post]
  20. export const checkDB = () => {
  21. return service({
  22. url: '/init/checkdb',
  23. method: 'post'
  24. })
  25. }