Authored by 王水玲

mip修改

... ... @@ -32,12 +32,14 @@ exports.index = (req, res, next) => {
return res.render('chanpin', Object.assign({
css: yield css('chanpin.css'),
commonCss: yield css('common.css'),
title: `${goodsList.name}价格_图片_品牌_怎么样-YOHO!BUY有货`,
mipUrl: `https://m.yohobuy.com${req.originalUrl}`,
mipFooter: true,
canonical: {
currentHref: `https://www.yohobuy.com/chanpin/${req.params.id}.html`
}
},
pageTitle: goodsList.name
}, goodsList));
})().catch(next);
};
... ...
... ... @@ -28,7 +28,7 @@ const mipDate = (day) => {
* [处理品牌数据]
* @param {[array]} getBrand [品牌原数据]
*/
const _relatedBrand = (getBrand, isApp) => {
const _relatedBrand = (getBrand, isApp, isMip) => {
let relatedBrand = getBrand;
relatedBrand.forEach(brand => {
... ... @@ -37,6 +37,10 @@ const _relatedBrand = (getBrand, isApp) => {
if (isApp) {
brand.url = brand.url + '?openby:yohobuy={"action":"go.brand","params":{"brand_id":"' + brand.id + '"}}';
}
if (isMip) {
brand.url += '?union_type=100000000013130';
}
});
return relatedBrand;
... ... @@ -160,7 +164,7 @@ const detailIndex = (req, res, next) => {
// guang双头部的问题 20160601
// 正确的URL
let url = `${detail.getAuthor.url}&openby:yohobuy={"action":"go.h5","params":{"param":{},"share":"","id":${detail.getAuthor.author_id},"type":0,"islogin":"N","url":"${detail.getAuthor.url}"}}`; // eslint-disable-line
let url = `${detail.getAuthor.url}&union_type=100000000013130&openby:yohobuy={"action":"go.h5","params":{"param":{},"share":"","id":${detail.getAuthor.author_id},"type":0,"islogin":"N","url":"${detail.getAuthor.url}"}}`; // eslint-disable-line
data.guang.author.url = helpers.https(url);
}
... ... @@ -190,11 +194,11 @@ const detailIndex = (req, res, next) => {
let goodsList = yield req.ctx(DetailModel).productInfoBySkns(processContents.allgoods);
guang.detail.content = guangProcess.pushGoodsInfo(processContents.finalDetail, goodsList, isApp);
guang.detail.content = guangProcess.pushGoodsInfo(processContents.finalDetail, goodsList, isApp, isMip);
// 相关品牌
if (detail.getBrand && detail.getBrand.length) {
guang.relatedBrand = _relatedBrand(detail.getBrand, isApp);
guang.relatedBrand = _relatedBrand(detail.getBrand, isApp, isMip);
}
// 相关标签
... ... @@ -209,6 +213,7 @@ const detailIndex = (req, res, next) => {
return res.render('guang/detail', Object.assign({
css: yield css('guang/detail.css'),
commonCss: yield css('common.css'),
gender: gender,
localStyle: processContents.css,
title: detail.getArticle.article_title + '_潮流资讯-YOHO!BUY有货',
... ... @@ -221,7 +226,9 @@ const detailIndex = (req, res, next) => {
pic: mipPic,
des: detail.getArticle.article_summary,
url: `${req.protocol}://m.yohobuy.com${req.originalUrl}`,
}
},
pageTitle: '逛',
appPath: `openby:yohobuy{"action":"go.h5","params":{"id":"${id}","share":"/guang/api/v1/share/guang?id=${id}","shareparam":{"id":"${id}"},"islogin":"N","type":1,"url":"http://guang.m.yohobuy.com/info/index","param":{"id":"${id}"}}}`
}, data));
})().catch(next);
};
... ...
... ... @@ -32,12 +32,14 @@ exports.index = (req, res, next) => {
return res.render('hot', Object.assign({
css: yield css('chanpin.css'),
commonCss: yield css('common.css'),
title: `${goodsList.name}_${goodsList.name}【图片,新款,价格,折扣,搭配】-YOHO!BUY有货`,
mipUrl: `https://m.yohobuy.com${req.originalUrl}`,
mipFooter: true,
canonical: {
currentHref: `https://www.yohobuy.com/hot/${req.params.id}.html`
}
},
pageTitle: goodsList.name
}, goodsList));
})().catch(next);
};
... ...
... ... @@ -17,13 +17,19 @@ exports.index = (req, res, next) => {
let mipPic = _.get(detailData, 'baseInfo.goods_list[0].images_list[0].image_url');
let mipDes = _.get(detailData, 'baseInfo.phrase');
let miptitle = _.get(detailData, 'baseInfo.product_name');
let appParams = {product_skn: _.get(detailData, 'baseInfo.product_skn')};
let appPath = 'openby:yohobuy={"action":"go.productDetail","params":' +
JSON.stringify(appParams) +
'}';
if (!_.get(detailData, 'baseInfo.product_skn')) {
return next();
}
return res.render('product/detail', Object.assign(detailData, {
title: `${detailData.title}-YOHO!BUY有货`,
css: yield css('product/detail.css'),
commonCss: yield css('common.css'),
localStyle: detailData.mipCss,
mipFooter: true,
canonical: {
... ... @@ -35,7 +41,9 @@ exports.index = (req, res, next) => {
pic: mipPic,
des: mipDes,
publishTime: ''
}
},
pageTitle: '商品详情',
appPath: appPath
}));
})().catch(next);
};
... ...
.top-downloadbar {
display: block;
height: 45px;
background: rgba(68, 68, 68, .95);
width: 100%;
padding: 3px 0;
position: relative;
box-sizing: content-box;
}
.top-downloadbar .download-close {
margin-left: 5px;
width: 14px;
height: 14px;
}
.top-downloadbar .download-close,
.top-downloadbar .download-icon {
position: absolute;
top: 50%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
background-size: cover;
}
.top-downloadbar .download-icon {
width: 40px;
height: 40px;
left: 24px;
}
.top-downloadbar .download-text {
position: absolute;
top: 50%;
-webkit-transform: translateY(-90%);
transform: translateY(-90%);
left: 70px;
color: #fff;
font-size: 12px;
}
.top-downloadbar-wechat .download-text {
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
}
.top-downloadbar .download-text-desc {
position: absolute;
top: 50%;
-webkit-transform: translateY(-16%) scale(0.5);
transform: translateY(-16%) scale(0.5);
-webkit-transform-origin: left center;
transform-origin: left center;
left: 70px;
color: #c7c7c7;
font-size: 20px;
}
.top-downloadbar .download-go {
right: 10px;
background: red;
}
.top-downloadbar .download-go,
.top-downloadbar .download-go-wechat {
position: absolute;
top: 50%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
font-size: 12px;
padding: 0 7px;
height: 23px;
line-height: 23px;
border-radius: 3px;
color: #fff;
text-decoration: none;
}
.top-downloadbar .download-go-wechat {
right: 94px;
background: #000;
}
.top-downloadbar .download-wechat,
.top-downloadbar .mini-app-open {
position: absolute;
top: 50%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
right: 7px;
font-size: 12px;
padding: 0 7px;
height: 23px;
line-height: 23px;
border-radius: 3px;
background: red;
color: #fff;
text-decoration: none;
}
.mip-nav-wrapper {
position: relative;
z-index: 20;
width: 100%;
height: 45px;
background-image: linear-gradient(#323232,#414141);
line-height: 45px;
}
.mip-nav-wrapper .navbar-brand {
color: #fff;
font-weight: 700;
font-size: 18px;
margin: 0;
text-align: center;
height: auto;
right: 50%;
transform: translate(50%, 0);
}
.mip-nav-wrapper .navbar-header {
text-align: center;
height: 45px;
float: right;
box-sizing: border-box;
}
.mip-nav-wrapper #bs-navbar {
width: 140px;
position: absolute;
top: 40px;
right: 6px;
z-index: 2;
overflow: hidden;
color: #fff;
background-size: 100% 100%;
background-color: transparent;
left: auto;
}
.mip-nav-wrapper #bs-navbar .navbar-nav {
overflow: hidden;
width:140px;
height: 169px;
min-height: 169px;
padding: 1px 0;
border-radius: 5px;
background-image: linear-gradient(#434343, #171717);
position: relative;
z-index: 2;
margin-top: 8px;
display: block;
}
.mip-nav-wrapper #bs-navbar .navbar-nav a {
text-align: center;
color: #333;
font-size: 18px;
padding: 0;
margin: 0 auto;
display: block;
}
.mip-nav-wrapper .home-icon {
width: 16px;
height: 16px;
background: url("//cdn.yoho.cn/yohobuywap-node/6.4.0/img/product/home.png") no-repeat;
background-size: contain;
float: left;
margin: 14px 20px 0 0;
}
.mip-nav-wrapper .shopping-icon {
width: 16px;
height: 16px;
background: url("//cdn.yoho.cn/yohobuywap-node/6.4.0/img/product/shopping-card.png") no-repeat;
background-size: contain;
float: left;
margin: 14px 20px 0 0;
}
.mip-nav-wrapper .mine-icon {
width: 16px;
height: 16px;
background: url("//cdn.yoho.cn/yohobuywap-node/6.4.0/img/product/mine.png") no-repeat;
background-size: contain;
float: left;
margin: 14px 20px 0 0;
}
.mip-nav-wrapper .shopping-card-icon {
width: 16px;
height: 16px;
background: url("//cdn.yoho.cn/yohobuywap-node/6.4.0/img/product/shopping.png") no-repeat;
background-size: contain;
float: left;
margin: 14px 20px 0 0;
}
.mip-nav-wrapper .ul-arr {
width: 20px;
height: 20px;
position: absolute;
top: 0;
right: 16px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
background-color: #434343;
z-index: 1;
}
.mip-nav-wrapper li {
float: left;
overflow: hidden;
width: 100%;
height: 42px;
line-height: 42px !important;
position: relative;
padding: 0 0 0 20px!important;
}
.mip-nav-wrapper .navbar-toggle {
display: block;
margin: 8px 0;
padding: 5px;
border: 0;
background: transparent;
float: right;
}
.mip-nav-wrapper .sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
.mip-nav-wrapper #bs-navbar .navbar-nav span {
display: block;
float: left;
font-size: 14px;
color: #fff;
width: 90px;
height: 41px;
border-bottom: solid 1px #444;
text-align: left;
margin: 0;
padding: 0 0 0 10px;
}
.mip-nav-wrapper #bs-navbar .navbar-nav span:focus {
color: #fff;
}
.mip-nav-wrapper #bs-navbar .navbar-nav span:hover {
color: #fff;
}
.mip-nav-wrapper #bs-navbar .navbar-nav li:last-child span {
border-bottom: none;
}
.mip-nav-wrapper .navbar-toggle {
width: 25px;
height: 21px;
outline: none !important;
background: url("//cdn.yoho.cn/yohobuywap-node/6.4.0/img/product/nav.png") no-repeat;
background-size: contain;
margin: 12px;
}
.mip-nav-wrapper .navbar-toggle .icon-bar {
display: none;
}
.mip-appdl-box {
background: rgba(68,68,68,.95) !important;
}
.mip-appdl-downimg {
width: 40px;
height: 40px;
}
.mip-appdl-downbtn {
border: none !important;
height: 23px !important;
line-height: 23px !important;
}
.mip-appdl-downbtn a {
background: red;
color: #fff;
border-radius: 3px !important;
}
.mip-appdl-box {
height: 50px !important;
}
.mip-appdl-imgbox {
top: 6px !important;
}
.mip-appdl-textbox {
top: 8px !important;
}
.mip-appdl-downbtn {
top: 15px !important;
}
\ No newline at end of file
... ...
... ... @@ -355,3 +355,46 @@
transform: scale(0.5, 0.5);
margin: 0;
}
.recommend-products-box {
height: 102px;
margin: 15px 0;
overflow-x: scroll;
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
}
.recommend-products-box .recommend-products-content {
height: 102px;
overflow-y: hidden;
display: inline-flex;
background-color: #fff;
}
.recommend-products-box .recommend-goods {
width: 76px;
height: 102px;
margin: 0 15px 0 0;
float: left;
position: relative;
overflow: hidden;
}
.recommend-products-box img {
width: 76px;
height: 102px;
margin: 0;
}
.recommend-products-box .recommend-goods-cover {
width: 76px;
height: 15px;
line-height: 16px;
font-size: 12px;
color: #fff;
background-color: rgba(0, 0, 0, 0.6);
text-align: center;
position: absolute;
bottom: 0;
padding: 2px 0;
}
\ No newline at end of file
... ...
... ... @@ -1014,4 +1014,4 @@
.mip-footer .mip-gototop {
display: inline !important;
}
/* 底部结束 */
/* 底部结束 */
\ No newline at end of file
... ...
... ... @@ -184,7 +184,7 @@ class ProductDetail extends global.yoho.BaseModel {
let skn = $(value).closest('.good-info').data('id');
if (skn) {
href = `${params.protocol}://m.yohobuy.com/mip/product/${skn}.html`;
href = `//m.yohobuy.com/product/${skn}.html?union_type=100000000013130`;
}
$(value).attr('href', href);
});
... ...
<div class="good-list-page search-page yoho-page">
{{> mip-head}}
{{> mip-product-list}}
{{> mip-footer}}
</div>
... ...
{{> mip-download}}
{{> mip-head}}
<div class="guang-detail-c">
{{# guang}}
{{# author}}
... ... @@ -84,6 +86,22 @@
{{/each}}
</div>
{{/if}}
{{#if collocation}}
<div class="recommend-products-box">
<div class="recommend-products-content">
{{#each collocation}}
<div class="recommend-goods">
<a href="{{url}}">
<mip-img class="pic" width="100" height="134" src="{{image2 src w=152 h=204}}">
</mip-img>
</a>
<p class="recommend-goods-cover">&yen;{{sales_price}}</p>
</div>
{{/each}}
</div>
</div>
{{/if}}
{{/ content}}
</div>
{{/ detail}}
... ... @@ -129,7 +147,7 @@
<div class="related-info">
{{# relatedInfo}}
<div class="info-item">
<a data-type="mip" data-title="{{title}}" href="//m.yohobuy.com/mip/guang/{{id}}.html">
<a data-type="mip" data-title="{{title}}" href="//m.yohobuy.com/guang/{{id}}.html?union_type=100000000013130">
<div class="pic">
<mip-img class="pic-mip" width="117" height="73" src="{{thumb}}">
</mip-img>
... ... @@ -146,7 +164,7 @@
{{#if relatedTag}}
<div class="brand-tag">
{{# relatedTag}}
<a href="//guang.m.yohobuy.com/tags/index?query={{name}}" class="tag">{{name}}</a>
<a href="//guang.m.yohobuy.com/tags/index?union_type=100000000013130&query={{name}}" class="tag">{{name}}</a>
{{/ relatedTag}}
</div>
{{/if}}
... ...
<div class="good-list-page search-page yoho-page">
{{> mip-head}}
{{> mip-product-list}}
{{> mip-footer}}
</div>
... ...
{{> mip-download}}
{{> mip-head}}
<div class="detail-page yoho-page">
{{# baseInfo}}
<div class="banner-pic">
... ...
<div class="top-downloadbar" m-bind:data-clicked="closeDownload">
<mip-img
on="tap:MIP.setData({closeDownload:!m.clicked})"
layout="responsive"
class="download-close"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNAay06AAAAWUSURBVFiFzZhPTxNdFIefC1iJIq2ZTjG2I7QlKRQQS4IrNLrQIWrFho3GhS7dGL/C+zHcGhewM4qSlh0JK6mCiW2JsWBs6x/qiFQxUGznXWBHSmlpQd68v+2ce+8z5957zj1H+P1+nf+hGnYzyGKx4Ha7URQFWZYxm82YTCYAstksy8vLpNNpEokE8Xicb9++1byGqNZjQgi8Xi/9/f04HA6EEADouk4mk2FtbQ2AgwcP0tzcXPQ9mUwyPT1NNBpF16vboKo85nK5UFUVq9UKQDKZZG5ujoWFBdLpNLlcrsi+vr4eWZZxOp10dHSgKAqKonD27FlCoRDz8/M7O6KSxxoaGlBVlb6+PnRdJxqNMjU1xeLiYjX/Y8hmszEwMIDX60UIwcuXLwmFQvz69at2sEOHDnHjxg2OHz/O169fefLkCYlEoiagrVIUBb/fjyRJfPjwgZGREX7+/Lmtbb3H4/lnO6jbt2/T0tJCLBZjZGSEpaWlPUEBZDIZXr16hSRJuFwuPB4PkUi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C5dukRXVxepVIpgMFhiUwK2vr7O6OioUb0MDw//1W01mUwMDw/T19eHpmmMjo5WV/AW4CKRCE6n02iMfP78mUwmsycoRVG4fv06ra2tfPz4kYcPH5ZtEfwnTRVZljlz5szfaapslsvlYnBwEEmSgI20EYvFePfuXcU2VFtbGx6PB0VREEKgaRrBYHDvbagiw9+Nu9OnT2O3241Lkc/n+f79e1Hj7siRI0UvlULjLhKJVF3dVw22WRaLhfb2dk6cOIEkSdu2OjVN4/3797x9+3Z/W53/tf4F/0jgMDtkmrEAAAAASUVORK5CYII="
>
</mip-img>
<mip-img
layout="responsive"
class="download-icon"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAABGCAYAAABxLuKEAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNAay06AAABA1SURBVHic7Zx5bFTV28c/996Z6XTolO4bbaFAoIVSWiw7+HMDIQQRRFQCxrBEIbIYC4gSFFCjaILIloASoSzGFcFUFquISABBQSpbaQNtKdCZ6XSZzpTZ7vtHnfu2zNKhCqj4TfrHnHuW53zvOc95lnMrjB49WqYVuFwuGhsbuX79Ok6nE5fLhSy32uxvAUEQEEURlUpFSEgIWq0WlUrVaruANex2Ow0NDVit1r9M0NsNWZZxu904nU4aGxupra0lNDSUdu3aERIS4redX2Jqa2uxWCy3RNg7DZvNhs1mQ6fTERkZ6bOOFzFutxuTyYTdbr/lAt5pWK1W7HY70dHRXttLbP7D7XZTVVV1V5DigdPppKqqCpfL1aK8BTFGo9Grwt0AWZYxGAwtyhRiamtrcTgct12ovwtcLhcmk0n5rQJwOBzU19ffMaH+LrDZbNjtdjQaTdOK+Y+U/0dNTQ0Aotvt/kfbKX817HY7DocD8T9SvNHQ0IB4/fr1Oy3H3w52ux3V3XgSSZJEfX091dXVAISFhREVFYUsy8iyjMvlQvVPcgj/CqjVai5evEhqairjxo1DkiROnDjBkSNH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2+2YTCbFgm0+ieTkZKVPX/C4Hp07d6aoqIiGhgagKWupVquDPjBEUcRms2E0GhFFkenTp1NXV8cnn3xChw4dfJ5IkiQhpKSkBE2MZ5Abk+BarZbQ0FCfK6+57yIIAiqVKqhbVpIk0dDQQE1NDREREYqCbitEUaSxsVHJTHi2nL+xheTk5KCJuVsgSRKqQJGsuxVut/vPXWf9N0MlSZLfvXa3QhRFVFqt1ueNorsZKpUKVXh4OGaz+U7L8rdCu3btUEVHRyv53P/QhNjYWFQhISFERET8t2r+gE6nQ6/XN51KKSkpSlDpbkdaWhrwx61NvV5PTEwMVVVVd1SoO43w8HDlMqbiXaenp990euPfBJVKRWZmpvK7RdghKyvrL//W6J+C3r17t0i1tCBGq9XSp08fv9c5/o3QaDTk5OR4XWnzClSFhoZyzz33EBsbe9uEu1OIjIykT58+PpOFPrMEoiiSkZFBQkICFRUV/7qjPDw8nOTkZK8vZ5ojYPokMjKSyMhI6urqMJlM1NXVKf/A65/ieHpiQBqNBr1eT3R0dFCfAfwfkRV6AFYsdF8AAAAASUVORK5CYII="
>
</mip-img>
<span class="download-text">Yoho!Buy有货</span>
<p class="download-text-desc">新用户送惊喜礼包</p>
<a class="download-go" id="download-go" href='https://union.yoho.cn/union/app-downloads.html?union_type=100000000013134&{{appPath}}'>立即打开</a>
</div>
\ No newline at end of file
... ...
<div class="mip-footer-fixed">
<div class="mip-footer">
<div class="option">
<a href="//m.yohobuy.com/signin.html" class="login">登录</a>
<a href="//m.yohobuy.com/reg.html" class="reg">注册</a>
<a href="//m.yohobuy.com/signin.html?union_type=100000000013130" class="login">登录</a>
<a href="//m.yohobuy.com/reg.html?union_type=100000000013130" class="reg">注册</a>
<mip-fixed class="mip-fixed" type="gototop">
<mip-gototop class="mip-gototop">
<span class="back-to-top">回到顶部<span></span></span>
... ...
<div class="mip-nav-wrapper">
<mip-nav-slidedown
data-id="bs-navbar"
class="mip-element-sidebar container"
data-showbrand="1"
data-brandname="{{pageTitle}}">
<nav id="bs-navbar" class="navbar-collapse collapse navbar navbar-static-top">
<div class="ul-arr"></div>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="//m.yohobuy.com/?union_type=100000000013130&go=1"><i class="home-icon"></i><span>首页</span></a>
</li>
<li>
<a href="//m.yohobuy.com/cate?union_type=100000000013130"><i class="shopping-card-icon"></i><span>分类</span></a>
</li>
<li>
<a href="//m.yohobuy.com/cart/index/index?union_type=100000000013130"><i class="shopping-icon"></i><span>购物车</span></a>
</li>
<li>
<a href="//m.yohobuy.com/home?union_type=100000000013130"><i class="mine-icon"></i><span>我的</span></a>
</li>
</ul>
</nav>
</mip-nav-slidedown>
</div>
\ No newline at end of file
... ...
... ... @@ -2,7 +2,7 @@
<div class="word-content">
<div class="list-too-little">
{{# fuzzyWord}}
<span class="word"><a data-type="mip" href="{{link}}">{{name}}</a></span>
<span class="word"><a data-type="mip" href="{{link}}?union_type=100000000013130">{{name}}</a></span>
{{/ fuzzyWord}}
</div>
</div>
... ... @@ -33,8 +33,8 @@
{{/each}}
</div>
<div class="good-detail-img">
<a class="good-thumb" href="//m.yohobuy.com/product/{{productSkn}}.html">
<mip-img src="{{image defaultImages 235 314}}"></mip-img>
<a class="good-thumb" href="//m.yohobuy.com/product/{{productSkn}}.html?union_type=100000000013130">
<mip-img src="{{image2 defaultImages w=235 h=314}}"></mip-img>
</a>
{{!-- {{log isSoonSoldOut}} --}}
{{#if isSoonSoldOut}}
... ... @@ -49,7 +49,7 @@
</div>
<div class="good-detail-text">
<div class="name">
<a href="//m.yohobuy.com/product/{{productSkn}}.html">{{productName}}</a>
<a href="//m.yohobuy.com/product/{{productSkn}}.html?union_type=100000000013130">{{productName}}</a>
</div>
<div class="price">
{{#if @root.saleViplogin}}
... ...
... ... @@ -13,10 +13,10 @@ const isTest = process.env.NODE_ENV === 'test';
const domains = {
// api: 'http://api.yoho.cn/',
// service: 'http://service.yoho.cn/',
// liveApi: 'http://testapi.live.yohops.com:9999/',
// singleApi: 'http://api-test3.yohops.com:9999/',
api: 'http://api.yoho.cn/',
service: 'http://service.yoho.cn/',
liveApi: 'http://testapi.live.yohops.com:9999/',
singleApi: 'http://api-test3.yohops.com:9999/',
// gray
// api: 'http://apigray.yoho.cn/',
... ... @@ -24,10 +24,10 @@ const domains = {
// platformApi: 'http://172.16.6.210:8088/',
api: 'http://api-test3.dev.yohocorp.com/',
service: 'http://api-test3.dev.yohocorp.com/',
liveApi: 'http://testapi.live.yohops.com:9999/',
singleApi: 'http://api-test3.dev.yohocorp.com/',
// api: 'http://api-test3.dev.yohocorp.com/',
// service: 'http://api-test3.dev.yohocorp.com/',
// liveApi: 'http://testapi.live.yohops.com:9999/',
// singleApi: 'http://api-test3.dev.yohocorp.com/',
imSocket: 'ws://socket.yohobuy.com:10240',
imCs: 'http://im.yohobuy.com/api',
... ... @@ -49,7 +49,7 @@ module.exports = {
testCode: 'yoho4946abcdef#$%&!@',
domains: domains,
// yohoVerifyUdid: '0f626ede-0e17-460b-a8ea-069ee506e8e9',
yohoVerifyUdid: 'ca5c462a-e28b-407d-8061-5e204398e3cc',
signExtend: {
business_line: 'yohobuy'
},
... ...
... ... @@ -11,8 +11,21 @@
<style mip-custom>
.main-wrap{width: 100%;max-width: 750px;margin: 0 auto;}
{{css}}
{{commonCss}}
{{localStyle}}
</style>
<style mip-custom>
[data-clicked=true] {
display: none;
}
</style>
<mip-data>
<script type="application/json">
{
"closeDownload": false
}
</script>
</mip-data>
{{> ld-json}}
</head>
<body>
... ... @@ -24,6 +37,8 @@
<script src="https://mipcache.bdstatic.com/static/v1/mip-anim/mip-anim.js"></script>
<script src="https://mipcache.bdstatic.com/static/v1/mip-audio/mip-audio.js"></script>
<script src="https://mipcache.bdstatic.com/extensions/platform/v1/mip-cambrian/mip-cambrian.js"></script>
<script src="https://c.mipcdn.com/static/v1/mip-nav-slidedown/mip-nav-slidedown.js"></script>
<script src="https://c.mipcdn.com/static/v1/mip-bind/mip-bind.js"></script>
{{#if mipFooter}}
<script src="https://mipcache.bdstatic.com/static/v1/mip-gototop/mip-gototop.js"></script>
{{/if}}
... ...
... ... @@ -411,12 +411,16 @@ const processArticleDetail = (articleContent, isApp, gender, isWeixin, isqq, isW
}
});
collocation.push({
thumb: cover ?
helpers.image(cover.cover, 235, 314) : '',
type: cover ? getProductIcon(cover.maxSortId) : '',
goods: _.get(item, 'list', [])
});
if (isMip) {
collocation = _.concat(collocation, _.get(item, 'list', []));
} else {
collocation.push({
thumb: cover ?
helpers.image(cover.cover, 235, 314) : '',
type: cover ? getProductIcon(cover.maxSortId) : '',
goods: _.get(item, 'list', [])
});
}
});
finalDetail.push({
... ... @@ -441,6 +445,10 @@ const processArticleDetail = (articleContent, isApp, gender, isWeixin, isqq, isW
_.forEach(recommendProducts, (goods, goodsKey) => {
recommendProducts[goodsKey].price = parseFloat(goods.sales_price).toFixed(2);
recommendProducts[goodsKey].href = isApp ? `http://m.yohobuy.com/product/${goods.product_skn}.html?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"${goods.product_skn}"}}` : `//m.yohobuy.com/product/${goods.product_skn}.html`;
if (isMip) {
recommendProducts[goodsKey].href = `//m.yohobuy.com/product/${goods.product_skn}.html?union_type=100000000013130`;// eslint-disable-line
}
});
// 全球购商品
... ... @@ -491,7 +499,7 @@ const processArticleDetail = (articleContent, isApp, gender, isWeixin, isqq, isW
/**
* 重新获取商品数据
*/
const pushGoodsInfo = (finalDetail, goodsList, isApp) => {
const pushGoodsInfo = (finalDetail, goodsList, isApp, isMip) => {
let goodsObj = _goodsArrayToObj(productPrcs.processProductList(goodsList, { isApp: isApp }));
_.forEach(finalDetail, (value, key) => {
... ... @@ -507,6 +515,10 @@ const pushGoodsInfo = (finalDetail, goodsList, isApp) => {
_.forEach(goodsIds, (item, subKey) => {
if (goodsObj[item]) {
if (isMip) {
goodsObj[item].url += '?union_type=100000000013130';
}
finalDetail[key].relatedReco.goods[subKey] = goodsObj[item];
} else {
delete finalDetail[key].relatedReco.goods[subKey];
... ... @@ -523,13 +535,35 @@ const pushGoodsInfo = (finalDetail, goodsList, isApp) => {
}
if (value.collocation) {
_.forEach(value.collocation, (item, subKey) => {
_.forEach(item.goods, (thItem, thKey) => {
if (thItem) {
finalDetail[key].collocation[subKey].goods[thKey] = goodsObj[thItem.id];
if (isMip) {
let newCollocation = [];
_.forEach(value.collocation, (item) => {
if (item && goodsObj[item.id]) {
newCollocation.push({
src: item.src + '?union_type=100000000013130',
url: goodsObj[item.id].url,
sales_price: goodsObj[item.id].sales_price
});
}
});
});
finalDetail[key].collocation = newCollocation;
} else {
_.forEach(value.collocation, (item, subKey) => {
_.forEach(item.goods, (thItem, thKey) => {
if (thItem) {
finalDetail[key].collocation[subKey].goods[thKey] = goodsObj[thItem.id];
if (goodsObj[thItem.id]) {
let newGoods = _.cloneDeep(goodsObj[thItem.id]);
newGoods.default_images = thItem.src;
finalDetail[key].collocation[subKey].goods[thKey] = newGoods;
}
}
});
});
}
}
});
... ...
... ... @@ -135,6 +135,10 @@ module.exports = {
query = query.replace(/imageView\/\d{1}\//, 'imageView/' + params.mode + '/');
}
}
if (query.indexOf('/background') > -1) {
query = query.replace(/(\/background\/[^\/]+\/)/g, '/');
}
} else {
query = 'imageView2/2/interlace/1/q/' + (params.q || 75);
}
... ...