...
|
...
|
@@ -152,9 +152,22 @@ const getMessageList = (uid, params, limit) => { |
|
|
|
|
|
let href = `/home/message/detail?id=${value.id}&page=${page}`;
|
|
|
|
|
|
href += type ? `&type=${type}` : '';
|
|
|
switch (value.type) {
|
|
|
case 'pullCoupon':
|
|
|
case 'button':
|
|
|
case 'pushCoupon':
|
|
|
break;
|
|
|
default:
|
|
|
if (value.pcLink) {
|
|
|
href = value.pcLink.replace('http:', '');
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
msg.push({
|
|
|
id: value.id || 0,
|
|
|
href: type ? href + `&type=${type}` : href,
|
|
|
href: href,
|
|
|
title: value.title || '',
|
|
|
content: _.get(value, 'body.content', ''),
|
|
|
sender: value.from || '',
|
...
|
...
|
@@ -207,6 +220,10 @@ const getMessageDetail = (uid, params, limit) => { |
|
|
};
|
|
|
let msg = _.find(_.get(result, '[1]data.list', []), {id: mid});
|
|
|
|
|
|
if (type) {
|
|
|
resData.backUrl += `&type=${type}`;
|
|
|
}
|
|
|
|
|
|
if (!_.isEmpty(msg)) {
|
|
|
resData.message = {
|
|
|
sender: msg.from, // 消息发言人
|
...
|
...
|
@@ -265,7 +282,7 @@ const getMessageDetail = (uid, params, limit) => { |
|
|
image: _.get(msg, 'body.image', ''),
|
|
|
content: _.get(msg, 'body.text', ''),
|
|
|
btnLink: _.get(msg, 'body.pc_link', ''),
|
|
|
btnName: _.get(msg, 'body.button_text', '')
|
|
|
btnName: _.get(msg, 'body.button_text', '') || '查看详情'
|
|
|
};
|
|
|
break;
|
|
|
case 'pushCoupon':
|
...
|
...
|
|