Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-learn
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-learn
Commits
31debec1
提交
31debec1
authored
5月 15, 2024
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 修复本地预览报错的问题
上级
3286ff6c
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
17 行增加
和
21 行删除
+17
-21
CoursePlayerResourceListItem.vue
...odules/course/components/CoursePlayerResourceListItem.vue
+5
-9
CourseViewChapter.vue
src/modules/course/components/CourseViewChapter.vue
+3
-1
CourseViewMaterialListItem.vue
src/modules/course/components/CourseViewMaterialListItem.vue
+4
-7
Index.vue
src/modules/favorites/views/Index.vue
+4
-3
Index.vue
src/modules/preview/views/Index.vue
+1
-1
没有找到文件。
src/modules/course/components/CoursePlayerResourceListItem.vue
浏览文件 @
31debec1
...
@@ -29,7 +29,9 @@ const targetUrl = computed(() => {
...
@@ -29,7 +29,9 @@ const targetUrl = computed(() => {
}
else
if
(
props
.
data
.
resource_type
===
6
)
{
}
else
if
(
props
.
data
.
resource_type
===
6
)
{
return
info
.
join_url
return
info
.
join_url
}
else
{
}
else
{
return
`/preview?course_id=
${
courseId
}
&semester_id=
${
semesterId
}
&resource_id=
${
props
.
data
.
resource_id
}
&resource_type=
${
props
.
data
.
resource_type
}
&url=
${
info
.
url
}
`
return
`/preview?course_id=
${
courseId
}
&semester_id=
${
semesterId
}
&resource_id=
${
props
.
data
.
resource_id
}
&resource_type=
${
props
.
data
.
resource_type
}
&url=
${
encodeURIComponent
(
info
.
url
as
string
)}
`
}
}
})
})
// 是否可以收藏
// 是否可以收藏
...
@@ -95,8 +97,7 @@ function downloadFile(data: CourseResourceType) {
...
@@ -95,8 +97,7 @@ function downloadFile(data: CourseResourceType) {
:to=
"`/course/exam/result?course_id=$
{courseId}
&
semester_id=${semesterId}
&
paper_id=${data.resource_id}
&
type=2
&
paper_title=${data.name}`"
:to=
"`/course/exam/result?course_id=$
{courseId}
&
semester_id=${semesterId}
&
paper_id=${data.resource_id}
&
type=2
&
paper_title=${data.name}`"
target="_blank"
target="_blank"
style="margin: 0 20px"
style="margin: 0 20px"
v-if="data.paper_status === 2 || data.paper_status === 3"
v-if="data.paper_status === 2 || data.paper_status === 3">
>
<el-button
round
size=
"small"
>
查看报告
</el-button>
<el-button
round
size=
"small"
>
查看报告
</el-button>
</router-link>
</router-link>
<template
v-if=
"data.resource_type === 6 && data.info"
>
<template
v-if=
"data.resource_type === 6 && data.info"
>
...
@@ -104,12 +105,7 @@ function downloadFile(data: CourseResourceType) {
...
@@ -104,12 +105,7 @@ function downloadFile(data: CourseResourceType) {
<span
style=
"margin-left: 10px"
>
{{
formatLiveStatus
(
data
.
info
.
status
)
}}
</span>
<span
style=
"margin-left: 10px"
>
{{
formatLiveStatus
(
data
.
info
.
status
)
}}
</span>
</
template
>
</
template
>
<div
class=
"actions"
>
<div
class=
"actions"
>
<i
<i
class=
"icon-star"
:class=
"!!data.collection_count ? 'is-active' : ''"
@
click=
"toggleCollection(data)"
v-if=
"canCollection(data.resource_type)"
></i>
class=
"icon-star"
:class=
"!!data.collection_count ? 'is-active' : ''"
@
click=
"toggleCollection(data)"
v-if=
"canCollection(data.resource_type)"
></i>
<i
class=
"icon-download"
@
click=
"downloadFile(data)"
v-if=
"!!data.can_download"
><Download
/></i>
<i
class=
"icon-download"
@
click=
"downloadFile(data)"
v-if=
"!!data.can_download"
><Download
/></i>
</div>
</div>
</div>
</div>
...
...
src/modules/course/components/CourseViewChapter.vue
浏览文件 @
31debec1
...
@@ -112,7 +112,9 @@ function targetUrl(resource: CourseResourceType, section: CourseSectionType, cha
...
@@ -112,7 +112,9 @@ function targetUrl(resource: CourseResourceType, section: CourseSectionType, cha
}
else
if
(
resource
.
resource_type
===
6
)
{
}
else
if
(
resource
.
resource_type
===
6
)
{
return
resource
.
info
.
join_url
return
resource
.
info
.
join_url
}
else
{
}
else
{
return
`/preview?course_id=
${
courseId
}
&semester_id=
${
semesterId
}
&resource_id=
${
resource
.
resource_id
}
&resource_type=
${
resource
.
resource_type
}
&url=
${
resource
.
info
?.
url
}
`
return
`/preview?course_id=
${
courseId
}
&semester_id=
${
semesterId
}
&resource_id=
${
resource
.
resource_id
}
&resource_type=
${
resource
.
resource_type
}
&url=
${
encodeURIComponent
(
resource
.
info
?.
url
as
string
)}
`
}
}
}
}
...
...
src/modules/course/components/CourseViewMaterialListItem.vue
浏览文件 @
31debec1
...
@@ -28,7 +28,9 @@ const targetUrl = computed(() => {
...
@@ -28,7 +28,9 @@ const targetUrl = computed(() => {
}
else
if
(
props
.
data
.
resource_type
===
6
)
{
}
else
if
(
props
.
data
.
resource_type
===
6
)
{
return
info
.
join_url
return
info
.
join_url
}
else
{
}
else
{
return
`/preview?course_id=
${
courseId
}
&semester_id=
${
semesterId
}
&resource_id=
${
props
.
data
.
resource_id
}
&resource_type=
${
props
.
data
.
resource_type
}
&url=
${
info
.
url
}
`
return
`/preview?course_id=
${
courseId
}
&semester_id=
${
semesterId
}
&resource_id=
${
props
.
data
.
resource_id
}
&resource_type=
${
props
.
data
.
resource_type
}
&url=
${
encodeURIComponent
(
info
.
url
as
string
)}
`
}
}
})
})
// 是否可以收藏
// 是否可以收藏
...
@@ -90,12 +92,7 @@ function downloadFile(data: CourseResourceType) {
...
@@ -90,12 +92,7 @@ function downloadFile(data: CourseResourceType) {
</a>
</a>
</p>
</p>
<div
class=
"actions"
>
<div
class=
"actions"
>
<i
<i
class=
"icon-star"
:class=
"!!data.collection_count ? 'is-active' : ''"
@
click=
"toggleCollection(data)"
v-if=
"canCollection(data.resource_type)"
></i>
class=
"icon-star"
:class=
"!!data.collection_count ? 'is-active' : ''"
@
click=
"toggleCollection(data)"
v-if=
"canCollection(data.resource_type)"
></i>
<i
class=
"icon-download"
@
click=
"downloadFile(data)"
v-if=
"!!data.can_download"
><Download
/></i>
<i
class=
"icon-download"
@
click=
"downloadFile(data)"
v-if=
"!!data.can_download"
><Download
/></i>
</div>
</div>
</div>
</div>
...
...
src/modules/favorites/views/Index.vue
浏览文件 @
31debec1
...
@@ -115,7 +115,9 @@ function genCoursePlayerUrl(item: CollectionType) {
...
@@ -115,7 +115,9 @@ function genCoursePlayerUrl(item: CollectionType) {
}
}
// 文件预览
// 文件预览
function
genPreviewUrl
(
item
:
CollectionType
)
{
function
genPreviewUrl
(
item
:
CollectionType
)
{
return
`/preview?course_id=
${
item
.
course_id
}
&semester_id=
${
item
.
semester_id
}
&resource_id=
${
item
.
info
?.
id
}
&
resource_type
=
$
{
item
.
resource_type
}
&
url
=
$
{
item
.
info
?.
url
}
`
return
`/preview?course_id=
${
item
.
course_id
}
&semester_id=
${
item
.
semester_id
}
&resource_id=
${
item
.
info
?.
id
}
&
resource_type
=
$
{
item
.
resource_type
}
&
url
=
$
{
encodeURIComponent
(
item
.
info
?.
url
as
string
)}
`
}
}
function targetUrl(item: CollectionType) {
function targetUrl(item: CollectionType) {
if (item.type === 5) {
if (item.type === 5) {
...
@@ -155,8 +157,7 @@ function targetUrl2(item: CollectionType) {
...
@@ -155,8 +157,7 @@ function targetUrl2(item: CollectionType) {
</p>
</p>
<p>
<p>
<router-link
:to=
"targetUrl2(item)"
target=
"_blank"
>
<router-link
:to=
"targetUrl2(item)"
target=
"_blank"
>
{{
item
.
course
.
course_alias_name
||
item
.
course
.
name
{{
item
.
course
.
course_alias_name
||
item
.
course
.
name
}}
<template
v-if=
"item.type !== 7"
>
/
{{
item
.
chapter
.
name
}}
</
template
>
}}
<template
v-if=
"item.type !== 7"
>
/
{{
item
.
chapter
.
name
}}
</
template
>
</router-link>
</router-link>
</p>
</p>
<div
class=
"collection-item-aside"
>
<div
class=
"collection-item-aside"
>
...
...
src/modules/preview/views/Index.vue
浏览文件 @
31debec1
...
@@ -6,7 +6,7 @@ const route = useRoute()
...
@@ -6,7 +6,7 @@ const route = useRoute()
const
courseId
=
$ref
(
route
.
query
.
course_id
as
string
)
const
courseId
=
$ref
(
route
.
query
.
course_id
as
string
)
const
resourceId
=
$ref
(
route
.
query
.
resource_id
as
string
)
const
resourceId
=
$ref
(
route
.
query
.
resource_id
as
string
)
const
resourceType
=
$ref
(
route
.
query
.
resource_type
as
string
)
const
resourceType
=
$ref
(
route
.
query
.
resource_type
as
string
)
const
url
=
$ref
(
route
.
query
.
url
as
string
)
const
url
=
$ref
(
decodeURIComponent
(
route
.
query
.
url
as
string
)
)
// 文件扩展名
// 文件扩展名
const
fileExtensionName
=
$computed
(()
=>
{
const
fileExtensionName
=
$computed
(()
=>
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论