getDevMode.ts 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import { http } from '@/utils/http/axios';
  2. // 获取开发者模式开关状态
  3. export const getDevMode = () => {
  4. return http.request({
  5. url: '/issue/getDevMode',
  6. method: 'get',
  7. });
  8. };
  9. // 切换开发者模式开关状态
  10. export const switchDevMode = () => {
  11. return http.request({
  12. url: '/issue/switchDevMode',
  13. method: 'post',
  14. });
  15. };
  16. export const getVideoLength = () => {
  17. return http.request({
  18. url: '/sysconfig/getVideoLength',
  19. method: 'get',
  20. });
  21. };
  22. export const updateVideoLength = (len: number) => {
  23. return http.request({
  24. url: '/sysconfig/updateVideoLength',
  25. method: 'post',
  26. data: {
  27. videoLength: len,
  28. },
  29. });
  30. };
  31. // 打开预审模式后
  32. export interface DirectPushIssueType {
  33. id: number;
  34. algoCode: string;
  35. algoInfoId: number;
  36. algoName: string;
  37. }
  38. // 查询当前直接推送问题类型
  39. export const getCurIssueTypeList = () => {
  40. return http.request<DirectPushIssueType[]>({
  41. url: '/issue/queryDirectPushIssueTypeList',
  42. method: 'get',
  43. });
  44. };
  45. export const addCurIssueTypeList = (data: { algoInfoIdList: number[] }) => {
  46. return http.request({
  47. url: '/issue/saveDirectPushIssueType',
  48. method: 'post',
  49. data,
  50. });
  51. };
  52. export const deleteCurIssueTypeList = (val: number) => {
  53. return http.request({
  54. url: `/issue/deleteDirectPushIssueTypeById?id=${val}`,
  55. method: 'post',
  56. });
  57. };