Authored by weiqingting

封面

... ... @@ -413,11 +413,12 @@ $('#fenmianWrap').on("click", ".btn-metro", function () {
var index1 = $(this).parents(".cover-image-item").index();
var list = goodsList[index].goodsImagesList;
var item = goodsList[index].goodsImagesList[index1];
var colorIndex = $(this).index();
var colorIndex = $(this).data("i");
if (colorIndex == 0) {
list.forEach(function (item, index) {
if (index == index1) {
item.isDefault = "Y";
item.genderCover = 0;
} else {
item.isDefault = "N";
}
... ... @@ -426,6 +427,7 @@ $('#fenmianWrap').on("click", ".btn-metro", function () {
list.forEach(function (item, index) {
if (index == index1) {
item.genderCover = colorIndex;
item.isDefault = "N";
} else {
item.genderCover = 0;
}
... ...
... ... @@ -35,24 +35,24 @@
</div>
<div class="cover-color">
[[if _item.isDefault=="Y"]]
<a href="javascript:;" class="btn btn-default btn-metro info">默认</a>
<a href="javascript:;" class="btn btn-default btn-metro info" data-i="0">默认</a>
[[else]]
<a href="javascript:;" class="btn btn-default btn-metro">默认</a>
<a href="javascript:;" class="btn btn-default btn-metro" data-i="0">默认</a>
[[/if]]
[[if gender==1||gender==3]]
[[if _item.genderCover==1||_item.genderCover==3]]
<a href="javascript:;" class="btn btn-default btn-metro info">男封</a>
<a href="javascript:;" class="btn btn-default btn-metro info" data-i="1">男封</a>
[[else]]
<a href="javascript:;" class="btn btn-default btn-metro">男封</a>
<a href="javascript:;" class="btn btn-default btn-metro" data-i="1">男封</a>
[[/if]]
[[/if]]
[[if gender==2||gender==3]]
[[if _item.genderCover==2||_item.genderCover==3]]
<a href="javascript:;" class="btn btn-default btn-metro info">女封</a>
<a href="javascript:;" class="btn btn-default btn-metro info" data-i="2">女封</a>
[[else]]
<a href="javascript:;" class="btn btn-default btn-metro">女封</a>
<a href="javascript:;" class="btn btn-default btn-metro" data-i="2">女封</a>
[[/if]]
[[/if]]
</div>
... ...