提交 33fbfaec authored 作者: 王鹏飞's avatar 王鹏飞

chore: update

上级 53bb1ecb
src/assets/images/course_top_active.png

804 Bytes | W: | H:

src/assets/images/course_top_active.png

806 Bytes | W: | H:

src/assets/images/course_top_active.png
src/assets/images/course_top_active.png
src/assets/images/course_top_active.png
src/assets/images/course_top_active.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -89,12 +89,14 @@ function handleTop(data: CourseListItemType) { ...@@ -89,12 +89,14 @@ function handleTop(data: CourseListItemType) {
border: 1px solid #e6e6e6; border: 1px solid #e6e6e6;
border-radius: 6px; border-radius: 6px;
&.is-top { &.is-top {
background: rgba(247, 248, 250, 0.39); --el-border-color-lighter: #fff;
background: #eaeaea;
} }
&:hover, &:hover,
&.is-active { &.is-active {
--el-border-color-lighter: #fff;
box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.12); box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.12);
background: rgba(247, 248, 250, 1); background: #eaeaea;
} }
} }
.course-item__top { .course-item__top {
...@@ -145,7 +147,7 @@ function handleTop(data: CourseListItemType) { ...@@ -145,7 +147,7 @@ function handleTop(data: CourseListItemType) {
overflow: hidden; overflow: hidden;
h2 { h2 {
height: 60px; height: 60px;
font-size: 14px; font-size: 16px;
font-weight: 400; font-weight: 400;
line-height: 20px; line-height: 20px;
color: #333333; color: #333333;
......
import httpRequest from '@/utils/axios' import httpRequest from '@/utils/axios'
// 获取收藏列表 // 获取收藏列表
export function getCollectionList(params?: { type?: string; course_id?: string; semester_id?: string }) { export function getCollectionList(data?: {
return httpRequest.get('/api/learn/api/v1/collection/list', { params }) 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' }
})
} }
// 收藏/取消收藏 // 收藏/取消收藏
......
...@@ -20,14 +20,19 @@ const tabs = $ref([ ...@@ -20,14 +20,19 @@ const tabs = $ref([
]) ])
// 收藏列表 // 收藏列表
const params = reactive({ const params = reactive<{ type?: string; course_id: string; semester_id: string; types?: string[] }>({
type: '', type: '',
course_id: '', course_id: '',
semester_id: '' semester_id: ''
}) })
let list = $ref<CollectionType[]>([]) let list = $ref<CollectionType[]>([])
function fetchList() { 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) => { list = res.data.items?.map((item: CollectionType) => {
item.status = 1 item.status = 1
return item return item
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论