You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
1.7KB

  1. // import axios from 'axios'
  2. import request from '@/utils/request'
  3. /* 获取视频列表 */
  4. export function getVideos(params) {
  5. return request({
  6. url: '/video-admin/video/video/list',
  7. method: 'get',
  8. params
  9. })
  10. }
  11. /* 获取视频信息 */
  12. export function getVideoMsg(videoId) {
  13. return request({
  14. url: `/video-admin/video/video/info/${videoId}`,
  15. method: 'get'
  16. })
  17. }
  18. /* 创建视频 */
  19. export function addVideos(data) {
  20. return request({
  21. url: '/video-admin/video/video/save',
  22. method: 'post',
  23. data
  24. })
  25. }
  26. /* 删除视频 */
  27. export function removeVideos(data) {
  28. return request({
  29. url: '/video-admin/video/video/delete',
  30. method: 'post',
  31. data
  32. })
  33. }
  34. /* 修改视频 */
  35. export function updateVideos(data) {
  36. return request({
  37. url: '/video-admin/video/video/update',
  38. method: 'post',
  39. data
  40. })
  41. }
  42. /* 视频排序 */
  43. export function updateVideosOrder(data) {
  44. return request({
  45. url: '/video-admin/video/video/updateOrder',
  46. method: 'post',
  47. data
  48. })
  49. }
  50. /* 视频发布 */
  51. export function videosUp(data) {
  52. return request({
  53. url: '/video-admin/video/video/up',
  54. method: 'post',
  55. data
  56. })
  57. }
  58. /* 视频取消发布 */
  59. export function videosDown(data) {
  60. return request({
  61. url: '/video-admin/video/video/down',
  62. method: 'post',
  63. data
  64. })
  65. }
  66. // const service = axios.create({
  67. // baseURL: 'qq',
  68. // timeout: 5000
  69. // })
  70. /* 获取腾讯视频真实地址 */
  71. // export function getVideoUrl(vid) {
  72. // return service({
  73. // url: `/getinfo?vids=${vid}&platform=101001&charge=0&otype=json`,
  74. // method: 'get'
  75. // })
  76. // }
  77. // export function getVideoUrl(vid) {
  78. // return request({
  79. // url: `/video-admin/qq/getinfo?vids=${vid}&platform=101001&charge=0&otype=json`,
  80. // method: 'get'
  81. // })
  82. // }