Authored by 张孝茹

guang 链接

... ... @@ -74,7 +74,7 @@ module.exports = {
maxFiles: 7
},
console: {
level: 'info',
level: 'debug',
colorize: 'all',
prettyPrint: true
}
... ...
... ... @@ -21,11 +21,11 @@ module.exports = () => {
}
} else if (req.subdomains.length) {
switch (req.subdomains[0]) {
case 'guang': // 逛
case 'guang':
case 'cdnsrcguang': // CDN 逛 回源地址
req.url = req.url.replace('/guang', '');
req.url = `/guang${req.url}`;
break;
req.url = `//m.yohobuy.com/guang${req.url}`;
return res.redirect(301, req.url);
case 'list': // list
case 'cdnsrclist':// CDN list 回源域名
if (req.path === '/') {
... ...
... ... @@ -12,7 +12,7 @@ exports.getUrlData = function(type, gender) {
const urlData = {
indexUrl: helpers.urlFormat('/?go=1'), // 首页
categoryUrl: helpers.urlFormat('/cate'), // 分类
guangUrl: helpers.urlFormat('', gender ? {gender: gender} : null, 'guang'), // 逛首页
guangUrl: helpers.urlFormat('/guang', gender ? {gender: gender} : null), // 逛首页
shoppingCartUrl: helpers.urlFormat('/cart/index/index'), // 购物车
mineUrl: helpers.urlFormat('/home') // 个人中心
};
... ...
... ... @@ -29,7 +29,7 @@ const getComments = () => {
$.ajax({
type: 'get',
url: '//guang.m.yohobuy.com/guang/info/getComments',
url: '//m.yohobuy.com/guang/info/getComments',
data: {
article_id: article_id,
page: page++
... ...
... ... @@ -83,7 +83,7 @@ const formatArticle = (articleData, showTag, isApp, showAuthor, uid, top) => {
id: articleData.id,
showTags: showTag,
img: articleData.src ? helpers.image(articleData.src, 640, 640) : '',
url: isApp ? `${helpers.https(articleData.url)}&openby:yohobuy={"action":"go.h5","params":{"param":{"id":"${articleData.id}"},"shareparam":{"id":"${articleData.id}"},"share":"/guang/api/v1/share/guang","id":${articleData.id},"type":1,"url":"http:${helpers.urlFormat('/info/index', null, 'guang')}","islogin":"N"}}` : articleData.url, //eslint-disable-line
url: isApp ? `//m.yohobuy.com/guang/info/${articleData.id}.html?openby:yohobuy={"action":"go.h5","params":{"param":{"id":"${articleData.id}"},"shareparam":{"id":"${articleData.id}"},"share":"/guang/api/v1/share/guang","id":${articleData.id},"type":1,"url":"http://m.yohobuy.com/guang/info/${articleData.id}.html","islogin":"N"}}` : `//m.yohobuy.com/guang/info/${articleData.id}.html`, //eslint-disable-line
title: articleData.title,
text: articleData.intro,
publishTime: articleData.publish_time,
... ...