提交 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) {
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: 14px;
font-size: 16px;
font-weight: 400;
line-height: 20px;
color: #333333;
......
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' }
})
}
// 收藏/取消收藏
......
......@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论