This commit is contained in:
gyq 2025-01-07 10:41:13 +08:00
parent 3b45fd92fc
commit c6df33859c
1 changed files with 23 additions and 12 deletions

View File

@ -6,10 +6,12 @@
<image class="img" :src="item.titleImg" mode="aspectFill"></image> <image class="img" :src="item.titleImg" mode="aspectFill"></image>
</view> </view>
<view class="info"> <view class="info">
<view class="top">
<view class="title"> <view class="title">
{{ item.title }} {{ item.title }}
</view> </view>
<view class="record">看到{{ item.courseDetailsName }}</view> <view class="record">看到{{ item.courseDetailsName }}</view>
</view>
<view class="btm"> <view class="btm">
<view class="num">更新{{ item.courseDetailsCount }}</view> <view class="num">更新{{ item.courseDetailsCount }}</view>
<view class="btn">继续观看</view> <view class="btn">继续观看</view>
@ -17,6 +19,7 @@
</view> </view>
</view> </view>
</view> </view>
<up-divider text="到底了~" v-if="listData.list.length && listData.finish"></up-divider>
</view> </view>
</template> </template>
@ -41,7 +44,8 @@ const typeList = ref([
const listData = reactive({ const listData = reactive({
list: [], list: [],
page: 1, page: 1,
size: 10 size: 10,
finish: false
}); });
// //
@ -55,6 +59,9 @@ async function selectByUserIdAjax() {
console.log(res); console.log(res);
if (res.code === 0) { if (res.code === 0) {
listData.list = res.data.records; listData.list = res.data.records;
if (res.data.currPage >= res.data.totalPage) {
listData.finish = true;
}
} }
} catch (error) { } catch (error) {
console.log(error); console.log(error);
@ -85,7 +92,7 @@ onLoad((e) => {
} }
.list { .list {
.item { .item {
padding: 28upx 0; padding-bottom: 28upx;
display: flex; display: flex;
.cover { .cover {
width: 150upx; width: 150upx;
@ -99,8 +106,11 @@ onLoad((e) => {
} }
} }
.info { .info {
flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between;
.top {
.title { .title {
font-size: 32upx; font-size: 32upx;
font-weight: bold; font-weight: bold;
@ -108,6 +118,7 @@ onLoad((e) => {
.record { .record {
color: $uni-zj-color-primary; color: $uni-zj-color-primary;
} }
}
.btm { .btm {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -116,7 +127,7 @@ onLoad((e) => {
color: #999; color: #999;
} }
.btn { .btn {
padding: 4upx 12upx; padding: 8upx 12upx;
color: #fff; color: #fff;
background: $uni-zj-color-primary; background: $uni-zj-color-primary;
border-radius: 10upx; border-radius: 10upx;