This commit is contained in:
lmj
2022-06-13 17:53:16 +08:00
parent 1ac2522659
commit 0afd998cd0
5 changed files with 56 additions and 6 deletions

View File

@@ -65,13 +65,24 @@ export default {
},
methods: {
jumpRouter(item){
if(this.type!='myShare'){
if(item.type){
if(this.type!='myShare'){
apiShares.updateIsRead(item.shareId).then(res=>{
if(res.status==200){
this.$emit('confirm',item)
}
})
}
}else{
if(this.type!='myShare'){
apiShares.updateIsRead(item.id).then(res=>{
if(res.status==200){
this.$emit('confirm',item)
}
})
}
}
this.$router.push({path:'/article/detail',query:{id:item.objId || item.id}})
// window.open(`${this.webBaseUrl}/article/detail?id=${item.objId}`)
},

View File

@@ -4,7 +4,7 @@
<div class="article-info" @click="jumpRouter(item)">
<div class="article-info-title">
<span v-if="item.isRead" class="readed">已查看</span>
<span class="noRead" v-else>未查看</span>
<span v-else class="noRead" >未查看</span>
<span class="title one-line-ellipsis" v-html="$keywordActiveShow(item.cases.title,keyword)"></span>
</div>
@@ -52,7 +52,21 @@ export default {
},
methods:{
jumpRouter(item){
if(this.type!='myShare'){
if(item.type){
if(this.type!='myShare'){
apiShares.updateIsRead(item.shareId).then(res=>{
if(res.status==200){
this.$emit('confirm',item)
}else{
this.$message({
type: 'error',
message: res.message,
});
}
})
}
}else{
if(this.type!='myShare'){
apiShares.updateIsRead(item.id).then(res=>{
if(res.status==200){
this.$emit('confirm',item)
@@ -64,6 +78,9 @@ export default {
}
})
}
}
console.log(item)
this.$router.push({path:'/case/detail',query:{id:item.cases.id}})
// window.open(`${this.webBaseUrl}/article/detail?id=${item.objId}`)
},

View File

@@ -106,13 +106,24 @@ export default {
return obj;
},
jumpRouter(item){
if(this.type!='myShare'){
if(item.type){
if(this.type!='myShare'){
apiShares.updateIsRead(item.shareId).then(res=>{
if(res.status==200){
this.$emit('confirm',item)
}
})
}
}else{
if(this.type!='myShare'){
apiShares.updateIsRead(item.id).then(res=>{
if(res.status==200){
this.$emit('confirm',item)
}
})
}
}
if(item.contentType == 20) {
this.$router.push({path:'/course/detail',query:{id:item.objId || item.id}})
} else {

View File

@@ -73,13 +73,24 @@ export default {
},
methods: {
jumpRouter(item){
if(this.type!='myShare'){
if(item.type){
if(this.type!='myShare'){
apiShares.updateIsRead(item.shareId).then(res=>{
if(res.status==200){
this.$emit('confirm',item)
}
})
}
}else{
if(this.type!='myShare'){
apiShares.updateIsRead(item.id).then(res=>{
if(res.status==200){
this.$emit('confirm',item)
}
})
}
}
this.$router.push({path:'/qa/answer',query:{id:item.question.id}})
// window.open(`${this.webBaseUrl}/qa/answer?id=${item.question.id}`)
},

View File

@@ -65,7 +65,7 @@
</div>
<div style="display: flex;">
<div style="flex: 83%" class="qa-info-summary two-line-ellipsis" @click="jumpDetail(qa)" v-html="$keywordActiveShow(qa.content,queryKeyWord)"></div>
<div style="flex: 17% ;text-align: right;cursor: pointer;" v-if="qa.images!==''" @click="jumpDetail(qa)">
<div style="flex: 17% ; cursor: pointer; text-align: right;cursor: pointer;" v-if="qa.images!==''" @click="jumpDetail(qa)">
<img style="width: 156px;height: 105px;" :src="fileBaseUrl + qa.images" alt="">
</div>
</div>