initdb.js 748 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. donNotShowLoading: true
  14. })
  15. }
  16. // @Tags CheckDB
  17. // @Summary 初始化用户数据库
  18. // @Produce application/json
  19. // @Success 200 {string} string "{"code":0,"data":{},"msg":"探测完成"}"
  20. // @Router /init/checkdb [post]
  21. export const checkDB = () => {
  22. return service({
  23. url: '/init/checkdb',
  24. method: 'post'
  25. })
  26. }