This commit is contained in:
徐哼唧L
2024-01-31 15:24:52 +08:00
parent c1e414bcab
commit 5ae322d192
17 changed files with 912 additions and 449 deletions

View File

@@ -33,7 +33,7 @@
<view>
<view class="flexbox yigoumaiList">
<view class="info">
<view class="videoBox demo-layout bg-purple" @click="goDetail(item)">
<view class="videoBox demo-layout bg-purple" @click="goDetail(item)">
<image v-if="item.images != '' && item.images != null" :src="item.images"
mode="scaleToFill"></image>
<image v-else src="../../static/icon/wufeng.jpg" mode="scaleToFill"></image>
@@ -71,7 +71,8 @@
<image src="../../static/icon/home2.png" mode="aspectFit"></image>
</view>
<view v-else @click="noOp()">
<image class="gray" src="../../static/icon/home2.png" mode="aspectFit"></image>
<image class="gray" src="../../static/icon/home2.png"
mode="aspectFit"></image>
</view>
<view class="v1"><text> </text></view>
</view>
@@ -142,8 +143,12 @@
status: 3,
bookList: [],
}
},
onShow() {
},
onLoad() {
this.bookList = []
this.getData()
},
@@ -173,11 +178,10 @@
methods: {
// 获取数据列表
getData() {
this.bookList=[]
$http.request({
url: "book/book/getClassicsBookList",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data:{
data: {
'bookType': this.contentShow,
'page': this.page,
'limit': 10
@@ -189,7 +193,9 @@
if (res.code == 0) {
console.log(res, '获取经典查阅书籍')
if (res.page.records.length > 0) {
this.bookList = this.bookList.concat(res.page.records)
for (var i = 0; i < res.page.records.length; i++) {
this.bookList.push(res.page.records[i])
}
this.totalPage = res.page.pages
if (this.page == this.totalPage) {
this.status = 1
@@ -198,9 +204,9 @@
}
}
}
});
},
@@ -264,6 +270,8 @@
// 切换
TabData(e) {
this.contentShow = e
this.page = 1
this.bookList = []
this.getData()
},
@@ -293,10 +301,10 @@
});
},
// 点不过去的
noOp(){
noOp() {
uni.showToast({
title:'该书未开通此功能',
icon:'none'
title: '该书未开通此功能',
icon: 'none'
})
},
},
@@ -512,13 +520,13 @@
}
}
}
.gray {
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
filter: grayscale(100%);
filter: gray;
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
filter: grayscale(100%);
filter: gray;
}
</style>