common.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import request from '@/utils/request'
  2. export function sendSmsCode(data) {
  3. return request({
  4. url: '/common/sendSmsCode',
  5. method: 'post',
  6. data: data
  7. })
  8. }
  9. export function getTask(taskId) {
  10. return request({
  11. url: '/common/getTask/'+taskId,
  12. method: 'get'
  13. })
  14. }
  15. export function getSignature() {
  16. return request({
  17. url: '/common/getSignature',
  18. method: 'post',
  19. })
  20. }
  21. export function uploadHuaWeiVod(file) {
  22. const formData = new FormData();
  23. formData.append('file', file);
  24. return request({
  25. url: '/hwcloud/uploadHuaWeiVod',
  26. method: 'post',
  27. data: formData,
  28. headers: {
  29. 'Content-Type': 'multipart/form-data'
  30. }
  31. });
  32. }
  33. export function uploadHuaWeiObs(file, progressCallback) {
  34. const formData = new FormData();
  35. formData.append('file', file);
  36. return request({
  37. url: '/hwcloud/uploadHuaWeiObs',
  38. method: 'post',
  39. data: formData,
  40. headers: {
  41. 'Content-Type': 'multipart/form-data'
  42. }
  43. });
  44. }
  45. export function cdnStatistics(query) {
  46. return request({
  47. url: '/hwcloud/cdnStatistics',
  48. method: 'get',
  49. params:query
  50. })
  51. }
  52. export function getTmpSecretKey(query) {
  53. return request({
  54. url: '/common/getTmpSecretKey',
  55. method: 'get',
  56. params:query
  57. })
  58. }