diff --git a/src/components/Article/shareItems.vue b/src/components/Article/shareItems.vue
index c1137264..8d926c64 100644
--- a/src/components/Article/shareItems.vue
+++ b/src/components/Article/shareItems.vue
@@ -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}`)
},
diff --git a/src/components/Case/caseItems.vue b/src/components/Case/caseItems.vue
index 156af184..b968f451 100644
--- a/src/components/Case/caseItems.vue
+++ b/src/components/Case/caseItems.vue
@@ -4,7 +4,7 @@
【已查看】
- 【未查看】
+ 【未查看】
@@ -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}`)
},
diff --git a/src/components/Course/shareItem.vue b/src/components/Course/shareItem.vue
index c40062a0..66c2ccd8 100644
--- a/src/components/Course/shareItem.vue
+++ b/src/components/Course/shareItem.vue
@@ -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 {
diff --git a/src/components/Qa/shareList.vue b/src/components/Qa/shareList.vue
index 19693a1e..81e040a0 100644
--- a/src/components/Qa/shareList.vue
+++ b/src/components/Qa/shareList.vue
@@ -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}`)
},
diff --git a/src/views/portal/qa/Index.vue b/src/views/portal/qa/Index.vue
index 25c70122..dc9e26ca 100644
--- a/src/views/portal/qa/Index.vue
+++ b/src/views/portal/qa/Index.vue
@@ -65,7 +65,7 @@