chart.js 1011 B

123456789101112131415161718192021222324252627282930313233
  1. import { get } from '@/utils/request'
  2. const chartApi = {
  3. examCountApi: '/api/content/chart/exam/count',
  4. examPassRateApi: '/api/content/chart/exam/rate',
  5. lineChartDataApi: '/api/content/chart/exam/linechart',
  6. videoWatchApi: '/api/content/chart/video/watch',
  7. videoWatchRegionApi: '/api/content/chart/video/region'
  8. }
  9. // *********************************************************************************************************************
  10. // 考试数据接口
  11. export function getExamCount() {
  12. return get(chartApi.examCountApi)
  13. }
  14. export function getExamPassRate() {
  15. return get(chartApi.examPassRateApi)
  16. }
  17. export function getLineChartData() {
  18. return get(chartApi.lineChartDataApi)
  19. }
  20. // *********************************************************************************************************************
  21. // 用户视频观看数据接口
  22. export function getUserWatch() {
  23. return get(chartApi.videoWatchApi)
  24. }
  25. export function getUserWatchRegion() {
  26. return get(chartApi.videoWatchRegionApi)
  27. }