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:
@@ -1,13 +1,6 @@
|
||||
<template>
|
||||
<view>
|
||||
<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-if="item.type == 1">
|
||||
<view class="course_box">
|
||||
@@ -18,14 +11,13 @@
|
||||
{{ contentTypeFilter(item.contentType).text }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="course-content">
|
||||
<text style="height: 100upx;margin-top: 6upx;" v-html="$keywordActiveShow(item.title,query.keyword)"></text>
|
||||
<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>
|
||||
<image src="../../static/images/icon/withdrawnew.png" mode=""></image>撤回
|
||||
</view>
|
||||
<view v-if="item.isRead" class="Viewed">
|
||||
已查看
|
||||
</view>
|
||||
@@ -40,13 +32,13 @@
|
||||
<view v-if="item.type == 2">
|
||||
<view class="article_one" >
|
||||
<view>
|
||||
<view @click="toArticleDetail(item)" class="articla_tit" >
|
||||
<view @click="toArticleDetail(item)" class="articla_tit" >
|
||||
<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> -->
|
||||
<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>
|
||||
</view>
|
||||
<view class="rowbtn-right">
|
||||
@@ -111,14 +103,6 @@ export default {
|
||||
},
|
||||
isRead:null,
|
||||
statusBtn: '全部',
|
||||
selectData: [
|
||||
[
|
||||
{ label: '全部', value: null },
|
||||
{ label: '已查看', value: true },
|
||||
{ label: '未查看', value: false },
|
||||
|
||||
]
|
||||
],
|
||||
statusSelectShow: false,
|
||||
conType: 1,
|
||||
query:{
|
||||
@@ -151,6 +135,38 @@ export default {
|
||||
}
|
||||
},
|
||||
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) {
|
||||
this.conType=val;
|
||||
@@ -170,7 +186,6 @@ export default {
|
||||
apiShares.findMeShare(this.query).then(rs => {
|
||||
if (rs.status == 200) {
|
||||
this.count=rs.result.count
|
||||
console.log(rs);
|
||||
rs.result.list.forEach(item => {
|
||||
if(item.type == 4) {
|
||||
item.question = {isResolve:false,title:'',content:'',bestAnswer:''};
|
||||
@@ -217,19 +232,7 @@ export default {
|
||||
setTimeout(()=>{
|
||||
this.findData(true);
|
||||
},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{
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
@@ -310,37 +313,7 @@ export default {
|
||||
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>
|
||||
@@ -398,8 +371,7 @@ export default {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.rowbtn{
|
||||
// padding: 5px 8px 0px 8px;
|
||||
// height: 20px;
|
||||
|
||||
border-radius: 10upx;
|
||||
}
|
||||
.rowbtn-primary{
|
||||
@@ -606,6 +578,7 @@ export default {
|
||||
}
|
||||
|
||||
.course-content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-left: 10upx;
|
||||
@@ -652,13 +625,13 @@ export default {
|
||||
font-weight: bold;
|
||||
text-overflow:ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 30rpx;
|
||||
// float: left;
|
||||
font-size: 36rpx;
|
||||
color: #333;
|
||||
}
|
||||
.articla_text {
|
||||
word-break:break-all;
|
||||
font-size: 28rpx;
|
||||
color: #454545;
|
||||
color: #666;
|
||||
display: -webkit-box;
|
||||
line-height: 40rpx;
|
||||
overflow: hidden;
|
||||
|
||||
Reference in New Issue
Block a user