mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-07 01:46:44 +08:00
消息的跳转
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
<script>
|
||||
import apiStat from '@/api/phase2/stat.js'
|
||||
import apiPraises from '@/api/modules/praises.js'
|
||||
import apiMessage from '@/api/system/message.js'
|
||||
import { mapGetters } from 'vuex';
|
||||
export default {
|
||||
props: {
|
||||
@@ -78,6 +79,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlId:'',
|
||||
loading:false,
|
||||
isPraise:false,
|
||||
}
|
||||
@@ -91,7 +93,9 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log(location.href.split('=')[1],'location.href,')
|
||||
this.checkHas();
|
||||
this.urlId = location.href.split('=')[1]
|
||||
// this.loadUser();
|
||||
},
|
||||
computed:{
|
||||
@@ -155,12 +159,17 @@
|
||||
content='案例评论'
|
||||
}
|
||||
// 评论点赞通知没有关联id,评论通知暂时关闭
|
||||
if(this.type==60 || this.type==10 || this.type==20 || this.type==30 || this.type == 6) {
|
||||
return;
|
||||
// if(this.type==60 || this.type==10 || this.type==20 || this.type==30 || this.type == 6) {
|
||||
// return;
|
||||
// content=sendName+typeText+content
|
||||
} else {
|
||||
content=sendName+typeText+content+'-'+title
|
||||
}
|
||||
// } else {
|
||||
if(title) {
|
||||
content=sendName+typeText+content+'-'+title
|
||||
} else {
|
||||
content=sendName+typeText+content
|
||||
}
|
||||
|
||||
// }
|
||||
|
||||
|
||||
let message={
|
||||
@@ -168,7 +177,7 @@
|
||||
refId,
|
||||
refType:this.type,
|
||||
source:1,
|
||||
pageUrl:location.href,
|
||||
// pageUrl:location.href,
|
||||
sendAid:this.userInfo.aid,
|
||||
sendName,
|
||||
acceptName,
|
||||
@@ -176,6 +185,12 @@
|
||||
title:'系统消息',
|
||||
sendType:1,
|
||||
conType,
|
||||
source:1,
|
||||
pageType:this.type,
|
||||
pageParams:this.urlId,
|
||||
// pageUrl:location.href,
|
||||
pageUrl:'',
|
||||
sendAid:this.userInfo.aid,
|
||||
}
|
||||
apiMessage.save(message).then(res=>{
|
||||
if(res.status!=200){ console.log('发送消息失败') }
|
||||
|
||||
@@ -199,6 +199,8 @@ export default {
|
||||
refType:this.type,
|
||||
sendName,
|
||||
acceptName,
|
||||
pageType:this.type,
|
||||
pageParams:refId,
|
||||
acceptId,
|
||||
title:'系统消息',
|
||||
sendType:1,
|
||||
|
||||
@@ -73,17 +73,17 @@
|
||||
})
|
||||
}
|
||||
|
||||
if (item.refType == 2) {
|
||||
if (item.pageType == 2 || item.pageType == 20) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/resource/articeDetail?id=' + item.refId
|
||||
url: '/pages/resource/articeDetail?id=' + item.pageParams
|
||||
});
|
||||
} else if (item.refType == 4) {
|
||||
} else if (item.pageType == 4 || item.pageType == 40) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/resource/qaDetail?id=' + item.refId
|
||||
url: '/pages/resource/qaDetail?id=' + item.pageParams
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/study/courseStudy?id=' + item.refId
|
||||
url: '/pages/study/courseStudy?id=' + item.pageParams
|
||||
});
|
||||
// if (item.conType == '10') {
|
||||
// uni.navigateTo({
|
||||
|
||||
@@ -530,7 +530,9 @@ export default {
|
||||
conType,
|
||||
content,
|
||||
source:1,
|
||||
pageUrl:location.href,
|
||||
pageType:4,
|
||||
pageParams:this.questionId,
|
||||
// pageUrl:location.href,
|
||||
sendAid:this.userInfo.aid,
|
||||
}
|
||||
apiMessage.save(message).then(res=>{
|
||||
|
||||
Reference in New Issue
Block a user