|
@@ -56,29 +56,30 @@ var vmMesg = new Vue({
|
|
error:function () {}
|
|
error:function () {}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- readed: function(ids, type, url) {
|
|
|
|
|
|
+ readed: function(id, url) {
|
|
var _this = this
|
|
var _this = this
|
|
$.ajax({
|
|
$.ajax({
|
|
type: 'POST',
|
|
type: 'POST',
|
|
- url:'/jymessageCenter/markRead',
|
|
|
|
- data: {
|
|
|
|
- msgId: ids,
|
|
|
|
- msgType: type
|
|
|
|
- },
|
|
|
|
|
|
+ url:'/jyapi//messageCenter/markRead',
|
|
|
|
+ data: JSON.stringify({
|
|
|
|
+ msgId: id ? Number(id) : null
|
|
|
|
+ }),
|
|
|
|
+ dataType: 'json',
|
|
|
|
+ headers: {'Content-Type': 'application/json'},
|
|
success:function () {
|
|
success:function () {
|
|
- if (url) {
|
|
|
|
- location.href = url
|
|
|
|
- } else {
|
|
|
|
- location.href = '/swordfish/frontPage/messageCenter/sess/index'
|
|
|
|
- }
|
|
|
|
|
|
+ // if (url) {
|
|
|
|
+ // location.href = url
|
|
|
|
+ // } else {
|
|
|
|
+ // location.href = '/swordfish/frontPage/messageCenter/sess/index'
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
titleGoto: function(item) {
|
|
titleGoto: function(item) {
|
|
// 消息统计
|
|
// 消息统计
|
|
- this.clickMessage(item.msgLogid)
|
|
|
|
|
|
+ this.clickMessage(item.msgLogId)
|
|
if (item.isRead == 0) {
|
|
if (item.isRead == 0) {
|
|
- this.readed(item.id, item.msg_type, item.link)
|
|
|
|
|
|
+ this.readed(item.id, item.link)
|
|
} else {
|
|
} else {
|
|
if(item.link) {
|
|
if(item.link) {
|
|
// 跳转链接
|
|
// 跳转链接
|
|
@@ -102,14 +103,15 @@ var vmMesg = new Vue({
|
|
return obj[val]
|
|
return obj[val]
|
|
},
|
|
},
|
|
// 消息统计
|
|
// 消息统计
|
|
- clickMessage(msgLogid) {
|
|
|
|
|
|
+ clickMessage(msgLogId) {
|
|
$.ajax({
|
|
$.ajax({
|
|
type:'POST',
|
|
type:'POST',
|
|
- url:'/jymessageCenter/clickMessage',
|
|
|
|
- data: {
|
|
|
|
- msgLogId: msgLogid,
|
|
|
|
- platform: '1'
|
|
|
|
- },
|
|
|
|
|
|
+ url:'/jyapi/messageCenter/msgOpenLog',
|
|
|
|
+ headers: {'Content-Type': 'application/json'},
|
|
|
|
+ data: JSON.stringify({
|
|
|
|
+ msgLogId: msgLogId ? Number(msgLogId) : null,
|
|
|
|
+ platform: 1
|
|
|
|
+ }),
|
|
success:function () {}
|
|
success:function () {}
|
|
})
|
|
})
|
|
}
|
|
}
|