20240517
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
<template>
|
||||
<view class="container commonPageBox">
|
||||
<view
|
||||
class="container commonPageBox"
|
||||
style="background-color: #f5f5f5 !important"
|
||||
>
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<z-nav-bar
|
||||
@@ -8,12 +11,42 @@
|
||||
fontColor="#fff"
|
||||
></z-nav-bar>
|
||||
|
||||
<view class="contentBox commonPageContentBox">
|
||||
<common-list @lower="onReachBottom1" :pagination="pagination" :dataList="dataList" @hancleClick="gotoDetail" label="title">
|
||||
<view
|
||||
class="contentBox commonPageContentBox"
|
||||
:style="`height: calc(100% - ${
|
||||
(50 + statusBarHeight) * 2
|
||||
}rpx) !important;`"
|
||||
>
|
||||
<common-list
|
||||
noDataIcon="data"
|
||||
:isCondition="true" :isLoadingHide="isLoadingHide"
|
||||
@lower="onReachBottom1"
|
||||
:pagination="pagination"
|
||||
:dataList="dataList"
|
||||
@hancleClick="gotoDetail"
|
||||
label="title"
|
||||
>
|
||||
<template slot="labelSlot" slot-scope="slotProps">
|
||||
<image
|
||||
v-if="slotProps.row.image"
|
||||
:src="slotProps.row.image"
|
||||
mode="aspectFil"
|
||||
class="book_image"
|
||||
></image>
|
||||
<image
|
||||
v-else
|
||||
src="@/static/icon/videoIcon.png"
|
||||
mode="aspectFil"
|
||||
class="book_image"
|
||||
></image>
|
||||
<view class="related_courses_name hidden1">{{
|
||||
slotProps.row.title
|
||||
}}</view>
|
||||
|
||||
<!-- <text v-if="slotProps.row.conditions!='03'">【试听】</text> -->
|
||||
</template>
|
||||
</common-list>
|
||||
</view>
|
||||
|
||||
<z-navigation></z-navigation>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -26,14 +59,15 @@ export default {
|
||||
list,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
return { isLoadingHide: false,
|
||||
playData: {},
|
||||
options: {},
|
||||
searchValue: "",
|
||||
pagination: {// 请求参数
|
||||
page: 1,//页码
|
||||
limit: 20,//每页显示
|
||||
total: 0,//总条数
|
||||
pagination: {
|
||||
// 请求参数
|
||||
page: 1, //页码
|
||||
limit: 20, //每页显示
|
||||
total: 0, //总条数
|
||||
},
|
||||
twoCateList: [], // 二级分类标题
|
||||
titleList: [], // 方剂标题
|
||||
@@ -66,13 +100,14 @@ export default {
|
||||
computed: {
|
||||
...mapState(["userInfo"]),
|
||||
},
|
||||
methods: { onReachBottom1() {// 上拉加载
|
||||
methods: {
|
||||
onReachBottom1() {
|
||||
// 上拉加载
|
||||
// 当列表数量不大于或等于总数量,则再次调用接口请求数据
|
||||
if (this.dataList.length >= this.pagination.total) return;
|
||||
this.pagination.page++;
|
||||
this.getData();
|
||||
},
|
||||
|
||||
|
||||
// 检查是有权限使用搜索功能
|
||||
checkDisable() {
|
||||
@@ -109,18 +144,19 @@ export default {
|
||||
console.log(v);
|
||||
uni.navigateTo({
|
||||
// url: '../bookShop/commodityDetail?id=' + item.id
|
||||
url: `/pages/curriculum/order/curriculum/index?navTitle=${v.title}&title=${v.title}&oid=${v.oid}`,
|
||||
url: `/pages/curriculum/order/curriculum/index?navTitle=${v.title}&title=${v.title}&id=${v.id}`,
|
||||
});
|
||||
},
|
||||
|
||||
getData() {
|
||||
this.isLoadingHide=false
|
||||
this.$http
|
||||
.request({
|
||||
url: this.urlList.list,
|
||||
method: "POST",
|
||||
data: {
|
||||
id: Number(this.options.id), //分类id
|
||||
...this.pagination
|
||||
...this.pagination,
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
@@ -129,9 +165,11 @@ export default {
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("res at line 289:", res);
|
||||
this.pagination.total=res.courses.total
|
||||
this.dataList=[...this.dataList,...res.courses.records]
|
||||
|
||||
this.pagination.total = res.courses.total;
|
||||
if( res.courses.total==0){
|
||||
this.isLoadingHide=true
|
||||
}
|
||||
this.dataList = [...this.dataList, ...res.courses.records];
|
||||
});
|
||||
},
|
||||
|
||||
@@ -636,7 +674,29 @@ this.dataList=[...this.dataList,...res.courses.records]
|
||||
.titleList2 {
|
||||
height: calc(100% - 170rpx);
|
||||
}
|
||||
.commonPageContentBox{
|
||||
// min-height: 100% !important;
|
||||
.commonPageContentBox {
|
||||
// min-height: 100% !important;
|
||||
}
|
||||
.related_courses_name {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
line-height: 60rpx;
|
||||
width: calc(100% - 90rpx) !important;
|
||||
padding-left: 20rpx;
|
||||
font-weight: 700;
|
||||
.aui-text-danger {
|
||||
display: inline-block;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
.book_image {
|
||||
width: 80rpx;
|
||||
height: 60rpx;
|
||||
float: left;
|
||||
}
|
||||
/deep/.list_item {
|
||||
.rightArrow {
|
||||
margin-top: 10rpx !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user