Authored by 王水玲

mip

... ... @@ -121,7 +121,7 @@ const shop = {
let category = shopPrcs.category(_.get(categoryData, 'data', []), {
shopId: shopId,
domain: domain
});
}, isMip);
let goodsListBySkn = yield req.ctx(listModel).searchProductBySkn(decoratorsAll.skns);
let decorators = shopPrcs.pushGoodsInfo(decoratorsAll.decorators, goodsListBySkn);
... ... @@ -131,10 +131,6 @@ const shop = {
union_type: '100000000013130'
});
if (category.url) {
category.url += '&union_type=100000000013130';
}
let AppRecommendProduct_0 = _.find(decorators, {module_type: 'AppRecommendProduct', type: 0 });
let AppRecommendProduct_1 = _.find(decorators, {module_type: 'AppRecommendProduct', type: 1 });
... ...
... ... @@ -239,7 +239,7 @@ li {
.items-s2 .item {
width: 50%;
height: 187px;
height: 100%;
float: left;
overflow: hidden;
}
... ... @@ -265,7 +265,7 @@ li {
.items-3-2 .item {
width: 50%;
height: 117px;
height: 100%;
}
.items-3-2 .item-info {
... ... @@ -353,7 +353,7 @@ li {
.items-3-3 .item {
float: left;
width: 33.3333333333%;
height: 166px;
height: 100%;
}
.items-3-3 .item-info {
... ... @@ -406,7 +406,7 @@ li {
}
.items-small .item {
height: 125px;
height: 100%;
}
.all-goods {
... ... @@ -484,12 +484,13 @@ li {
border-top: 0;
}
/* .shop-foot-wrapper .sharp {
.shop-foot-wrapper .sharp {
position: absolute;
width: 100%;
height: 10px;
background: resolve("product/sharp.png") no-repeat center center;
} */
height: 5px;
background: url("//cdn.yoho.cn/yohobuywap-node/6.6.30/img/product/sharp.png?165845e2ca5") no-repeat center center;
background-size: contain;
}
.shop-foot-wrapper .foot-list-3 .sub-group {
width: 29%;
... ...
... ... @@ -4,8 +4,8 @@
{{#if category.url}}
<a href="{{category.url}}">商品分类</a>
{{^}}
<span id="shop-category">商品分类</span>
<div class="sub-group hide">
<span id="shop-category" on="tap:MIP.setData({shopCategory:!m.shopCategory})">商品分类</span>
<div class="sub-group hide" m-bind:data-shopCategory="shopCategory">
<dl>
{{# category.list}}
<dd data-bp-id="shop_subgroup_{{name}}_1"><a href="{{url}}">{{name}}</a></dd>
... ...
... ... @@ -42,6 +42,10 @@
[data-filterColorGray=true] {
color: #999 !important;
}
[data-shopCategory=true] {
display: block;
}
</style>
<mip-data>
<script type="application/json">
... ... @@ -52,7 +56,8 @@
"headerClicked": false,
"filterColorBlack1": false,
"filterColorBlack2": false,
"filterColorGray": false
"filterColorGray": false,
"shopCategory": false
}
</script>
</mip-data>
... ...
... ... @@ -314,7 +314,7 @@ const shopIntro = (params) => {
* 店铺分类处理
* @param {*} params
*/
const category = (params, shopParams) => {
const category = (params, shopParams, isMip) => {
let categoryData = {
list: [],
url: ''
... ... @@ -325,17 +325,29 @@ const category = (params, shopParams) => {
}
if (params.length > 6) {
categoryData.url = helpers.urlFormat('/product/index/category', {
let opt = {
shop_id: shopParams.shopId
});
};
if (isMip) {
opt.union_type = '100000000013130';
}
categoryData.url = helpers.urlFormat('/product/index/category', opt);
} else {
_.forEach(params, value => {
let opt = {
shop_id: shopParams.shopId,
sort: (value.relation_parameter && value.relation_parameter.sort) || '',
title: value.category_name
};
if (isMip) {
opt.union_type = '100000000013130';
}
categoryData.list.push({
url: listParamsProcess.generatePathUrl({
shop_id: shopParams.shopId,
sort: (value.relation_parameter && value.relation_parameter.sort) || '',
title: value.category_name
}, `shop/${shopParams.domain}-${shopParams.shopId}`),
url: listParamsProcess.generatePathUrl(opt, `shop/${shopParams.domain}-${shopParams.shopId}`),
name: value.category_name
});
});
... ...