优化
This commit is contained in:
@@ -8,76 +8,54 @@
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="item">
|
||||
<div class="item-content">
|
||||
<view class="cover">
|
||||
<image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image>
|
||||
<view class="num">第三集</view>
|
||||
</view>
|
||||
<view class="intro-wrap">
|
||||
<view class="name">我在八十年代当后妈</view>
|
||||
<view class="t">言情</view>
|
||||
</view>
|
||||
</div>
|
||||
<view class="cover">
|
||||
<image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image>
|
||||
<view class="num">第三集</view>
|
||||
</view>
|
||||
<view class="intro-wrap">
|
||||
<view class="name">我在八十年代当后妈</view>
|
||||
<view class="t">言情</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<div class="item-content">
|
||||
<view class="cover">
|
||||
<image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image>
|
||||
<view class="num">第三集</view>
|
||||
</view>
|
||||
<view class="intro-wrap">
|
||||
<view class="name">我在八十年代当后妈</view>
|
||||
<view class="t">言情</view>
|
||||
</view>
|
||||
</div>
|
||||
<view class="cover">
|
||||
<image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image>
|
||||
<view class="num">第三集</view>
|
||||
</view>
|
||||
<view class="intro-wrap">
|
||||
<view class="name">我在八十年代当后妈</view>
|
||||
<view class="t">言情</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<div class="item-content">
|
||||
<view class="cover">
|
||||
<image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image>
|
||||
<view class="num">第三集</view>
|
||||
</view>
|
||||
<view class="intro-wrap">
|
||||
<view class="name">我在八十年代当后妈</view>
|
||||
<view class="t">言情</view>
|
||||
</view>
|
||||
</div>
|
||||
<view class="cover">
|
||||
<image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image>
|
||||
<view class="num">第三集</view>
|
||||
</view>
|
||||
<view class="intro-wrap">
|
||||
<view class="name">我在八十年代当后妈</view>
|
||||
<view class="t">言情</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<div class="item-content">
|
||||
<view class="cover">
|
||||
<image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image>
|
||||
<view class="num">第三集</view>
|
||||
</view>
|
||||
<view class="intro-wrap">
|
||||
<view class="name">我在八十年代当后妈</view>
|
||||
<view class="t">言情</view>
|
||||
</view>
|
||||
</div>
|
||||
<view class="cover">
|
||||
<image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image>
|
||||
<view class="num">第三集</view>
|
||||
</view>
|
||||
<view class="intro-wrap">
|
||||
<view class="name">我在八十年代当后妈</view>
|
||||
<view class="t">言情</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<div class="item-content">
|
||||
<view class="cover">
|
||||
<image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image>
|
||||
<view class="num">第三集</view>
|
||||
</view>
|
||||
<view class="intro-wrap">
|
||||
<view class="name">我在八十年代当后妈</view>
|
||||
<view class="t">言情</view>
|
||||
</view>
|
||||
</div>
|
||||
</view>
|
||||
<view class="item">
|
||||
<div class="item-content">
|
||||
<view class="cover">
|
||||
<image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image>
|
||||
<view class="num">第三集</view>
|
||||
</view>
|
||||
<view class="intro-wrap">
|
||||
<view class="name">我在八十年代当后妈</view>
|
||||
<view class="t">言情</view>
|
||||
</view>
|
||||
</div>
|
||||
<view class="cover">
|
||||
<image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image>
|
||||
<view class="num">第三集</view>
|
||||
</view>
|
||||
<view class="intro-wrap">
|
||||
<view class="name">我在八十年代当后妈</view>
|
||||
<view class="t">言情</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -105,20 +83,37 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive } from 'vue';
|
||||
import { selectByUserId } from '@/api/me/me.js';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { onLoad, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app';
|
||||
|
||||
async function selectByUserIdAjax() {
|
||||
try {
|
||||
const res = await selectByUserId();
|
||||
console.log(res);
|
||||
const res1 = await selectByUserId({ page: 1, limit: 6, classify: 3 });
|
||||
const res2 = await selectByUserId({ page: 1, limit: 6, classify: 6 });
|
||||
console.log(res1);
|
||||
console.log(res2);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
|
||||
const data = reactive({
|
||||
list1: [], // 最近观看
|
||||
list2: [] // 我的追剧
|
||||
});
|
||||
|
||||
// 滚动到底部
|
||||
onReachBottom(() => {});
|
||||
|
||||
// 监听下拉结束
|
||||
onPullDownRefresh(() => {
|
||||
selectByUserIdAjax();
|
||||
});
|
||||
|
||||
// 页面初始化
|
||||
onLoad(() => {
|
||||
selectByUserId();
|
||||
selectByUserIdAjax();
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -155,44 +150,43 @@ page {
|
||||
grid-row-gap: 28upx;
|
||||
padding: 0 28upx;
|
||||
.item {
|
||||
.item-content {
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
border-radius: 30upx;
|
||||
.cover {
|
||||
height: 200upx;
|
||||
position: relative;
|
||||
.img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.num {
|
||||
padding: 4upx 16upx;
|
||||
border-radius: 8upx;
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
backdrop-filter: blur(5px);
|
||||
position: absolute;
|
||||
right: 8upx;
|
||||
bottom: 8upx;
|
||||
color: #fff;
|
||||
font-size: 24upx;
|
||||
}
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
border-radius: 20upx;
|
||||
.cover {
|
||||
height: 200upx;
|
||||
position: relative;
|
||||
.img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.intro-wrap {
|
||||
padding: 20upx;
|
||||
.name {
|
||||
width: 180upx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
line-height: 32upx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.t {
|
||||
color: #999;
|
||||
font-size: 24upx;
|
||||
margin-top: 8upx;
|
||||
}
|
||||
.num {
|
||||
padding: 4upx 16upx;
|
||||
border-radius: 8upx;
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
backdrop-filter: blur(5px);
|
||||
position: absolute;
|
||||
right: 8upx;
|
||||
bottom: 8upx;
|
||||
color: #fff;
|
||||
font-size: 24upx;
|
||||
}
|
||||
}
|
||||
.intro-wrap {
|
||||
padding: 20upx;
|
||||
.name {
|
||||
width: 180upx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
line-height: 32upx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.t {
|
||||
color: #999;
|
||||
font-size: 24upx;
|
||||
margin-top: 8upx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user