mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
+23
-15
@@ -1,6 +1,19 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const date = require('../../utils/date');
|
||||
|
||||
function addPictureAndVideo(item) {
|
||||
let content = '';
|
||||
content += item.pictureList
|
||||
? item.pictureList
|
||||
.map(function(ele) {
|
||||
return `<img src="${ele.picUrl}" />`;
|
||||
})
|
||||
.join('<br>')
|
||||
: '';
|
||||
content += item.videoUrl ? `<img src="${item.videoUrl}" />` : '';
|
||||
return content;
|
||||
}
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id;
|
||||
|
||||
@@ -50,31 +63,26 @@ module.exports = async (ctx) => {
|
||||
content = poi;
|
||||
title = `签到成功: ${poiName} `;
|
||||
} else if (item.feedType === 101) {
|
||||
// 发布点评
|
||||
// 对商户、地点发布点评
|
||||
link = `https://m.dianping.com/ugcdetail/${item.mainId}?sceneType=0&bizType=1`;
|
||||
content = item.content.replace(/\n+/g, '<br>') + '<br>';
|
||||
content += `评分:${starMap[item.star]}<br>`;
|
||||
content += poi + '<br>';
|
||||
content += item.pictureList
|
||||
? item.pictureList
|
||||
.map(function(ele) {
|
||||
return `<img src="${ele.picUrl}" />`;
|
||||
})
|
||||
.join('<br>')
|
||||
: '';
|
||||
content += addPictureAndVideo(item);
|
||||
title = `发布点评: ${poiName}`;
|
||||
} else if (item.feedType === 131) {
|
||||
// 发布点评
|
||||
link = `https://m.dianping.com/ugcdetail/${item.mainId}?sceneType=0&bizType=29`;
|
||||
content = item.content.replace(/\n+/g, '<br>') + '<br>';
|
||||
content += addPictureAndVideo(item);
|
||||
title = `发布点评: ${content}`;
|
||||
} else if (item.feedType === 4208) {
|
||||
// 发布攻略
|
||||
link = `https://m.dianping.com/cityinsight/${item.mainId}`;
|
||||
content = item.content.replace(/\n+/g, '<br>') + '<br>';
|
||||
content += poi + '<br>';
|
||||
content += item.pictureList
|
||||
? item.pictureList
|
||||
.map(function(ele) {
|
||||
return `<img src="${ele.picUrl}" />`;
|
||||
})
|
||||
.join('<br>')
|
||||
: '';
|
||||
content += item.moreDesc ? `<a href='${link}'>${item.moreDesc}</a><br>` : '';
|
||||
content += addPictureAndVideo(item);
|
||||
title = `发布攻略: ${poiName}`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user