+ v-for="(item,i) in state.list">
-
![]()
+ :poster="_checkImgUrl(item.video.cover.url_list[0])"
+ :src="item.video.play_addr.url_list[0]"
+ >
+
![]()
+
{{ _duration(item.duration / 1000) }}
- 哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈
+ {{ item.desc }}
-
![]()
-
哈哈哈哈
+
![]()
+
{{ item.author.nickname }}
-
9.2万
+
{{ _formatNumber(item.statistics.digg_count) }}
@@ -49,6 +107,7 @@
display: flex;
flex-direction: column;
gap: 8rem;
+ position: relative;
.poster {
border-radius: 12rem;
@@ -81,12 +140,21 @@
gap: 5rem;
}
+ .duration {
+ color: white;
+ position: absolute;
+ bottom: 80rem;
+ right: 10rem;
+ font-size: 13rem;
+ }
+
.bottom {
color: gray;
.f;
font-size: 13rem;
.l {
+
.f;
.avatar {
@@ -113,6 +181,10 @@
grid-column-end: 3;
margin: 0;
+ .duration {
+ display: none;
+ }
+
.poster {
display: none;
}
diff --git a/src/pages/home/slide/SlideList.vue b/src/pages/home/slide/SlideList.vue
index c56e5d5..1d19473 100644
--- a/src/pages/home/slide/SlideList.vue
+++ b/src/pages/home/slide/SlideList.vue
@@ -54,29 +54,7 @@ const render = useSlideListItemRender({...props.cbs, ...p})
const listRef = ref(null)
const state = reactive({
index: 0,
- list: [
- // {
- // type: 'img',
- // src: `http://douyin.ttentau.top/0.mp4?vframe/jpg/offset/0/w/${document.body.clientWidth}`,
- // author: {
- // unique_id: uniqueId('list_')
- // }
- // },
- // {
- // type: 'user-imgs',
- // src: `http://douyin.ttentau.top/0.mp4?vframe/jpg/offset/0/w/${document.body.clientWidth}`,
- // author: {
- // unique_id: uniqueId('list_')
- // }
- // },
- // {
- // type: 'user',
- // src: `http://douyin.ttentau.top/0.mp4?vframe/jpg/offset/0/w/${document.body.clientWidth}`,
- // author: {
- // unique_id: uniqueId('list_')
- // }
- // },
- ],
+ list: [],
uniqueId: uniqueId('uniqueId_'),
totalSize: 0,
pageSize: 10,
diff --git a/src/utils/index.jsx b/src/utils/index.jsx
index 45f2779..bd48bd1 100644
--- a/src/utils/index.jsx
+++ b/src/utils/index.jsx
@@ -435,7 +435,7 @@ export function $notice(val) {
Utils.$notice(val)
}
-export function $checkImgUrl(url) {
+export function _checkImgUrl(url) {
// console.log(url)
if (!url) return
//本地图片
@@ -448,4 +448,15 @@ export function $checkImgUrl(url) {
} else {
return '/imgs/' + url
}
+}
+
+export function _duration(num){
+ return Utils.$duration(num)
+}
+export function _formatNumber(num) {
+ return Utils.formatNumber(num)
+}
+
+export function _getUserDouyinId(item) {
+ return item.author.unique_id || item.author.short_id
}
\ No newline at end of file