数据为空占位

This commit is contained in:
zhaofang
2022-11-14 11:33:13 +08:00
parent c7172e7db5
commit eaaa163e14
9 changed files with 143 additions and 106 deletions

View File

@@ -1,7 +1,7 @@
<template>
<!--用于显示课程的图片-->
<view class="img-box" id="img-box">
<image style="background-color: #eeeeee;"
<image style="background-color: #eeeeee"
:class="{'border':border}"
:style="`width:${width};height:${height};`"
mode="aspectFit "

View File

@@ -81,27 +81,29 @@
.course-img{
width: 335upx;
height: 188upx;
// line-height: 0;
border-radius: 16upx;
position: relative;
/deep/ uni-image {
border-radius: 8upx;
}
.img-score{
display: inline-block;
// display: inline-block;
padding: 7upx 15upx;
box-sizing: border-box;
position: absolute;
right:2upx;
bottom: -2upx;
bottom: -4upx;
color: #FFFFFF;
font-size: 28upx;
z-index: 99;
width: 136upx;
// width: 136upx;
height: 44upx;
background: #1767FF;
// background: ;
// background: rgba($color: #1767FF, $alpha: 0.2);
border-radius: 24upx 0px 0px 0px;
border-radius: 24upx 0px 8upx 0px;
backdrop-filter: blur(20px);
}
}

View File

@@ -7,40 +7,51 @@
<view class="ub-tab" @click="ubtab(2)" :class="tab == 2 ? 'ub-tabactive' : ' ' ">我关注的<text></text></view>
</view>
</view>
<view class="follow-list-box" v-show="tab == 1">
<view class="follow-info-list" v-for="(item,idx) in followMe.list">
<view class="img-info">
<author-img :avatar="item.userFollow.authorInfo.avatar" :sex="item.userFollow.authorInfo.sex"></author-img>
</view>
<view class="name-and-sign">
<view class="name-text">{{item.userFollow.authorInfo.name}}</view>
<view class="name-sign">{{item.userFollow.authorInfo.sign}}</view>
</view>
<view class="isFollow-btn">
<view class="is-follow" v-if="item.has" @click="showPopup(item,idx,1)">已关注</view>
<view class="on-follow" v-else @click="toFollow(item,idx)">关注</view>
<view class="follow-list-box" v-show="tab == 1" >
<view v-if="followMe.list.length > 0">
<view class="follow-info-list" v-for="(item,idx) in followMe.list">
<view class="img-info">
<author-img :avatar="item.userFollow.authorInfo.avatar" :sex="item.userFollow.authorInfo.sex"></author-img>
</view>
<view class="name-and-sign">
<view class="name-text">{{item.userFollow.authorInfo.name}}</view>
<view class="name-sign">{{item.userFollow.authorInfo.sign}}</view>
</view>
<view class="isFollow-btn">
<view class="is-follow" v-if="item.has" @click="showPopup(item,idx,1)">关注</view>
<view class="on-follow" v-else @click="toFollow(item,idx)">关注</view>
</view>
</view>
</view>
<u-empty v-else
text="还没有人关注你哦~"
icon="../../static/images/follow-empt.png">
</u-empty>
</view>
<view class="follow-list-box" v-show="tab == 2">
<view class="follow-info-list" v-for="(follow,index) in follow.list">
<view class="img-info">
<author-img :avatar="follow.userFollow.authorInfo.avatar" :sex="follow.userFollow.authorInfo.sex"></author-img>
<!-- <image style="width:80upx;height:80upx" src="../../static/images/woman.png" mode=""></image> -->
</view>
<view class="name-and-sign">
<view class="name-text">{{follow.userFollow.authorInfo.name}}</view>
<view class="name-sign">{{follow.userFollow.authorInfo.sign}}</view>
</view>
<view class="isFollow-btn">
<view class="is-follow" @click="showPopup(follow,index,2)">已关注</view>
<!-- <view class="on-follow" v-else>关注</view> -->
<view v-if="follow.list.length > 0">
<view class="follow-info-list" v-for="(follow,index) in follow.list">
<view class="img-info">
<author-img :avatar="follow.userFollow.authorInfo.avatar" :sex="follow.userFollow.authorInfo.sex"></author-img>
</view>
<view class="name-and-sign">
<view class="name-text">{{follow.userFollow.authorInfo.name}}</view>
<view class="name-sign">{{follow.userFollow.authorInfo.sign}}</view>
</view>
<view class="isFollow-btn">
<view class="is-follow" @click="showPopup(follow,index,2)">已关注</view>
</view>
</view>
</view>
<u-empty v-else
text="您还没有关注人哦~"
icon="../../static/images/follow-empt.png">
</u-empty>
</view>
<view >
<uni-load-more :status="loadStatus"></uni-load-more>
<!-- <uni-load-more :status="loadStatus"></uni-load-more> -->
</view>
<u-popup :show="show">
<view class="cancel-pop">

View File

@@ -78,12 +78,12 @@
</view>
<text class="asset-border"></text>
<view>
<view @click="navigateTo('follow')">
<text>{{ concernme }}</text>
关注我的
</view>
<text class="asset-border"></text>
<view>
<view @click="navigateTo('follow')">
<text>{{ myconcern }}</text>
我的关注
</view>

View File

@@ -14,87 +14,108 @@
</view>
</view>
<view v-if="conType == 1">
<view v-for="(item, idx) in courseList" :key="idx" class="course_box">
<view class="course" @click="toCourseDetail(item)">
<view class="course-info">
<view class="" style="position: relative;">
<course-image :course="item" width="262upx" height="147upx"></course-image>
<view class="coureslabel">
{{ contentTypeFilter(item.contentType).text }}
<view v-if="courseList.length > 0">
<view v-for="(item, idx) in courseList" :key="idx" class="course_box">
<view class="course" @click="toCourseDetail(item)">
<view class="course-info">
<view class="" style="position: relative;">
<course-image :course="item" width="262upx" height="147upx"></course-image>
<view class="coureslabel">
{{ contentTypeFilter(item.contentType).text }}
</view>
</view>
<view class="course-title">
<view class="course-name">
<text style="font-weight: bold; font-size: 32rpx;" v-html="$keywordActiveShow(item.title, query.keyword)"></text>
</view>
<view class="course-content">
<author-info :avatar="item.avatar" :name="item.authorName" :info="item.orgInfo" :sex="item.sex"></author-info>
</view>
</view>
</view>
<view class="course-title">
<view class="course-name">
<text style="font-weight: bold; font-size: 32rpx;" v-html="$keywordActiveShow(item.title, query.keyword)"></text>
</view>
<view class="course-content">
<author-info :avatar="item.avatar" :name="item.authorName" :info="item.orgInfo" :sex="item.sex"></author-info>
</view>
</view>
</view>
</view>
<view class="item-bottom">
<text class="item-time">收藏时间{{ item.time }}</text>
<view class="rowbtn rowbtn-primary">
<image src="../../static/images/icon/favo.png" mode=""></image>取消收藏
</view>
</view>
</view>
</view>
<view v-if="conType == 2">
<view class="article_one" v-for="(item, idx) in articleList" :key="idx">
<view class="articla_tit" @click="toArticleDetail(item)" v-html="$keywordActiveShow(item.title, query.keyword)"></view>
<text class="articla_text" v-html="$keywordActiveShow(item.summary, query.keyword)"></text>
<author-info :avatar="item.avatar" :name="item.sysCreateBy" :info="item.orgInfo" :sex="item.sex"></author-info>
<view class="artical_text_bottom">
<view class="item-bottom">
<text class="item-time">收藏时间{{ item.time }}</text>
<view class="rowbtn rowbtn-primary">
<image src="../../static/images/icon/favo.png" mode=""></image>取消收藏
</view>
</view>
</view>
</view>
<view v-else class="empt-box">
<u-empty
text="你还没有收藏哦~"
icon="../../static/images/favorite-empt.png">
</u-empty>
</view>
</view>
<view v-if="conType == 2">
<view class="" v-if="articleList.length > 0">
<view class="article_one" v-for="(item, idx) in articleList" :key="idx">
<view class="articla_tit" @click="toArticleDetail(item)" v-html="$keywordActiveShow(item.title, query.keyword)"></view>
<text class="articla_text" v-html="$keywordActiveShow(item.summary, query.keyword)"></text>
<author-info :avatar="item.avatar" :name="item.sysCreateBy" :info="item.orgInfo" :sex="item.sex"></author-info>
<view class="artical_text_bottom">
<text class="item-time">收藏时间{{ item.time }}</text>
<view class="rowbtn rowbtn-primary">
<image src="../../static/images/icon/favo.png" mode=""></image>取消收藏
</view>
</view>
</view>
</view>
<view v-else class="empt-box">
<u-empty
text="你还没有收藏哦~"
icon="../../static/images/favorite-empt.png">
</u-empty>
</view>
</view>
<view v-if="conType == 4">
<view v-for="(item, idx) in qaList" :key="idx" class="qa">
<view class="qa-body" @click="toQaDetail(item.question)">
<text v-if="item.question.isResolve" style="color:#08A890">已解决</text>
<text v-else style="color:#387DF7">
待解决
</text>
<text v-html="$keywordActiveShow(item.question.title, query.keyword)"></text>
</view>
<author-info :avatar="item.avatar" :name="item.question.sysCreateBy" :info="item.orgInfo" :sex="item.sex"></author-info>
<view class="qa-bottom" v-html="$keywordActiveShow(item.question.content, query.keyword)"></view>
<view class="qa-answers" v-if="item.question.isResolve">
<view style="
word-break:break-all;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
display: -webkit-box;-webkit-line-clamp: 2;
line-height: 35rpx;
overflow: hidden;text-overflow: ellipsis;
font-size: 28rpx;
">
<text style="color: #FFB30F; " class="answertext" >最佳回答</text> {{ item.question.bestAnswer }}
<view v-if="qaList.length > 0">
<view v-for="(item, idx) in qaList" :key="idx" class="qa">
<view class="qa-body" @click="toQaDetail(item.question)">
<text v-if="item.question.isResolve" style="color:#08A890">已解决</text>
<text v-else style="color:#387DF7">
待解决
</text>
<text v-html="$keywordActiveShow(item.question.title, query.keyword)"></text>
</view>
</view>
<view class="item-bottom">
<text class="item-time">收藏时间{{ item.time }}</text>
<view style="margin-top: 10upx;" class="rowbtn rowbtn-primary">
<image src="../../static/images/icon/favo.png" mode=""></image>取消收藏
<author-info :avatar="item.avatar" :name="item.question.sysCreateBy" :info="item.orgInfo" :sex="item.sex"></author-info>
<view class="qa-bottom" v-html="$keywordActiveShow(item.question.content, query.keyword)"></view>
<view class="qa-answers" v-if="item.question.isResolve">
<view style="
word-break:break-all;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
display: -webkit-box;-webkit-line-clamp: 2;
line-height: 35rpx;
overflow: hidden;text-overflow: ellipsis;
font-size: 28rpx;
">
<text style="color: #FFB30F; " class="answertext" >最佳回答</text> {{ item.question.bestAnswer }}
</view>
</view>
<view class="item-bottom">
<text class="item-time">收藏时间{{ item.time }}</text>
<view style="margin-top: 10upx;" class="rowbtn rowbtn-primary">
<image src="../../static/images/icon/favo.png" mode=""></image>取消收藏
</view>
</view>
</view>
</view>
<view v-else class="empt-box">
<u-empty
text="你还没有收藏哦~"
icon="../../static/images/favorite-empt.png">
</u-empty>
</view>
</view>
<view v-show="count > query.pageSize"><uni-load-more :status="loadStatus"></uni-load-more></view>
<!-- <view v-show="count > query.pageSize"><uni-load-more :status="loadStatus"></uni-load-more></view> -->
</view>
</template>
@@ -392,6 +413,11 @@ export default {
</script>
<style lang="scss" scoped>
.empt-box{
height: 64vh;
background: #fff;
padding-top: 300upx;
}
.coureslabel{
width: 78upx;
height: 32upx;

View File

@@ -106,11 +106,15 @@
</view>
</view>
<view class="empty" v-if="course.list.length==0 && course.loadStatus=='noMore'" >
<u-empty icon="search" text=""></u-empty>
<!-- <u-empty icon="search" text=""></u-empty>
<view class="agreeTip">抱歉暂时没有找到相关内容,</view>
<view class="agreeTip">
是否要去<text class="productAgree" @click="toProductAgree">提个意见</text>
</view>
</view> -->
<u-empty
text="没有查找到相关内容"
icon="../../static/images/seach-empt.png">
</u-empty>
</view>
</view>
<view v-if="course.count>course.params.pageSize">
@@ -748,12 +752,6 @@
}
}
::v-deep .u-search__action{
font-size: 32upx;
color: #387DF7;
font-weight: 500;
}
/deep/ .u-empty__text{
display: none;
font-size: 32upx;
color: #387DF7;
font-weight: 500;

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB