视频测试
This commit is contained in:
parent
e894c20b98
commit
6812f9db1d
|
@ -1,3 +1,4 @@
|
|||
import request from '@/utils/request'
|
||||
// 模拟延迟
|
||||
const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms))
|
||||
|
||||
|
@ -108,7 +109,7 @@ export const videoApi = {
|
|||
keyword?: string
|
||||
}) {
|
||||
const res = await request.get('/videos', { params })
|
||||
return res.data
|
||||
return res
|
||||
},
|
||||
|
||||
// 获取视频详情
|
||||
|
|
|
@ -220,8 +220,10 @@ const getVideoList = async () => {
|
|||
pageSize: pageSize.value,
|
||||
keyword: searchKeyword.value
|
||||
})
|
||||
videoList.value = res.records
|
||||
total.value = res.total
|
||||
console.log(res)
|
||||
//{records: Array(1), total: 0, size: 12, current: 1, pages: 0}
|
||||
videoList.value = res
|
||||
// total.value = res.total
|
||||
} catch (error) {
|
||||
console.error('Failed to load videos:', error)
|
||||
ElMessage.error('加载视频列表失败')
|
||||
|
|
Loading…
Reference in New Issue