提交 f7ff4442 authored 作者: 周文彬's avatar 周文彬

优化

上级 baf80211
......@@ -217,7 +217,9 @@
<style>
@import "../mescroll-uni/mescroll-uni.css";
.mescroll-empty{
box-sizing: border-box;
}
/*下拉刷新--上下箭头*/
.mescroll-downwarp .downwarp-arrow{
display: inline-block;
......
......@@ -359,7 +359,7 @@
justify-content: space-around;
box-shadow:0px 8px 11px 0px rgba(255, 49, 163, 0.35);
.readEpub{
width:540upx;
width:65%;
height:76upx;
font-size: 14px;
background:rgb(41,155,255);
......@@ -370,7 +370,7 @@
}
.readbtn{
bottom: 0;
width:280upx;
width:35%;
height:76upx;
font-size: 14px;
padding-bottom: 10rpx;
......
......@@ -83,7 +83,7 @@
year:''
}
},
onShow() {
onLoad() {
this.getSubject()
},
methods: {
......
......@@ -23,8 +23,8 @@
</view>
</view>
<view class="listBox">
<uni-load-more status="loading" v-if="isShowLoad"></uni-load-more>
<mescroll-uni v-else @down="downCallback" @up="upCallback" @init="mescrollInit">
<!-- <uni-load-more status="loading" v-if="isShowLoad"></uni-load-more>
<mescroll-uni v-else @down="downCallback" @up="upCallback" @init="mescrollInit"> -->
<view class="olist">
<view class="list" v-for="(item,index) in booklist" :key="index" @click="toDetails(item)">
<view class="tit">{{item.name}}</view>
......@@ -36,7 +36,12 @@
</view>
</view>
</view>
</mescroll-uni>
<!-- </mescroll-uni> -->
</view>
<view class="bottomLine" v-if="isLast && !isNull">—— 这是我的底线 ——</view>
<view class="nodata_view" v-if="isNull">
<image class="nodata_img" mode="aspectFit" src="../../static/nodata.png"></image>
<text class="nodata_text">抱歉,没有找到相关内容</text>
</view>
</view>
......@@ -44,14 +49,14 @@
<script>
import {getListAPI} from '../../api/index.js';
import MescrollUni from "../../components/mescroll-uni/mescroll-uni.vue";
import uniLoadMore from "../../components/uni-load-more/uni-load-more.vue";
// import MescrollUni from "../../components/mescroll-uni/mescroll-uni.vue";
// import uniLoadMore from "../../components/uni-load-more/uni-load-more.vue";
import { ApiUrl } from '../../env.js'
export default {
components: {
MescrollUni,
uniLoadMore
},
// components: {
// MescrollUni,
// uniLoadMore
// },
data() {
return {
tabList:[
......@@ -66,7 +71,9 @@ export default {
downOption: {
use: false,
auto: false
},
},
isNull: null,
isLast: null,
listQuery:{
type:1,
keywords:'',
......@@ -76,13 +83,16 @@ export default {
}
},
//注册滚动到底部的事件,用于上拉加载
onReachBottom() {
this.mescroll && this.mescroll.onReachBottom();
onReachBottom() {
if (!this.isLast) {//判断是否有下一页
this.listQuery.pageNum += 1
this.getList()
}
},
//注册列表滚动事件,用于下拉刷新
onPageScroll(e) {
this.mescroll && this.mescroll.onPageScroll(e);
},
// onPageScroll(e) {
// this.mescroll && this.mescroll.onPageScroll(e);
// },
onLoad(option) {
this.listQuery.keywords=option.keywords;
//this.getList()
......@@ -114,13 +124,17 @@ export default {
getListAPI(this.listQuery).then( res => {
this.isShowLoad=false
if(res.data.code==0){
this.booklist=res.data.data.list
this.booklist=res.data.data.list
this.isNull = res.data.data.total == 0 ? true : false
this.isLast = !res.data.data.hasNextPage
}else{
this.booklist=[]
this.booklist=[]
this.isNull = true
}
})
},
searchFor(){
searchFor(){
this.listQuery.pageNum = 1
this.getList()
},
mescrollInit(mescroll) {
......@@ -181,7 +195,10 @@ export default {
}
</script>
<style lang="less" scoped>
<style lang="less" scoped>
.mescroll-empty{
box-sizing: border-box;
}
.searchlist_page{
.searchHeader{
padding: 16upx 30upx 10upx 24upx;
......@@ -240,7 +257,8 @@ export default {
.fixedBox{
position: fixed;
top: 0;
z-index: 9999;
z-index: 9999;
width: 100%;
}
.listBox{
margin-top: 184upx;
......@@ -280,7 +298,7 @@ export default {
}
}
.olist{
padding: 41upx 24upx;
padding: 41upx 24upx 0upx;
.list{
border-bottom: 1px solid #EDEDED;
margin-bottom: 40px;
......@@ -326,5 +344,26 @@ export default {
}
}
}
.bottomLine{
width: 100%;
padding-bottom: 40rpx;
text-align: center;
color: #D5D7E0;
font-size: 24rpx;
margin-top: 20rpx;
}
.nodata_view{
text-align: center;
}
.nodata_img{
width: 452rpx;
margin-top: 100rpx;
}
.nodata_view .nodata_text{
display: inline-block;
width: 100%;
margin-top: 54rpx;
font-size: 34rpx;
color: #999999;
}
</style>
......@@ -23,7 +23,7 @@
<image :src="fileUrl(item.img)" mode=""></image>
<image src="../../static/icon_detail_bofang.png" mode=""></image>
</li>
<li class="uploadTimer">
<li class="uploadTimer" :class="item.img && item.resourceType != 5 && item.name.length<32?'lineSize1':'lineSize3'">
<span>{{item.source}}</span>
<span>{{item.uploadTime.substring(0,10)}}</span>
</li>
......@@ -54,7 +54,8 @@
topImg:null,
list:[],
isNull: null,
isLast: null,
isLast: null,
lineSize:false //true代表超过2行,false代表1行或2行
}
},
onLoad(options) {
......@@ -199,7 +200,11 @@
width: 200upx;
height: 134upx;
border-radius: 10upx;
position: relative;
position: relative;
margin-left: 20upx;
image{
border-radius: 10upx;
}
image:nth-of-type(1) {
width: 100%;
height: 100%;
......@@ -218,7 +223,8 @@
dd {
flex: 1;
line-height: 1;
margin-inline-start: 0px;
margin-inline-start: 0px;
position: relative;
ul {
margin-top: -10upx;
padding-inline-start: 0px;
......@@ -250,9 +256,16 @@
right: 0;
margin: auto;
}
}
.lineSize1{
position: absolute;
bottom: 0;
left: 0;
}
.lineSize3{
margin-top: 29upx;
}
.uploadTimer {
margin-top: 29upx;
span {
color: #A8ACB4;
font-size: 24upx;
......
......@@ -12,7 +12,7 @@
<h2>{{obj.name}}</h2>
<text class="source" v-if="obj.adSlogan">来源:{{obj.adSlogan}}</text>
<view class="TimerAndPlayerNum">
<text v-show="obj.uploadTime">发布时间:{{obj.uploadTime.substring(0,10)}}</text>
<text v-if="obj.uploadTime">发布时间:{{obj.uploadTime.substring(0,10)}}</text>
<text>播放次数:{{obj.clickNum}}</text>
</view>
</view>
......
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>中国政协杂志社</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=./static/index.58d5e7ce.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=./static/js/chunk-vendors.cfb20cce.js></script><script src=./static/js/index.358c9d57.js></script></body></html>
\ No newline at end of file
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=./static/index.58d5e7ce.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=./static/js/chunk-vendors.cfb20cce.js></script><script src=./static/js/index.891485d5.js></script></body></html>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论