Authored by 毕凯

Merge branch 'gray'

@@ -56,7 +56,7 @@ function droitHtml(contents) { @@ -56,7 +56,7 @@ function droitHtml(contents) {
56 {title: '特权介绍', data: ['金卡及以上会员享受限定次数的免费送达服务。']}, 56 {title: '特权介绍', data: ['金卡及以上会员享受限定次数的免费送达服务。']},
57 {title: '使用说明', data: [ 57 {title: '使用说明', data: [
58 '金卡会员每月可享3次普通快递免邮,白金会员每月可享5次顺丰快递免邮(顺丰无法触达地区将改发其他快递)。', 58 '金卡会员每月可享3次普通快递免邮,白金会员每月可享5次顺丰快递免邮(顺丰无法触达地区将改发其他快递)。',
59 - '免邮次数每月一日更新,会员等级升级时,免邮次数当天更新。', '金卡会员可消耗一次免邮次数将已达到免邮门槛的普通快递订单升级至顺丰快递。']}, 59 + '免邮次数每月一日更新,会员等级升级时,免邮次数当天更新。']},
60 ], 60 ],
61 interlocution: [] 61 interlocution: []
62 }; 62 };
@@ -33,10 +33,9 @@ const index = (req, res, next) => { @@ -33,10 +33,9 @@ const index = (req, res, next) => {
33 }); 33 });
34 34
35 _.forEach(result, item => { 35 _.forEach(result, item => {
36 - item.url = item.url.indexOf('http') >= 0 ? item.url : 'http://' + item.url;  
37 feed.addItem({ 36 feed.addItem({
38 title: item.title, 37 title: item.title,
39 - link: `${item.url}&ref=rss`, 38 + link: `https://m.yohobuy.com/guang/${item.id}.html?ref=rss`,
40 description: item.intro, 39 description: item.intro,
41 author: [{ 40 author: [{
42 name: (item.author && item.author.name) || ' ' 41 name: (item.author && item.author.name) || ' '
@@ -60,7 +59,7 @@ const rss = (req, res, next, gmt) => { @@ -60,7 +59,7 @@ const rss = (req, res, next, gmt) => {
60 return next(); 59 return next();
61 } 60 }
62 _.forEach(result, item => { 61 _.forEach(result, item => {
63 - item.url = item.url.indexOf('http') >= 0 ? item.url : 'http://' + item.url; 62 + item.url = `https://m.yohobuy.com/guang/${item.id}.html?ref=rss`;
64 let time = new Date(item.publishTimeLong && 63 let time = new Date(item.publishTimeLong &&
65 parseFloat(item.publishTimeLong) || moment(item.publishTime, 'MM月DD日 HH:mm')); 64 parseFloat(item.publishTimeLong) || moment(item.publishTime, 'MM月DD日 HH:mm'));
66 let format = gmt ? 'ddd, MM MMM YYYY hh:mm:ss +0800' : 'YYYY-MM-DD hh:mm:ss +0800'; 65 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 { @@ -33,16 +33,16 @@ class RssModel extends global.yoho.BaseModel {
33 if (value.text) { // 文字 33 if (value.text) { // 文字
34 result += htmlProcess.removeHtml(htmlProcess.escapeToHtml(value.text.data.text)) + '<br/>'; 34 result += htmlProcess.removeHtml(htmlProcess.escapeToHtml(value.text.data.text)) + '<br/>';
35 } else if (value.singleImage) { // 单张图 35 } else if (value.singleImage) { // 单张图
36 - result += `<img src="${helpers.image(value.singleImage.data[0].src, 640, 640)}"/><br/>`; 36 + result += `<img src="https:${helpers.image(value.singleImage.data[0].src, 640, 640)}"/><br/>`;
37 } else if (value.smallPic && value.smallPic.data) { // 多张小图 37 } else if (value.smallPic && value.smallPic.data) { // 多张小图
38 value.smallPic.data.forEach((small) => { 38 value.smallPic.data.forEach((small) => {
39 - result += `<img src="${helpers.image(small.src, 315, 420)}"/>`; 39 + result += `<img src="https:${helpers.image(small.src, 315, 420)}"/>`;
40 }); 40 });
41 result += '<br/>'; 41 result += '<br/>';
42 } 42 }
43 }); 43 });
44 44
45 - result += `<a href="http://guang.m.yohobuy.com/info/index?id=${id}">查看原文</a>`; 45 + result += `<a href="https://m.yohobuy.com/guang/${id}.html?ref=rss">查看原文</a>`;
46 return result; 46 return result;
47 } 47 }
48 }); 48 });
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 {{# items}} 17 {{# items}}
18 <item> 18 <item>
19 <title><![CDATA[{{title}}]]></title> 19 <title><![CDATA[{{title}}]]></title>
20 - <link><![CDATA[{{{url}}}&ref=rss]]></link> 20 + <link><![CDATA[{{{url}}}]]></link>
21 <description><![CDATA[{{{intro}}}]]></description> 21 <description><![CDATA[{{{intro}}}]]></description>
22 <pubDate><![CDATA[{{publishTime}}]]></pubDate> 22 <pubDate><![CDATA[{{publishTime}}]]></pubDate>
23 <source><![CDATA[有货逛]]></source> 23 <source><![CDATA[有货逛]]></source>
1 { 1 {
2 "name": "yohobuywap-node", 2 "name": "yohobuywap-node",
3 - "version": "6.5.34", 3 + "version": "6.5.35",
4 "private": true, 4 "private": true,
5 "description": "A New Yohobuy Project With Express", 5 "description": "A New Yohobuy Project With Express",
6 "repository": { 6 "repository": {
@@ -21,6 +21,7 @@ let $useCoupon = $('#useCoupon'); @@ -21,6 +21,7 @@ let $useCoupon = $('#useCoupon');
21 let $notUseCoupon = $('#notUseCoupon'); 21 let $notUseCoupon = $('#notUseCoupon');
22 22
23 let winH = $(window).height(); 23 let winH = $(window).height();
  24 +let linkUrl = document.referrer;
24 25
25 require('common'); 26 require('common');
26 require('cart/cartbuynow/select-coupon'); 27 require('cart/cartbuynow/select-coupon');
@@ -40,7 +41,11 @@ function fixedLayOut() { @@ -40,7 +41,11 @@ function fixedLayOut() {
40 } 41 }
41 42
42 function goToBack() { 43 function goToBack() {
  44 + if (linkUrl) {
  45 + window.location.href = linkUrl;
  46 + } else {
43 history.go(-1); 47 history.go(-1);
  48 + }
44 } 49 }
45 50
46 /** 51 /**
@@ -20,6 +20,7 @@ let $useCoupon = $('#useCoupon'); @@ -20,6 +20,7 @@ let $useCoupon = $('#useCoupon');
20 let $notUseCoupon = $('#notUseCoupon'); 20 let $notUseCoupon = $('#notUseCoupon');
21 21
22 let winH = $(window).height(); 22 let winH = $(window).height();
  23 +let linkUrl = document.referrer;
23 24
24 require('common'); 25 require('common');
25 require('cart/cartbuynow/select-coupon'); 26 require('cart/cartbuynow/select-coupon');
@@ -39,7 +40,11 @@ function fixedLayOut() { @@ -39,7 +40,11 @@ function fixedLayOut() {
39 } 40 }
40 41
41 function goToBack() { 42 function goToBack() {
  43 + if (linkUrl) {
  44 + window.location.href = linkUrl;
  45 + } else {
42 history.go(-1); 46 history.go(-1);
  47 + }
43 } 48 }
44 49
45 /** 50 /**
@@ -88,6 +93,7 @@ $useCoupon.on('click', function() { @@ -88,6 +93,7 @@ $useCoupon.on('click', function() {
88 } 93 }
89 94
90 orderInfo('couponCode', couponCodeArray.join(',')); 95 orderInfo('couponCode', couponCodeArray.join(','));
  96 +
91 if (couponCodeArray.length > 0) { 97 if (couponCodeArray.length > 0) {
92 goToBack(); 98 goToBack();
93 } else { 99 } else {