Authored by lore-w

后台联调,商品数据结构增加字段

<div class="good-info" data-skn="{{skn}}">
<div class="good-info" data-skn="{{skn}}" data-id="{{id}}">
<div class="tag-container clearfix">
{{# tags}}
{{# isNew}}
... ...
... ... @@ -45,7 +45,7 @@
</h2>
<ul>
{{#each list}}
<li class="product-list-nav">
<li class="product-list-nav {{#if active}}active{{/if}}">
<h3>
<span class="icon-triangle"></span>
{{name}}
... ... @@ -53,7 +53,7 @@
</h3>
<ul class="sort-child-list">
{{#each childList}}
<li>
<li class="{{#if childActive}}active{{/if}}">
<a href="{{href}}">{{name}}</a>
<span>{{num}}</span>
</li>
... ...
... ... @@ -92,9 +92,12 @@ exports.init = function(num) {
display: 'none'
});
$.ajax({
type: 'GET',
type: 'post',
url: '/product/index/productColor',
dataType: 'json'
dataType: 'json',
data: {
id: $goodItem.attr('data-id')
}
}).then(function(data) {
ulStr = createColorList(data).colorListStr; //ajax请求的颜色列表
... ...
... ... @@ -58,9 +58,9 @@
}
}
}
/*ul.sort-child-list {
ul.sort-child-list {
display: block;
}*/
}
}
}
... ... @@ -73,6 +73,15 @@
li {
color: #bbb;
&.active {
background: #333;
color: #fff;
a {
color: #fff;
}
}
span {
padding-left: 5px;
}
... ...
... ... @@ -322,7 +322,9 @@ class IndexController extends AbstractAction
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899',
'isFew' => true
'isFew' => true,
'skn' => 111,
'id' => 123
),
1 => array(
'tags' => array(
... ... @@ -333,7 +335,9 @@ class IndexController extends AbstractAction
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899',
'showColBtn' => true
'showColBtn' => true,
'skn' => 111,
'id' => 123
),
2 => array(
'tags' => array(
... ... @@ -728,7 +732,9 @@ class IndexController extends AbstractAction
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899',
'isFew' => true
'isFew' => true,
'skn' => 111,
'id' => 123
),
array(
'tags' => array(
... ... @@ -790,6 +796,7 @@ class IndexController extends AbstractAction
array(
'name' => '裙装',
'num' => '10',
'active' => true,
'childList' => array(
array(
'name' => '全身裙装',
... ... @@ -799,7 +806,8 @@ class IndexController extends AbstractAction
array(
'name' => '全身裙装',
'href' => 'http://adidas.yohobuy.com/?gender=1,3',
'num' => '5'
'num' => '5',
'childActive' => true
),
array(
'name' => '全身裙装',
... ...