Authored by ccbikai(👎🏻🍜)

Merge branch 'release/couponcenter'

@@ -7,9 +7,7 @@ const _ = require('lodash'); @@ -7,9 +7,7 @@ const _ = require('lodash');
7 const helpers = global.yoho.helpers; 7 const helpers = global.yoho.helpers;
8 const crypto = global.yoho.crypto; 8 const crypto = global.yoho.crypto;
9 9
10 -const SUB_DOMAIN = '.dev.yohobuy.com',  
11 - OLD_MAIN = '//m.yohobuy.com',  
12 - SITE_MAIN = '//m.dev.yohobuy.com'; 10 +const SITE_MAIN = '//m.yohobuy.com';
13 11
14 /** 12 /**
15 * 仿php的strrpos 13 * 仿php的strrpos
@@ -60,7 +58,8 @@ const getShare = (code, shareTitle, shareDesc, shareImg) => { @@ -60,7 +58,8 @@ const getShare = (code, shareTitle, shareDesc, shareImg) => {
60 * 过滤app的url 58 * 过滤app的url
61 */ 59 */
62 const _getFilterUrl = url => { 60 const _getFilterUrl = url => {
63 - url = url.replace('.m.yohobuy.com', SUB_DOMAIN).replace(OLD_MAIN, SITE_MAIN).replace('www.yohobuy.com', SITE_MAIN); 61 + url = url.replace('www.yohobuy.com', SITE_MAIN);
  62 +
64 if (strrpos(url, 'm.yohobuy.com') && !strrpos(url, 'sale.m.yohobuy.com') && !strrpos(url, 'cuxiao.m.yohobuy.com') && 63 if (strrpos(url, 'm.yohobuy.com') && !strrpos(url, 'sale.m.yohobuy.com') && !strrpos(url, 'cuxiao.m.yohobuy.com') &&
65 !strrpos(url, 'activity.m.yohobuy.com') && !strrpos(url, 'huodong.m.yohobuy.com') && 64 !strrpos(url, 'activity.m.yohobuy.com') && !strrpos(url, 'huodong.m.yohobuy.com') &&
66 strrpos(url, 'cdn.yoho.cn/myohobuy') && !strrpos(url, '/home/orders/pay')) { 65 strrpos(url, 'cdn.yoho.cn/myohobuy') && !strrpos(url, '/home/orders/pay')) {
@@ -353,4 +352,4 @@ exports.receiveCoupon = (receiveData, uid) => { @@ -353,4 +352,4 @@ exports.receiveCoupon = (receiveData, uid) => {
353 } 352 }
354 return returnData; 353 return returnData;
355 }); 354 });
356 -}; 355 +};