Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-learn
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-learn
Commits
33fbfaec
提交
33fbfaec
authored
8月 15, 2022
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: update
上级
53bb1ecb
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
21 行增加
和
7 行删除
+21
-7
course_top_active.png
src/assets/images/course_top_active.png
+0
-0
CourseListItem.vue
src/modules/course/components/CourseListItem.vue
+5
-3
api.ts
src/modules/favorites/api.ts
+9
-2
Index.vue
src/modules/favorites/views/Index.vue
+7
-2
没有找到文件。
src/assets/images/course_top_active.png
查看替换文件 @
53bb1ecb
浏览文件 @
33fbfaec
804 Bytes
|
W:
|
H:
806 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
src/modules/course/components/CourseListItem.vue
浏览文件 @
33fbfaec
...
...
@@ -89,12 +89,14 @@ function handleTop(data: CourseListItemType) {
border
:
1px
solid
#e6e6e6
;
border-radius
:
6px
;
&
.is-top
{
background
:
rgba
(
247
,
248
,
250
,
0
.39
);
--el-border-color-lighter
:
#fff
;
background
:
#eaeaea
;
}
&
:hover
,
&
.is-active
{
--el-border-color-lighter
:
#fff
;
box-shadow
:
0px
3px
10px
rgba
(
0
,
0
,
0
,
0
.12
);
background
:
rgba
(
247
,
248
,
250
,
1
)
;
background
:
#eaeaea
;
}
}
.course-item__top
{
...
...
@@ -145,7 +147,7 @@ function handleTop(data: CourseListItemType) {
overflow
:
hidden
;
h2
{
height
:
60px
;
font-size
:
1
4
px
;
font-size
:
1
6
px
;
font-weight
:
400
;
line-height
:
20px
;
color
:
#333333
;
...
...
src/modules/favorites/api.ts
浏览文件 @
33fbfaec
import
httpRequest
from
'@/utils/axios'
// 获取收藏列表
export
function
getCollectionList
(
params
?:
{
type
?:
string
;
course_id
?:
string
;
semester_id
?:
string
})
{
return
httpRequest
.
get
(
'/api/learn/api/v1/collection/list'
,
{
params
})
export
function
getCollectionList
(
data
?:
{
type
?:
string
course_id
?:
string
semester_id
?:
string
types
?:
string
[]
})
{
return
httpRequest
.
post
(
'/api/learn/api/v1/collection/list'
,
data
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
}
// 收藏/取消收藏
...
...
src/modules/favorites/views/Index.vue
浏览文件 @
33fbfaec
...
...
@@ -20,14 +20,19 @@ const tabs = $ref([
])
// 收藏列表
const
params
=
reactive
({
const
params
=
reactive
<
{
type
?:
string
;
course_id
:
string
;
semester_id
:
string
;
types
?:
string
[]
}
>
({
type
:
''
,
course_id
:
''
,
semester_id
:
''
})
let
list
=
$ref
<
CollectionType
[]
>
([])
function
fetchList
()
{
getCollectionList
(
params
).
then
(
res
=>
{
const
requestParams
=
Object
.
assign
({},
params
)
if
(
requestParams
.
type
===
'1'
)
{
delete
requestParams
.
type
requestParams
.
types
=
[
'1'
,
'7'
]
}
getCollectionList
(
requestParams
).
then
(
res
=>
{
list
=
res
.
data
.
items
?.
map
((
item
:
CollectionType
)
=>
{
item
.
status
=
1
return
item
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论