project.js 735 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import {
  2. request
  3. } from '@/request/request.js';
  4. /*
  5. * 获取项目列表
  6. *
  7. */
  8. export function getProjectList() {
  9. return request({
  10. url: `/api/project/projectListIdentity`,
  11. method: 'get'
  12. })
  13. }
  14. /*
  15. * 获取项目详情
  16. *
  17. *
  18. */
  19. export function getProjectDetailById(id) {
  20. return request({
  21. url: `/api/project/getProject/${id}`,
  22. method: 'get'
  23. })
  24. }
  25. /*
  26. * 切换项目
  27. * @param null
  28. */
  29. export function selectProject(projectId) {
  30. return request({
  31. url: `/manager/userContext/project/${projectId}`,
  32. method: 'put',
  33. })
  34. }
  35. /*
  36. * 刷新上下文
  37. * @param null
  38. *
  39. */
  40. export function refresh() {
  41. return request({
  42. url: `/manager/userContext/refresh`,
  43. method: 'get',
  44. })
  45. }