mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-08 18:36:47 +08:00
分享给我的
This commit is contained in:
@@ -75,6 +75,16 @@ const myqalist=function(query){
|
|||||||
const myarticlelist=function(query){
|
const myarticlelist=function(query){
|
||||||
return ajax.post('/xboe/m/share/myArticleList',query);
|
return ajax.post('/xboe/m/share/myArticleList',query);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 分享给我的全部
|
||||||
|
* @param pageIndex 第几页
|
||||||
|
* @param pageSize 每页多少行
|
||||||
|
* @param keyword 关键字搜索
|
||||||
|
* @param isRead 是否已读
|
||||||
|
* */
|
||||||
|
const findShareMe=function (query){
|
||||||
|
return ajax.post('/xboe/m/share/findShareMe',query);
|
||||||
|
}
|
||||||
/*分页查询 我分享的课程信息
|
/*分页查询 我分享的课程信息
|
||||||
@param {Object} query
|
@param {Object} query
|
||||||
@param type 查询的条件,暂时未确定
|
@param type 查询的条件,暂时未确定
|
||||||
@@ -144,6 +154,7 @@ const updateIsRead=function(id){
|
|||||||
mymecourselist,
|
mymecourselist,
|
||||||
mymearticlelist,
|
mymearticlelist,
|
||||||
deleteshares,
|
deleteshares,
|
||||||
|
findShareMe,
|
||||||
findMeShare,
|
findMeShare,
|
||||||
updateIsRead
|
updateIsRead
|
||||||
}
|
}
|
||||||
@@ -1,13 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<page-title :showBack="true">我的分享</page-title>
|
<page-title :showBack="true">我的分享</page-title>
|
||||||
<!-- <view class="top-tab">
|
|
||||||
<view class="top-bar-center">
|
|
||||||
<view class="top-bar-tab" @click="clicktab(1)" :class="{ active: conType == 1 }">课程</view>
|
|
||||||
<view class="top-bar-tab" @click="clicktab(2)" :class="{ active: conType == 2 }">文章</view>
|
|
||||||
<view class="top-bar-tab" @click="clicktab(4)" :class="{ active: conType == 4 }">问答</view>
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
<view v-for="(item,index) in dataList.list" :key="index">
|
<view v-for="(item,index) in dataList.list" :key="index">
|
||||||
<view v-if="item.type == 1">
|
<view v-if="item.type == 1">
|
||||||
<view class="course_box">
|
<view class="course_box">
|
||||||
@@ -18,14 +11,13 @@
|
|||||||
{{ contentTypeFilter(item.contentType).text }}
|
{{ contentTypeFilter(item.contentType).text }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="course-content">
|
<view class="course-content">
|
||||||
<text style="height: 100upx;margin-top: 6upx;" v-html="$keywordActiveShow(item.title,query.keyword)"></text>
|
<text style="height: 100upx;margin-top: 6upx;" v-html="$keywordActiveShow(item.title,query.keyword)"></text>
|
||||||
<view class="coures-bottom">
|
<view class="coures-bottom">
|
||||||
<view class="course-author" style="margin-right: 50upx;">分享给{{ item.toAname }}</view>
|
<view class="course-author" style="margin-right: 50upx;">分享给{{ item.toAname }}</view>
|
||||||
<view class="withdraw" v-if="!item.isRead" @click="withdraw(item)">
|
<view class="withdraw" v-if="!item.isRead" @click="withdraw(item)">
|
||||||
<image src="../../static/images/icon/withdrawnew.png" mode=""></image>撤回
|
<image src="../../static/images/icon/withdrawnew.png" mode=""></image>撤回
|
||||||
</view>
|
</view>
|
||||||
<view v-if="item.isRead" class="Viewed">
|
<view v-if="item.isRead" class="Viewed">
|
||||||
已查看
|
已查看
|
||||||
</view>
|
</view>
|
||||||
@@ -40,13 +32,13 @@
|
|||||||
<view v-if="item.type == 2">
|
<view v-if="item.type == 2">
|
||||||
<view class="article_one" >
|
<view class="article_one" >
|
||||||
<view>
|
<view>
|
||||||
<view @click="toArticleDetail(item)" class="articla_tit" >
|
<view @click="toArticleDetail(item)" class="articla_tit" >
|
||||||
<text v-html="$keywordActiveShow(item.title,query.keyword)"></text>
|
<text v-html="$keywordActiveShow(item.title,query.keyword)"></text>
|
||||||
</view>
|
</view>
|
||||||
<text class="articla_text" @click="toArticleDetail(item)" v-html="$keywordActiveShow(item.summary,query.keyword)"></text>
|
<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="artical_text_bottom">
|
||||||
<view class="" style="margin-top: 10upx;">
|
<view style="margin-top: 10upx;">
|
||||||
<text style="font-size: 24upx;color: #999;margin-right: 35upx;">分享给{{item.toAname}}</text>
|
<text style="font-size: 24upx;color: #999;margin-right: 35upx;">分享给{{item.toAname}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="rowbtn-right">
|
<view class="rowbtn-right">
|
||||||
@@ -111,14 +103,6 @@ export default {
|
|||||||
},
|
},
|
||||||
isRead:null,
|
isRead:null,
|
||||||
statusBtn: '全部',
|
statusBtn: '全部',
|
||||||
selectData: [
|
|
||||||
[
|
|
||||||
{ label: '全部', value: null },
|
|
||||||
{ label: '已查看', value: true },
|
|
||||||
{ label: '未查看', value: false },
|
|
||||||
|
|
||||||
]
|
|
||||||
],
|
|
||||||
statusSelectShow: false,
|
statusSelectShow: false,
|
||||||
conType: 1,
|
conType: 1,
|
||||||
query:{
|
query:{
|
||||||
@@ -151,6 +135,38 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
contentTypeFilter(value) {
|
||||||
|
let lmj = String(value)
|
||||||
|
let obj = {};
|
||||||
|
switch (lmj) {
|
||||||
|
case '10': {
|
||||||
|
obj.class = 'uc-course-type2';
|
||||||
|
obj.text = '录播';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case '21': {
|
||||||
|
obj.class = 'uc-course-type2';
|
||||||
|
obj.text = '直播';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case '20': {
|
||||||
|
obj.class = 'uc-course-type2';
|
||||||
|
obj.text = '录播';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case '30': {
|
||||||
|
obj.class = 'uc-course-type2';
|
||||||
|
obj.text = '面授';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case '90': {
|
||||||
|
obj.class = 'uc-course-type2';
|
||||||
|
obj.text = '混合';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
},
|
||||||
//点击切换类别时请求数据
|
//点击切换类别时请求数据
|
||||||
clicktab(val) {
|
clicktab(val) {
|
||||||
this.conType=val;
|
this.conType=val;
|
||||||
@@ -170,7 +186,6 @@ export default {
|
|||||||
apiShares.findMeShare(this.query).then(rs => {
|
apiShares.findMeShare(this.query).then(rs => {
|
||||||
if (rs.status == 200) {
|
if (rs.status == 200) {
|
||||||
this.count=rs.result.count
|
this.count=rs.result.count
|
||||||
console.log(rs);
|
|
||||||
rs.result.list.forEach(item => {
|
rs.result.list.forEach(item => {
|
||||||
if(item.type == 4) {
|
if(item.type == 4) {
|
||||||
item.question = {isResolve:false,title:'',content:'',bestAnswer:''};
|
item.question = {isResolve:false,title:'',content:'',bestAnswer:''};
|
||||||
@@ -217,19 +232,7 @@ export default {
|
|||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
this.findData(true);
|
this.findData(true);
|
||||||
},1000)
|
},1000)
|
||||||
// console.log('撤回成功')
|
|
||||||
// setTimeout(function() {
|
|
||||||
// uni.showToast()
|
|
||||||
// }, 1000);
|
|
||||||
// if (this.conType == 1) {
|
|
||||||
// this.findData(true);
|
|
||||||
// }
|
|
||||||
// if (this.conType == 2) {
|
|
||||||
// this.findData(true);
|
|
||||||
// }
|
|
||||||
// if (this.conType == 4) {
|
|
||||||
// this.findData(true);
|
|
||||||
// }
|
|
||||||
}else{
|
}else{
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon:'none',
|
icon:'none',
|
||||||
@@ -310,37 +313,7 @@ export default {
|
|||||||
this.findData(true);
|
this.findData(true);
|
||||||
|
|
||||||
},
|
},
|
||||||
contentTypeFilter(value) {
|
|
||||||
let obj = {};
|
|
||||||
switch (value) {
|
|
||||||
case '10': {
|
|
||||||
obj.class = 'uc-course-type2';
|
|
||||||
obj.text = '录播';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case '21': {
|
|
||||||
obj.class = 'uc-course-type2';
|
|
||||||
obj.text = '直播';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case '20': {
|
|
||||||
obj.class = 'uc-course-type2';
|
|
||||||
obj.text = '录播';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case '30': {
|
|
||||||
obj.class = 'uc-course-type2';
|
|
||||||
obj.text = '面授';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case '90': {
|
|
||||||
obj.class = 'uc-course-type2';
|
|
||||||
obj.text = '混合';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return obj;
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -398,8 +371,7 @@ export default {
|
|||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
.rowbtn{
|
.rowbtn{
|
||||||
// padding: 5px 8px 0px 8px;
|
|
||||||
// height: 20px;
|
|
||||||
border-radius: 10upx;
|
border-radius: 10upx;
|
||||||
}
|
}
|
||||||
.rowbtn-primary{
|
.rowbtn-primary{
|
||||||
@@ -606,6 +578,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.course-content {
|
.course-content {
|
||||||
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin-left: 10upx;
|
margin-left: 10upx;
|
||||||
@@ -652,13 +625,13 @@ export default {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-overflow:ellipsis;
|
text-overflow:ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
font-size: 30rpx;
|
font-size: 36rpx;
|
||||||
// float: left;
|
color: #333;
|
||||||
}
|
}
|
||||||
.articla_text {
|
.articla_text {
|
||||||
word-break:break-all;
|
word-break:break-all;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #454545;
|
color: #666;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
@@ -1,160 +1,78 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<page-title :showBack="true">分享给我的</page-title>
|
<page-title :showBack="true">分享给我的</page-title>
|
||||||
<view class="top-tab">
|
<view v-for="(item,index) in dataList.list" :key="index">
|
||||||
<view class="top-bar-center">
|
<view v-if="item.type == 1">
|
||||||
<view class="top-bar-tab" @click="clicktab(1)" :class="{ active: conType == 1 }">课程</view>
|
<view class="course_box">
|
||||||
<view class="top-bar-tab" @click="clicktab(2)" :class="{ active: conType == 2 }">文章</view>
|
|
||||||
<view class="top-bar-tab" @click="clicktab(4)" :class="{ active: conType == 4 }">问答</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<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> -->
|
|
||||||
<!-- <text class="textbtn" @click="statusSelectShow = true">{{ statusBtn }}</text> -->
|
|
||||||
<text class="textbtn" @click="statusSelectShow = !statusSelectShow">状态</text>
|
|
||||||
</view>
|
|
||||||
<!--课程-->
|
|
||||||
<view class="input-search">
|
|
||||||
<u-search
|
|
||||||
|
|
||||||
:clearabled="true"
|
|
||||||
v-model="query.keyword"
|
|
||||||
placeholder="输入关键词"
|
|
||||||
@search="findData(true)"
|
|
||||||
@clear="findData(true)"
|
|
||||||
:showAction="false"
|
|
||||||
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">
|
|
||||||
<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 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" @click="toCourseDetail(item)">
|
||||||
<view><course-image :course="item" width="262upx" height="147upx"></course-image></view>
|
<view class="course-img" 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-content">
|
<view class="course-content">
|
||||||
<view><span class="common" :class="contentTypeFilter(item.contentType).class">{{ contentTypeFilter(item.contentType).text }}</span><span style="font-weight: bold;font-size: 32upx;" v-html="$keywordActiveShow(item.title,query.keyword)"></span></view>
|
<text style="height: 100upx;margin-top: 6upx;" v-html="$keywordActiveShow(item.title,query.keyword)"></text>
|
||||||
<view class="course-con_source">分享日期:{{ item.time }}</view>
|
<view class="coures-bottom">
|
||||||
<view class="course-author">
|
<view class="course-author" >{{ item.authorName }}分享给我</view>
|
||||||
{{ item.authorName }}分享给我
|
<view style="margin-left: auto;display: flex;">
|
||||||
|
<view v-if="item.isRead" class="Viewed" >
|
||||||
|
已查看
|
||||||
|
</view>
|
||||||
|
<view v-else class="notViewed" >
|
||||||
|
未查看
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view><interact-bar :data="item" :shares="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>
|
|
||||||
</view> -->
|
|
||||||
<view class="rowbtn-right">
|
|
||||||
<view class="rowbtn rowbtn-info" v-if="item.isRead">
|
|
||||||
<u-icon name="eye-fill" color="#767676" labelColor="#767676" label="已查看" size="16" labelSize="12"></u-icon>
|
|
||||||
</view>
|
|
||||||
<view class="rowbtn rowbtn-info" v-else>
|
|
||||||
<u-icon name="eye-off" color="#767676" labelColor="#767676" label="未查看" size="16" labelSize="12"></u-icon>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view v-if="conType == 2">
|
<view v-if="item.type == 2">
|
||||||
<view class="article_one" v-for="(item, idx) in articleList" :key="idx" @click="toArticleDetail(item)">
|
<view class="article_one" @click="toArticleDetail(item)">
|
||||||
|
<view class="articla_tit">{{ $keywordActiveShow(item.title,query.keyword) }}</view>
|
||||||
<view class="articla_tit">
|
|
||||||
<text v-if="item.isRead" style="color:#3e7fff;margin-right: 8upx">
|
|
||||||
[已查看]
|
|
||||||
</text>
|
|
||||||
<text v-else style="color:#FF3E3E;margin-right: 8upx">
|
|
||||||
[未查看]
|
|
||||||
</text>
|
|
||||||
{{ $keywordActiveShow(item.title,query.keyword) }}
|
|
||||||
</view>
|
|
||||||
<text class="articla_text" v-html="$keywordActiveShow(item.summary,query.keyword)"></text>
|
<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="artical_text_bottom">
|
||||||
<text style="font-size: 26rpx;color: #9d9d9d;">{{item.time}}</text>
|
<view style="margin-top: 10upx;">
|
||||||
<text style="font-size: 26rpx;color: #666666;margin-right: 35upx;">{{ item.sysCreateBy }}分享给我</text>
|
<text style="font-size: 24upx;color: #999;margin-right: 35upx;">{{ item.sysCreateBy }}分享给我</text>
|
||||||
|
</view>
|
||||||
|
<view class="rowbtn-right">
|
||||||
|
<view v-if="!item.isRead" class="Viewed">
|
||||||
|
已查看
|
||||||
|
</view>
|
||||||
|
<view v-else class="notViewed">
|
||||||
|
未查看
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view style="margin-top: 8px;"><interact-bar :data="item" :shares="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> -->
|
|
||||||
<!-- </view> -->
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="conType == 4">
|
<view v-if="item.type == 4">
|
||||||
<view v-for="(item, idx) in qaList" :key="idx" class="qa" @click="toQaDetail(item)">
|
<view class="qa" >
|
||||||
<view class="qa-body" >
|
<view class="qa-body" @click="toQaDetail(item.question)">
|
||||||
<text v-if="item.question.isResolve" style="color:#08A890;margin-right: 8upx">[已解决]</text>
|
|
||||||
<text v-else style="color:#588afc;margin-right: 8upx">
|
|
||||||
[待解决]
|
|
||||||
</text>
|
|
||||||
<text v-html="$keywordActiveShow(item.question.title,query.keyword)"></text>
|
<text v-html="$keywordActiveShow(item.question.title,query.keyword)"></text>
|
||||||
</view>
|
</view>
|
||||||
<view class="qa-bottom" v-html="$keywordActiveShow(item.question.content,query.keyword)"></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"></author-info> -->
|
<view class="qa-bottombox">
|
||||||
|
<view class="qa-bottom-left">
|
||||||
<view class="qa-answers" v-if="item.question.isResolve">
|
<text style="font-size: 24upx;color: #999;margin-top: 10upx;" @click="toQaDetail(item.question)">分享给{{item.toAname}}</text>
|
||||||
|
|
||||||
<view class="answer-two"
|
|
||||||
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;" >最佳回答:</text>
|
|
||||||
{{ item.question.bestAnswer }}
|
|
||||||
</view>
|
</view>
|
||||||
|
<view class="rowbtn-right" style="margin-left: auto;">
|
||||||
</view>
|
<view v-if="item.isRead" class="Viewed">
|
||||||
<text class="qa-text">{{item.time}}</text>
|
已查看
|
||||||
<text style="font-size: 26rpx;color: #666666">{{ item.sysCreateBy }}分享给我</text>
|
</view>
|
||||||
<!-- <view class="qa-bar"><interact-bar :data="item.question" :praises="false" :views="false"></interact-bar></view> -->
|
<view v-else class="notViewed">
|
||||||
<!-- <view class="">
|
未查看
|
||||||
<text class="isread" v-if="item.isRead">
|
</view>
|
||||||
<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>
|
|
||||||
</view> -->
|
|
||||||
<view class="rowbtn-right">
|
|
||||||
<view class="rowbtn rowbtn-info" v-if="item.isRead">
|
|
||||||
<u-icon name="eye-fill" color="#767676" labelColor="#767676" label="已查看" size="16" labelSize="12"></u-icon>
|
|
||||||
</view>
|
|
||||||
<view class="rowbtn rowbtn-info" v-else>
|
|
||||||
<u-icon name="eye-off" color="#767676" labelColor="#767676" label="未查看" size="16" labelSize="12"></u-icon>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view v-show="count>query.pageSize"><uni-load-more :status="loadStatus"></uni-load-more></view>
|
</view>
|
||||||
|
<view v-show="count>dataList.pageSize"><uni-load-more :status="loadStatus"></uni-load-more></view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -162,11 +80,17 @@
|
|||||||
import { mapState, mapActions } from 'vuex';
|
import { mapState, mapActions } from 'vuex';
|
||||||
import apiShares from '@/api/modules/shares.js';
|
import apiShares from '@/api/modules/shares.js';
|
||||||
import apiUser from '@/api/system/user.js';
|
import apiUser from '@/api/system/user.js';
|
||||||
// import apiShares from '@/api/modules/shares.js';
|
|
||||||
export default {
|
export default {
|
||||||
computed: mapState(['resourceTab']),
|
computed: mapState(['resourceTab']),
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
dataList: {
|
||||||
|
pageIndex: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
keyword: '',
|
||||||
|
count: 0,
|
||||||
|
list: []
|
||||||
|
},
|
||||||
isRead:null,
|
isRead:null,
|
||||||
statusBtn: '全部',
|
statusBtn: '全部',
|
||||||
selectData: [
|
selectData: [
|
||||||
@@ -181,7 +105,7 @@ export default {
|
|||||||
conType: 1,
|
conType: 1,
|
||||||
query:{
|
query:{
|
||||||
pageIndex: 1,
|
pageIndex: 1,
|
||||||
pageSize: 4,
|
pageSize: 10,
|
||||||
keyword:'',
|
keyword:'',
|
||||||
isRead:null
|
isRead:null
|
||||||
},
|
},
|
||||||
@@ -200,8 +124,7 @@ export default {
|
|||||||
this.onReachBottom();
|
this.onReachBottom();
|
||||||
},
|
},
|
||||||
async onReachBottom() {
|
async onReachBottom() {
|
||||||
if(this.conType==1){
|
if(this.dataList.list.length<this.count){
|
||||||
if(this.courseList.length<this.count){
|
|
||||||
this.loadStatus='loading';
|
this.loadStatus='loading';
|
||||||
this.query.pageIndex++;
|
this.query.pageIndex++;
|
||||||
await this.findData(false);
|
await this.findData(false);
|
||||||
@@ -209,105 +132,45 @@ export default {
|
|||||||
}else{
|
}else{
|
||||||
this.loadStatus='noMore';
|
this.loadStatus='noMore';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if(this.conType==2){
|
|
||||||
if(this.articleList.length<this.count){
|
|
||||||
this.loadStatus='loading';
|
|
||||||
this.query.pageIndex++;
|
|
||||||
await this.findData(false);
|
|
||||||
this.loadStatus='more';
|
|
||||||
}else{
|
|
||||||
this.loadStatus='noMore';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(this.conType==4){
|
|
||||||
if(this.qaList.length<this.count){
|
|
||||||
this.loadStatus='loading';
|
|
||||||
this.query.pageIndex++;
|
|
||||||
await this.findData(false);
|
|
||||||
this.loadStatus='more';
|
|
||||||
}else{
|
|
||||||
this.loadStatus='noMore';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//点击切换类别时请求数据
|
|
||||||
clicktab(val) {
|
|
||||||
this.conType=val;
|
|
||||||
this.query.pageIndex=1;
|
|
||||||
this.query.keyword='';
|
|
||||||
this.isRead = null;
|
|
||||||
this.query.isRead = null;
|
|
||||||
this.statusBtn = '全部'
|
|
||||||
this.findData(true);
|
|
||||||
},
|
|
||||||
//查找数据
|
//查找数据
|
||||||
findData(flag) {
|
findData(flag) {
|
||||||
if(this.running){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.running=true;
|
|
||||||
let $this = this;
|
|
||||||
//是否重置列表
|
|
||||||
if (flag) {
|
|
||||||
if(this.conType==1){
|
|
||||||
this.courseList=[]
|
|
||||||
}
|
|
||||||
if(this.conType==2){
|
|
||||||
this.articleList=[]
|
|
||||||
}
|
|
||||||
if(this.conType==4){
|
|
||||||
this.qaList=[]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.query.isRead = this.isRead;
|
|
||||||
//生成查询条件
|
//生成查询条件
|
||||||
uni.showLoading({ title: '加载中...' });
|
uni.showLoading({ title: '加载中...' });
|
||||||
//查询条件
|
apiShares.findShareMe(this.query).then(rs => {
|
||||||
const conList = {
|
|
||||||
1: 'mymecourselist',
|
|
||||||
2: 'mymearticlelist',
|
|
||||||
4: 'mymeqalist'
|
|
||||||
};
|
|
||||||
apiShares[conList[this.conType]](this.query).then(rs => {
|
|
||||||
if (rs.status == 200) {
|
if (rs.status == 200) {
|
||||||
this.count=rs.result.count
|
this.count=rs.result.count
|
||||||
|
rs.result.list.forEach(item => {
|
||||||
if(this.conType==1){
|
if(item.type == 4) {
|
||||||
|
item.question = {isResolve:false,title:'',content:'',bestAnswer:''};
|
||||||
rs.result.list.forEach(item=>{
|
item.question.isResolve=item.isResolve;
|
||||||
$this.courseList.push(item)
|
item.question.title=item.title;
|
||||||
})
|
item.question.content=item.content;
|
||||||
|
item.question.bestAnswer=item.bestAnswer;
|
||||||
}else if(this.conType==2){
|
item.question.id=item.id;
|
||||||
let userIds = [];
|
|
||||||
rs.result.list.forEach(item=>{
|
|
||||||
item.avatar=''
|
|
||||||
item.orgInfo='';
|
|
||||||
item.sex=null;
|
|
||||||
userIds.push(item.sysCreateAid);
|
|
||||||
$this.articleList.push(item)
|
|
||||||
});
|
|
||||||
$this.loadUserInfos(rs.result.list,userIds);
|
|
||||||
}else if(this.conType==4){
|
|
||||||
let userIds = [];
|
|
||||||
rs.result.list.forEach(item=>{
|
|
||||||
item.avatar=''
|
|
||||||
item.orgInfo='';
|
|
||||||
item.sex=null;
|
|
||||||
userIds.push(item.question.sysCreateAid);
|
|
||||||
$this.qaList.push(item)
|
|
||||||
});
|
|
||||||
$this.loadQaUserInfos(rs.result.list,userIds);
|
|
||||||
}
|
}
|
||||||
|
if(item.type == 3){
|
||||||
|
item.cases = {title:'',summary:''};
|
||||||
|
item.cases.title=item.title;
|
||||||
|
item.cases.summary=item.content;
|
||||||
|
item.cases.id=item.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
if(flag){
|
||||||
|
this.dataList.list = rs.result.list;
|
||||||
|
}else{
|
||||||
|
this.dataList.list.push(...rs.result.list);
|
||||||
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "获取数据失败",
|
title: "获取数据失败",
|
||||||
icon:'none'
|
icon:'none'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.running=false;
|
// this.running=false;
|
||||||
});
|
});
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
@@ -424,30 +287,27 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
contentTypeFilter(value) {
|
contentTypeFilter(value) {
|
||||||
|
console.log(value)
|
||||||
|
let lmj = String(value)
|
||||||
let obj = {};
|
let obj = {};
|
||||||
switch (value) {
|
switch (lmj) {
|
||||||
case '10': {
|
case '10': {
|
||||||
obj.class = 'uc-course-type2';
|
|
||||||
obj.text = '录播';
|
obj.text = '录播';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case '21': {
|
case '21': {
|
||||||
obj.class = 'uc-course-type2';
|
|
||||||
obj.text = '直播';
|
obj.text = '直播';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case '20': {
|
case '20': {
|
||||||
obj.class = 'uc-course-type2';
|
|
||||||
obj.text = '录播';
|
obj.text = '录播';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case '30': {
|
case '30': {
|
||||||
obj.class = 'uc-course-type2';
|
|
||||||
obj.text = '面授';
|
obj.text = '面授';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case '90': {
|
case '90': {
|
||||||
obj.class = 'uc-course-type2';
|
|
||||||
obj.text = '混合';
|
obj.text = '混合';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -459,21 +319,61 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.qa-bottombox{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.coures-bottom{
|
||||||
|
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;
|
||||||
|
}
|
||||||
.rowbtn-right{
|
.rowbtn-right{
|
||||||
margin-top: 10upx;
|
margin-top: 10upx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
.rowbtn{
|
.rowbtn{
|
||||||
padding: 5px 8px 0px 8px;
|
|
||||||
height: 20px;
|
|
||||||
border-radius: 10upx;
|
border-radius: 10upx;
|
||||||
}
|
}
|
||||||
.rowbtn-primary{
|
.rowbtn-primary{
|
||||||
background-color: #ebf3fe;
|
// background-color: #ebf3fe;
|
||||||
}
|
}
|
||||||
.rowbtn-info{
|
.rowbtn-info{
|
||||||
background-color: #f7f7f7;
|
// background-color: #f7f7f7;
|
||||||
}
|
}
|
||||||
/deep/.filter .btn-box > uni-view {
|
/deep/.filter .btn-box > uni-view {
|
||||||
border: solid 0.5px #ffb30f;
|
border: solid 0.5px #ffb30f;
|
||||||
@@ -622,47 +522,34 @@ export default {
|
|||||||
.u-input{
|
.u-input{
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
}
|
}
|
||||||
// /deep/.u-icon{
|
|
||||||
// span{
|
|
||||||
// font-size: 50upx;
|
|
||||||
// color: #588afc;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// /deep/.uni-input-placeholder{
|
|
||||||
// color: #588afc!important;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
.course_box {
|
.course_box {
|
||||||
// margin-bottom: 10px;
|
margin-bottom: 20upx;
|
||||||
margin-top: 20upx;
|
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
padding: 20upx 30upx;
|
padding: 40upx 32upx;
|
||||||
|
|
||||||
/deep/ .course {
|
/deep/ .course {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
align-items: center;
|
|
||||||
uni-image{
|
uni-image{
|
||||||
border-radius:8px;
|
border-radius:8upx;
|
||||||
}
|
}
|
||||||
.course-img {
|
.course-img {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
width: 120px;
|
margin-right: 20upx;
|
||||||
height: 70px;
|
|
||||||
margin-right: 5upx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.course-content {
|
.course-content {
|
||||||
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
margin-left: 10upx;
|
||||||
margin-left: 20upx;
|
|
||||||
height: 74px;
|
|
||||||
margin-top:-12upx;
|
|
||||||
.course-con_source{
|
.course-con_source{
|
||||||
font-size: 26upx;
|
font-size: 28upx;
|
||||||
color: #787878;
|
color: #444;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
padding-bottom: 10rpx;
|
||||||
}
|
}
|
||||||
.course-author {
|
.course-author {
|
||||||
font-size: 26upx;
|
font-size: 26upx;
|
||||||
@@ -701,19 +588,20 @@ export default {
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 20upx 30upx;
|
padding: 20upx 30upx;
|
||||||
.articla_tit {
|
.articla_tit {
|
||||||
line-height: 50rpx;
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
padding-bottom: 15rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow:ellipsis;
|
text-overflow:ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
font-size: 30upx;
|
font-size: 36upx;
|
||||||
|
color: #333;
|
||||||
word-break:break-all;
|
word-break:break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
.articla_text {
|
.articla_text {
|
||||||
word-break:break-all;
|
word-break:break-all;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #797979;
|
color: #666;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
@@ -723,6 +611,8 @@ export default {
|
|||||||
}
|
}
|
||||||
.artical_text_bottom{
|
.artical_text_bottom{
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
|
justify-content: space-between;
|
||||||
|
display: flex;
|
||||||
text{
|
text{
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
@@ -730,15 +620,12 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.qa {
|
.qa {
|
||||||
padding: 20upx 30upx;
|
padding: 36upx 36upx;
|
||||||
// margin-top: 20upx;
|
|
||||||
// padding: 10px;
|
|
||||||
box-shadow: #f7f7f7 0px 6px 5px;
|
box-shadow: #f7f7f7 0px 6px 5px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
margin-top: 10px;
|
margin-bottom: 20upx;
|
||||||
// padding-bottom: 10rpx;
|
padding-bottom: 15rpx;
|
||||||
|
|
||||||
.qa-header {
|
.qa-header {
|
||||||
height: 26px;
|
height: 26px;
|
||||||
line-height: 50rpx;
|
line-height: 50rpx;
|
||||||
@@ -758,9 +645,9 @@ export default {
|
|||||||
|
|
||||||
.qa-body {
|
.qa-body {
|
||||||
line-height: 26px;
|
line-height: 26px;
|
||||||
// overflow: hidden;
|
overflow: hidden;
|
||||||
// text-overflow:ellipsis;
|
text-overflow:ellipsis;
|
||||||
// white-space: nowrap;
|
white-space: nowrap;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
@@ -773,10 +660,11 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.qa-bottom {
|
.qa-bottom {
|
||||||
|
margin-top: 18upx;
|
||||||
font-size: 15px;
|
font-size: 30upx;
|
||||||
color: #454545;
|
color: #454545;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
-webkit-line-clamp: 2;
|
-webkit-line-clamp: 2;
|
||||||
@@ -784,7 +672,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.qa-answers {
|
.qa-answers {
|
||||||
|
display: flex;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #5b5b5b;
|
color: #5b5b5b;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
Reference in New Issue
Block a user