123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- import request from '@/utils/request'
- // 视频课程相关接口
- // IE 视频
- export function ieVideoSubjects(query) {
- return request({
- url: '/front/videoCourse/subjects',
- method: 'get',
- params: query
- })
- }
- export function ieVideoKnowledge(query) {
- return request({
- url: '/front/videoCourse/knowledges',
- method: 'get',
- params: query
- })
- }
- // 查询视频大类
- export function videoType() {
- return request({
- url: '/front/videoCourse/subjects',
- method: 'get',
- })
- }
- // 查询科目
- export function videoSubjects(query) {
- return request({
- url: '/front/videoCourse/courses',
- method: 'get',
- params: query
- })
- }
- // 查询年级
- export function videoGrades(query) {
- return request({
- url: '/front/videoCourse/grades',
- method: 'get',
- params: query
- })
- }
- // 查询版本
- export function videoVersions(query) {
- return request({
- url: '/front/videoCourse/versions',
- method: 'get',
- params: query
- })
- }
- // 视频包列表
- export function packList(query) {
- return request({
- url: '/front/videoCourse/pack/list',
- method: 'get',
- params: query
- })
- }
- // 视频列表
- export function videoList(query) {
- return request({
- url: '/front/videoCourse/video/list',
- method: 'get',
- params: query
- })
- }
- // 章节树
- export function getChapterTreeList(query) {
- return request({
- url: '/common/chapter/getChapterTreeList',
- method: 'get',
- params: query
- })
- }
- // 视频详情
- export function videoInfo(query) {
- return request({
- url: '/front/videoCourse/video/info/tree',
- method: 'get',
- params: query
- })
- }
- // 视频详情 7.1
- export function videoInfoTree(query) {
- return request({
- url: '/front/videoCourse/video/info/tree',
- method: 'get',
- params: query
- })
- }
- // 获取视频播放信息
- export function getVideoPlayInfo(query) {
- return request({
- url: '/common/vod/getVideoPlayInfo',
- method: 'get',
- params: query
- })
- }
- // 视频点播
- export function getVideoPlayAuth(query) {
- return request({
- url: '/common/vod/getVideoPlayAuth',
- method: 'get',
- params: query
- })
- }
- // /prod-api/front/videoCourse/listForHomepageLogined
- // 08.2 首页视频列表(已登陆时)
- export function listForHomepageLogined() {
- return request({
- url: '/front/videoCourse/listForHomepageLogined',
- method: 'get',
- params: {
- pageNum: 1,
- pageSize: 4
- }
- })
- }
- // /prod-api/front/videoCourse/saveWatchRecord
- export function saveWatchRecord(sectionId, duration, percent, aliType) {
- if (aliType == 'undefined' || typeof aliType == 'undefined') aliType = '' // 容错处理
- return request({
- url: '/front/videoCourse/saveWatchRecord',
- method: 'post',
- params: {
- sectionId,
- duration: Math.floor(duration),
- percent: percent.toFixed(3),
- type: aliType
- },
- custom: {toast: false} // 保持静默行为,出错时无需让用户知道
- })
- }
- // 老师收藏视频
- export function collectVideoCourse(params) {
- return request({
- url: '/front/videoCourse/video/collectVideoCourse',
- method: 'post',
- params
- })
- }
|