Authored by 毕凯

Merge branch 'gray'

... ... @@ -56,7 +56,7 @@ function droitHtml(contents) {
{title: '特权介绍', data: ['金卡及以上会员享受限定次数的免费送达服务。']},
{title: '使用说明', data: [
'金卡会员每月可享3次普通快递免邮,白金会员每月可享5次顺丰快递免邮(顺丰无法触达地区将改发其他快递)。',
'免邮次数每月一日更新,会员等级升级时,免邮次数当天更新。', '金卡会员可消耗一次免邮次数将已达到免邮门槛的普通快递订单升级至顺丰快递。']},
'免邮次数每月一日更新,会员等级升级时,免邮次数当天更新。']},
],
interlocution: []
};
... ...
... ... @@ -33,10 +33,9 @@ const index = (req, res, next) => {
});
_.forEach(result, item => {
item.url = item.url.indexOf('http') >= 0 ? item.url : 'http://' + item.url;
feed.addItem({
title: item.title,
link: `${item.url}&ref=rss`,
link: `https://m.yohobuy.com/guang/${item.id}.html?ref=rss`,
description: item.intro,
author: [{
name: (item.author && item.author.name) || ' '
... ... @@ -60,7 +59,7 @@ const rss = (req, res, next, gmt) => {
return next();
}
_.forEach(result, item => {
item.url = item.url.indexOf('http') >= 0 ? item.url : 'http://' + item.url;
item.url = `https://m.yohobuy.com/guang/${item.id}.html?ref=rss`;
let time = new Date(item.publishTimeLong &&
parseFloat(item.publishTimeLong) || moment(item.publishTime, 'MM月DD日 HH:mm'));
let format = gmt ? 'ddd, MM MMM YYYY hh:mm:ss +0800' : 'YYYY-MM-DD hh:mm:ss +0800';
... ...
... ... @@ -33,16 +33,16 @@ class RssModel extends global.yoho.BaseModel {
if (value.text) { // 文字
result += htmlProcess.removeHtml(htmlProcess.escapeToHtml(value.text.data.text)) + '<br/>';
} else if (value.singleImage) { // 单张图
result += `<img src="${helpers.image(value.singleImage.data[0].src, 640, 640)}"/><br/>`;
result += `<img src="https:${helpers.image(value.singleImage.data[0].src, 640, 640)}"/><br/>`;
} else if (value.smallPic && value.smallPic.data) { // 多张小图
value.smallPic.data.forEach((small) => {
result += `<img src="${helpers.image(small.src, 315, 420)}"/>`;
result += `<img src="https:${helpers.image(small.src, 315, 420)}"/>`;
});
result += '<br/>';
}
});
result += `<a href="http://guang.m.yohobuy.com/info/index?id=${id}">查看原文</a>`;
result += `<a href="https://m.yohobuy.com/guang/${id}.html?ref=rss">查看原文</a>`;
return result;
}
});
... ...
<?xml version='1.0' encoding='utf-8'?>
<rss version='2.0'>
<channel>
<language>zh-cn</language>
<language>zh-cn</language>
<title><![CDATA[有货逛]]></title>
<link><![CDATA[http://yohobuy.com]]></link>
<description><![CDATA[Yoho!Buy有货 | 年轻人潮流购物中心]]></description>
... ... @@ -17,13 +17,13 @@
{{# items}}
<item>
<title><![CDATA[{{title}}]]></title>
<link><![CDATA[{{{url}}}&ref=rss]]></link>
<link><![CDATA[{{{url}}}]]></link>
<description><![CDATA[{{{intro}}}]]></description>
<pubDate><![CDATA[{{publishTime}}]]></pubDate>
<source><![CDATA[有货逛]]></source>
<author>有货</author>
</item>
{{/items}}
</channel>
</rss>
\ No newline at end of file
</rss>
... ...
{
"name": "yohobuywap-node",
"version": "6.5.34",
"version": "6.5.35",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
... ... @@ -21,6 +21,7 @@ let $useCoupon = $('#useCoupon');
let $notUseCoupon = $('#notUseCoupon');
let winH = $(window).height();
let linkUrl = document.referrer;
require('common');
require('cart/cartbuynow/select-coupon');
... ... @@ -40,7 +41,11 @@ function fixedLayOut() {
}
function goToBack() {
history.go(-1);
if (linkUrl) {
window.location.href = linkUrl;
} else {
history.go(-1);
}
}
/**
... ...
... ... @@ -20,6 +20,7 @@ let $useCoupon = $('#useCoupon');
let $notUseCoupon = $('#notUseCoupon');
let winH = $(window).height();
let linkUrl = document.referrer;
require('common');
require('cart/cartbuynow/select-coupon');
... ... @@ -39,7 +40,11 @@ function fixedLayOut() {
}
function goToBack() {
history.go(-1);
if (linkUrl) {
window.location.href = linkUrl;
} else {
history.go(-1);
}
}
/**
... ... @@ -88,6 +93,7 @@ $useCoupon.on('click', function() {
}
orderInfo('couponCode', couponCodeArray.join(','));
if (couponCodeArray.length > 0) {
goToBack();
} else {
... ...