Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
6de4c428
提交
6de4c428
authored
12月 08, 2020
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
课后作业接口调整
上级
ad729691
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
17 行增加
和
39 行删除
+17
-39
api.js
src/modules/viewer/api.js
+15
-37
chapterTest.vue
src/modules/viewer/components/work/chapterTest.vue
+1
-1
chapterWork.vue
src/modules/viewer/components/work/chapterWork.vue
+1
-1
没有找到文件。
src/modules/viewer/api.js
浏览文件 @
6de4c428
...
@@ -8,9 +8,7 @@ const httpRequest = new BaseAPI(webConf)
...
@@ -8,9 +8,7 @@ const httpRequest = new BaseAPI(webConf)
* @param {string} courseId 课程ID
* @param {string} courseId 课程ID
*/
*/
export
function
getCourse
(
semesterId
,
courseId
)
{
export
function
getCourse
(
semesterId
,
courseId
)
{
return
httpRequest
.
get
(
return
httpRequest
.
get
(
`/api/lms/v2/education/courses/
${
courseId
}
`
)
`/api/lms/v2/education/courses/
${
courseId
}
`
)
}
}
/**
/**
...
@@ -44,10 +42,7 @@ export function getChapterVideoAliyun(vid) {
...
@@ -44,10 +42,7 @@ export function getChapterVideoAliyun(vid) {
* @param {Object} params
* @param {Object} params
*/
*/
export
function
getChapterVideoProgress
(
semesterId
,
resourseId
,
params
)
{
export
function
getChapterVideoProgress
(
semesterId
,
resourseId
,
params
)
{
return
httpRequest
.
get
(
return
httpRequest
.
get
(
`/api/lms/v2/education/video/
${
resourseId
}
/device`
,
params
)
`/api/lms/v2/education/video/
${
resourseId
}
/device`
,
params
)
}
}
/**
/**
...
@@ -64,10 +59,8 @@ export function updateChapterVideoProgress(params) {
...
@@ -64,10 +59,8 @@ export function updateChapterVideoProgress(params) {
* @param {string} courseId 课程ID
* @param {string} courseId 课程ID
* @param {string} resourseId 章节的资源ID
* @param {string} resourseId 章节的资源ID
*/
*/
export
function
getChapterHomework
(
courseId
,
resourseId
)
{
export
function
getChapterHomework
(
courseId
,
chapterId
,
resourseId
)
{
return
httpRequest
.
get
(
return
httpRequest
.
get
(
`/api/lms/v2/education/homeworks/
${
courseId
}
/
${
chapterId
}
/
${
resourseId
}
`
)
`/api/lms/v2/education/homeworks/
${
courseId
}
/
${
resourseId
}
`
)
}
}
/**
/**
...
@@ -77,9 +70,7 @@ export function getChapterHomework(courseId, resourseId) {
...
@@ -77,9 +70,7 @@ export function getChapterHomework(courseId, resourseId) {
* @param {string} chapterId 章节ID
* @param {string} chapterId 章节ID
*/
*/
export
function
getChapterHomeworkDeadline
(
semesterId
,
courseId
,
chapterId
)
{
export
function
getChapterHomeworkDeadline
(
semesterId
,
courseId
,
chapterId
)
{
return
httpRequest
.
get
(
return
httpRequest
.
get
(
`/api/lms/v2/education/homeworks/
${
courseId
}
/
${
chapterId
}
/deadline`
)
`/api/lms/v2/education/homeworks/
${
courseId
}
/
${
chapterId
}
/deadline`
)
}
}
/**
/**
...
@@ -106,9 +97,7 @@ export function uploadFile(data) {
...
@@ -106,9 +97,7 @@ export function uploadFile(data) {
* @param {string} courseId 课程ID
* @param {string} courseId 课程ID
*/
*/
export
function
getCourseWork
(
semesterId
,
courseId
)
{
export
function
getCourseWork
(
semesterId
,
courseId
)
{
return
httpRequest
.
get
(
return
httpRequest
.
get
(
`/api/lms/v2/education/courses/
${
courseId
}
/essay`
)
`/api/lms/v2/education/courses/
${
courseId
}
/essay`
)
}
}
/**
/**
...
@@ -117,11 +106,9 @@ export function getCourseWork(semesterId, courseId) {
...
@@ -117,11 +106,9 @@ export function getCourseWork(semesterId, courseId) {
* @param {string} courseId 课程ID
* @param {string} courseId 课程ID
*/
*/
export
function
updateCourseWork
(
semesterId
,
courseId
,
data
)
{
export
function
updateCourseWork
(
semesterId
,
courseId
,
data
)
{
return
httpRequest
.
post
(
return
httpRequest
.
post
(
`/api/lms/v2/education/courses/
${
courseId
}
/essay`
,
data
,
{
`/api/lms/v2/education/courses/
${
courseId
}
/essay`
,
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
data
,
})
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
}
)
}
}
/**
/**
...
@@ -130,9 +117,7 @@ export function updateCourseWork(semesterId, courseId, data) {
...
@@ -130,9 +117,7 @@ export function updateCourseWork(semesterId, courseId, data) {
* @param {string} courseId 课程ID
* @param {string} courseId 课程ID
*/
*/
export
function
getCourseExam
(
semesterId
,
courseId
)
{
export
function
getCourseExam
(
semesterId
,
courseId
)
{
return
httpRequest
.
get
(
return
httpRequest
.
get
(
`/api/lms/v2/education/
${
courseId
}
/examination`
)
`/api/lms/v2/education/
${
courseId
}
/examination`
)
}
}
/**
/**
...
@@ -142,9 +127,7 @@ export function getCourseExam(semesterId, courseId) {
...
@@ -142,9 +127,7 @@ export function getCourseExam(semesterId, courseId) {
* @param {string} examId 试题ID
* @param {string} examId 试题ID
*/
*/
export
function
getCourseExamStatus
(
semesterId
,
courseId
,
examId
)
{
export
function
getCourseExamStatus
(
semesterId
,
courseId
,
examId
)
{
return
httpRequest
.
get
(
return
httpRequest
.
get
(
`/api/lms/v2/education/
${
courseId
}
/examination/
${
examId
}
/status`
)
`/api/lms/v2/education/
${
courseId
}
/examination/
${
examId
}
/status`
)
}
}
/**
/**
...
@@ -154,11 +137,9 @@ export function getCourseExamStatus(semesterId, courseId, examId) {
...
@@ -154,11 +137,9 @@ export function getCourseExamStatus(semesterId, courseId, examId) {
* @param {string} examId 试题ID
* @param {string} examId 试题ID
*/
*/
export
function
submitCourseExam
(
semesterId
,
courseId
,
examId
,
data
)
{
export
function
submitCourseExam
(
semesterId
,
courseId
,
examId
,
data
)
{
return
httpRequest
.
post
(
return
httpRequest
.
post
(
`/api/lms/v2/education/
${
courseId
}
/examination/
${
examId
}
/sheet`
,
data
,
{
`/api/lms/v2/education/
${
courseId
}
/examination/
${
examId
}
/sheet`
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
data
,
})
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
}
)
}
}
/**
/**
...
@@ -168,8 +149,5 @@ export function submitCourseExam(semesterId, courseId, examId, data) {
...
@@ -168,8 +149,5 @@ export function submitCourseExam(semesterId, courseId, examId, data) {
* @param {string} examId 试题ID
* @param {string} examId 试题ID
*/
*/
export
function
getCourseExamResult
(
semesterId
,
courseId
,
examId
,
params
)
{
export
function
getCourseExamResult
(
semesterId
,
courseId
,
examId
,
params
)
{
return
httpRequest
.
get
(
return
httpRequest
.
get
(
`/api/lms/v2/education/
${
courseId
}
/examination/
${
examId
}
/sheet`
,
params
)
`/api/lms/v2/education/
${
courseId
}
/examination/
${
examId
}
/sheet`
,
params
)
}
}
src/modules/viewer/components/work/chapterTest.vue
浏览文件 @
6de4c428
...
@@ -101,7 +101,7 @@ export default {
...
@@ -101,7 +101,7 @@ export default {
getDetail
()
{
getDetail
()
{
this
.
loading
=
true
this
.
loading
=
true
api
api
.
getChapterHomework
(
this
.
cid
,
this
.
resourceId
)
.
getChapterHomework
(
this
.
cid
,
this
.
pid
,
this
.
resourceId
)
.
then
(
response
=>
{
.
then
(
response
=>
{
this
.
detail
=
Array
.
isArray
(
response
)
?
null
:
response
this
.
detail
=
Array
.
isArray
(
response
)
?
null
:
response
if
(
this
.
detail
)
{
if
(
this
.
detail
)
{
...
...
src/modules/viewer/components/work/chapterWork.vue
浏览文件 @
6de4c428
...
@@ -167,7 +167,7 @@ export default {
...
@@ -167,7 +167,7 @@ export default {
getDetail
()
{
getDetail
()
{
this
.
loading
=
true
this
.
loading
=
true
api
api
.
getChapterHomework
(
this
.
cid
,
this
.
resourceId
)
.
getChapterHomework
(
this
.
cid
,
this
.
pid
,
this
.
resourceId
)
.
then
(
response
=>
{
.
then
(
response
=>
{
this
.
detail
=
Array
.
isArray
(
response
)
?
null
:
response
this
.
detail
=
Array
.
isArray
(
response
)
?
null
:
response
if
(
this
.
detail
)
{
if
(
this
.
detail
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论