我的分享

This commit is contained in:
lmj
2022-11-09 14:28:10 +08:00
parent 7edbcfa743
commit ccc6d51b2d
2 changed files with 109 additions and 151 deletions

View File

@@ -8,14 +8,13 @@
<view class="top-bar-tab" @click="clicktab(4)" :class="{ active: conType == 4 }">问答</view>
</view>
</view>
<view class="top-content-options">
<!-- <view class="top-content-options"> -->
<!-- 是否已查看 -->
<view style="margin-right: 20upx;">
<!-- <u-picker :show="statusSelectShow" @cancel="statusSelectShow = false" @confirm="chooseStatus" :columns="selectData" keyName="label"></u-picker> -->
<!-- <view style="margin-right: 20upx;">
<text class="textbtn" @click="statusSelectShow = !statusSelectShow">状态</text>
</view>
</view> -->
<!--课程-->
<view class="input-search">
<!-- <view class="input-search">
<u-search
v-model="query.keyword"
placeholder="标题搜索"
@@ -26,171 +25,96 @@
shape="square"
bgColor="#ffffff"
>
<!-- <template slot="suffix">
<u-icon @click="findData(true)" name="search"></u-icon>
</template> -->
</u-search>
</view>
</view>
<view class="sea-show" v-show="statusSelectShow">
</view> -->
<!-- </view> -->
<!-- <view class="sea-show" v-show="statusSelectShow">
<text @click="chooseStatus(null)" :class="[isRead == null?'sea-active':'','sea-index' ]">全部</text>
<text @click="chooseStatus(true)" :class="[isRead == true?'sea-active':'','sea-index' ]">已查看</text>
<text @click="chooseStatus(false)" :class="[isRead == false?'sea-active':'','sea-index' ]">未查看</text>
</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-img"><course-image :course="item" width="262upx" height="147upx"></course-image></view>
<view class="course-img" style="position: relative;" >
<course-image :course="item" width="256upx" height="150upx"></course-image>
<view class="coureslabel">
{{ contentTypeFilter(item.contentType).text }}
</view>
</view>
<view class="course-content">
<view class="coursetit-sl"><span class="common" :class="contentTypeFilter(item.contentType).class">{{ contentTypeFilter(item.contentType).text }}</span><span style="font-weight: bold; margin-top: 10rpx;" v-html="$keywordActiveShow(item.title,query.keyword)"></span></view>
<view class="course-con_source">分享日期{{ item.time }}</view>
<view class="course-author">
我分享给{{ item.toAname }}
<!-- <view class="coursetit-sl"> -->
<text style="height: 100upx;margin-top: 6upx;" v-html="$keywordActiveShow(item.title,query.keyword)"></text>
<!-- <span class="common" :class="contentTypeFilter(item.contentType).class">{{ contentTypeFilter(item.contentType).text }}</span><span style="font-weight: bold; margin-top: 10rpx;" v-html="$keywordActiveShow(item.title,query.keyword)"></span></view> -->
<!-- <view class="course-con_source">分享日期{{ item.time }}</view> -->
<view class="coures-bottom">
<view class="course-author" style="margin-right: 50upx;">分享给{{ item.toAname }}</view>
<view class="withdraw" v-if="!item.isRead" @click="withdraw(item)">
<image src="../../static/images/icon/withdrawnew.png" mode=""></image>撤回
</view>
<view v-if="!item.isRead" class="Viewed">
已查看
</view>
<view v-else class="notViewed">
未查看
</view>
</view>
</view>
</view>
<view class="rowbtn-right">
<view class="rowbtn rowbtn-info" v-if="!item.isRead">
<!-- ../../static/images/icon/noread.png -->
<u-icon name="eye-off" color="#767676" labelColor="#767676" label="未查看" size="16" labelSize="12"></u-icon>
</view>
<view class="rowbtn rowbtn-info" v-else>
<!-- ../../static/images/icon/isread.png -->
<u-icon name="eye-fill" color="#767676" labelColor="#767676" label="已查看" size="16" labelSize="12"></u-icon>
</view>
<view class="rowbtn rowbtn-primary" v-if="!item.isRead" @click="withdraw(item)">
<!-- ../../static/images/icon/withdraw.png -->
<u-icon name="reload" color="#3E7FFF" labelColor="#3E7FFF" label="撤回" size="16" labelSize="12"></u-icon>
</view>
</view>
<!-- <text class="isread" v-if="!item.isRead"> -->
<!-- <image style="height: 26rpx;" src="../../static/images/icon/noread.png" mode=""></image>
未查看</text> -->
<!-- </text> -->
<!-- <text class="isread" v-else>
<image style="margin-top: -5rpx;" src="../../static/images/icon/isread.png" mode=""></image>
已查看</text> -->
<!-- <text class="with" @click="withdraw(item)" v-if="!item.isRead" >
<image style="margin-left: 15rpx;" src="../../static/images/icon/withdraw.png" mode=""></image>
撤回</text> -->
<!-- <view><interact-bar :data="item" :shares="false" :views="false"></interact-bar></view> -->
</view>
</view>
<view v-if="conType == 2">
<view class="article_one" v-for="(item, idx) in articleList" :key="idx" >
<view>
<!-- <view class="art_type">
<text v-if="item.isRead">
[已查看]
</text>
<text v-else>
[未查看]
</text>
</view> -->
<view @click="toArticleDetail(item)" class="articla_tit" >
<text v-if="item.isRead" style="color:#3e7fff">[已查看]</text>
<text v-else style="color:#FF3E3E">[未查看]</text>
<text v-html="$keywordActiveShow(item.title,query.keyword)"></text>
</view>
<text class="articla_text" @click="toArticleDetail(item)" v-html="$keywordActiveShow(item.summary,query.keyword)"></text>
<author-info :avatar="item.avatar" :name="item.sysCreateBy" :info="item.orgInfo" :sex="item.sex"></author-info>
<!-- <author-info :avatar="item.avatar" :name="item.sysCreateBy" :info="item.orgInfo" :sex="item.sex"></author-info> -->
<view class="artical_text_bottom">
<view class="" style="margin-top: 18upx;">
<text style="font-size: 26rpx;color: #9d9d9d;">{{item.time}}</text>
<text style="font-size: 26rpx;color: #666666;margin-right: 35upx;">我分享给{{item.toAname}}</text>
<view class="" style="margin-top: 10upx;">
<text style="font-size: 24upx;color: #999;margin-right: 35upx;">分享给{{item.toAname}}</text>
</view>
<view class="rowbtn-right">
<view class="rowbtn rowbtn-primary" v-if="!item.isRead" @click="withdraw(item)">
<!-- ../../static/images/icon/withdraw.png -->
<u-icon name="reload" color="#3E7FFF" labelColor="#3E7FFF" label="撤回" size="16" labelSize="12"></u-icon>
<view class="withdraw" v-if="!item.isRead" @click="withdraw(item)">
<image src="../../static/images/icon/withdrawnew.png" mode=""></image>撤回
</view>
<view v-if="!item.isRead" class="Viewed">
已查看
</view>
<view v-else class="notViewed">
未查看
</view>
</view>
</view>
<!-- <view style="margin-top: 8px;"><interact-bar :data="item" :shares="false"></interact-bar></view> -->
<!-- <text class="isread" v-if="item.isRead">
<image style="height: 26rpx;" src="../../static/images/icon/noread.png" mode=""></image>
未查看</text>
<text class="isread" v-else>
<image style="margin-top: -5rpx;" src="../../static/images/icon/isread.png" mode=""></image>
已查看</text> -->
<!-- <text class="with" @click="withdraw(item)" v-if="!item.isRead">
<image style="margin-left: 15rpx;" src="../../static/images/icon/withdraw.png" mode=""></image>
撤回</text> -->
</view>
</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:#588afc">
[待解决]
</text>
<text v-html="$keywordActiveShow(item.question.title,query.keyword)"></text>
</view>
<view class="qa-bottom" @click="toQaDetail(item.question)" v-html="$keywordActiveShow(item.question.content,query.keyword)"></view>
<author-info :avatar="item.avatar" :name="item.question.sysCreateBy" :info="item.orgInfo" :sex="item.sex"></author-info>
<view class="qa-answers" style=" " v-if="item.question.isResolve">
<!-- <text></text> -->
<!-- <view class="answer-one">
</view> -->
<view class="answer-two" @click="toQaDetail(item.question)" 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: 32rpx;
">
<text style="color: #FFB30F;">最佳回答:</text>{{ item.question.bestAnswer }}
</view>
<!-- <text class="answers_text"></text> -->
</view>
<text @click="toQaDetail(item.question)" class="qa-text">{{item.time}}</text>
<text style="font-size: 26rpx;color: #666666" @click="toQaDetail(item.question)">我分享给{{item.toAname}}</text>
<!-- <view class="qa-bar"><interact-bar :data="item.question" :praises="false" :views="false"></interact-bar></view> -->
<!-- <view class="">
<text class="isread" v-if="item.isRead">
<image style="height: 26rpx;" src="../../static/images/icon/noread.png" mode=""></image>
已查看</text>
<text class="isread" v-else>
<image style="margin-top: -5rpx;" src="../../static/images/icon/isread.png" mode=""></image>
未查看</text>
<text class="with" @click="withdraw(item)" v-if="!item.isRead">
<image style="margin-left: 15rpx;" src="../../static/images/icon/withdraw.png" mode=""></image>
撤回</text>
</view> -->
<view class="rowbtn-right">
<view class="rowbtn rowbtn-info" v-if="item.isRead">
<u-icon name="eye-off" color="#767676" labelColor="#767676" label="已查看" size="16" labelSize="12"></u-icon>
<view class="qa-bottombox">
<view class="qa-bottom-left">
<text style="font-size: 24upx;color: #999;margin-top: 10upx;" @click="toQaDetail(item.question)">分享给{{item.toAname}}</text>
</view>
<view class="rowbtn rowbtn-info" v-else>
<u-icon name="eye-fill" color="#767676" labelColor="#767676" label="未查看" size="16" labelSize="12"></u-icon>
</view>
<view class="rowbtn rowbtn-primary" v-if="!item.isRead" @click="withdraw(item)">
<u-icon name="reload" color="#3E7FFF" labelColor="#3E7FFF" label="撤回" size="16" labelSize="12"></u-icon>
<view class="rowbtn-right" style="margin-left: auto;">
<view class="withdraw" v-if="!item.isRead" @click="withdraw(item)">
<image src="../../static/images/icon/withdrawnew.png" mode=""></image>撤回
</view>
<view v-if="!item.isRead" class="Viewed">
已查看
</view>
<view v-else class="notViewed">
未查看
</view>
</view>
</view>
</view>
</view>
<view v-show="count>query.pageSize"><uni-load-more :status="loadStatus"></uni-load-more></view>
</view>
@@ -493,22 +417,67 @@ export default {
</script>
<style lang="scss" scoped>
.qa-bottombox{
display: flex;
}
.coureslabel{
width: 78upx;
height: 32upx;
background: #2C2C2C;
color: #FFFFFF;
text-align: center;
line-height: 32upx;
font-weight: normal;
font-size: 20upx;
border-radius: 6upx;
opacity: 0.52;
position: absolute;
right: 12upx;
top: 104upx;
}
.withdraw{
font-size: 24upx;
color: #666666;
line-height: 38upx;
margin-right: 46upx;
image{
width: 28upx;
height: 28upx;
vertical-align: middle;
}
}
.Viewed{
font-size: 24upx;
color: #999999;
line-height: 38upx;
}
.notViewed{
font-size: 24upx;
color: #FD3F1A;
line-height: 38upx;
}
.coures-bottom{
display: flex;
}
.course-author {
font-size: 26upx;
color: #666;
}
.rowbtn-right{
margin-top: 10upx;
display: flex;
justify-content: flex-end;
}
.rowbtn{
padding: 5px 8px 0px 8px;
height: 20px;
// padding: 5px 8px 0px 8px;
// height: 20px;
border-radius: 10upx;
margin-left: 20upx;
}
.rowbtn-primary{
background-color: #ebf3fe;
// background-color: #ebf3fe;
}
.rowbtn-info{
background-color: #f7f7f7;
// background-color: #f7f7f7;
}
.sea-show{
padding: 20rpx;
@@ -692,32 +661,24 @@ export default {
// }
}
.course_box {
// margin-bottom: 10px;
margin-top: 14upx;
background-color: #ffffff;
padding: 19upx 40upx;
padding: 40upx 32upx;
.course {
display: flex;
justify-content: flex-start;
/deep/ .course-img {
display: flex;
justify-content: space-around;
width: 120px;
height: 70px;
margin-right: 20upx;
margin-top: 9rpx;
margin-left: 10rpx;
margin-bottom: 20rpx;
uni-image{
border-radius:8px;
border-radius:8upx;
}
}
.course-content {
display: flex;
flex-direction: column;
justify-content: space-between;
margin-left: 10upx;
.course-con_source{
font-size: 28upx;
@@ -725,10 +686,7 @@ export default {
margin-top: 10rpx;
padding-bottom: 10rpx;
}
.course-author {
font-size: 26upx;
color: #666;
}
.common{
padding: 4upx 15upx;
border-radius: 2px;
@@ -783,7 +741,7 @@ export default {
// padding-top: 10px;
margin-top: 20rpx;
background-color: #fff;
padding: 19upx 38upx;
padding: 36upx 36upx;
.answers_text {
// font-size: 14px;
// color: #797979;
@@ -809,7 +767,7 @@ export default {
.qa {
// margin-top: 19rpx;
// padding: 10px;
padding: 19upx 39upx;
padding: 36upx 36upx;
box-shadow: #f7f7f7 0px 6px 5px;
border-radius: 4px;
background: #ffffff;

Binary file not shown.

After

Width:  |  Height:  |  Size: 968 B