diff --git a/docs/data-structure.md b/docs/data-structure.md index cc75834..6d8ca92 100644 --- a/docs/data-structure.md +++ b/docs/data-structure.md @@ -1186,9 +1186,15 @@ 'materials' : { 'title' : '商品材质', 'enTitle' : '', - 'img' : '', - 'desc' : '用各种洗涤剂',//remark + list:[ + { + 'img' : '', + 'desc' : '用各种洗涤剂',//remark + } + ... + ] }, + 'washTips' : { 'list' : [ { diff --git a/static/sass/product/_product-description.scss b/static/sass/product/_product-description.scss index ca5dc9c..0f2d2e4 100644 --- a/static/sass/product/_product-description.scss +++ b/static/sass/product/_product-description.scss @@ -18,17 +18,22 @@ } .materials { .detail { - img { - display: block; - overflow: hidden; - width: pxToRem(90px); - height: pxToRem(120px); - padding-right: pxToRem(20px); - float: left; - } - .material-desc { - font-size: pxToRem(24px); - overflow: hidden; + .material-item{ + margin: pxToRem(10px) 0; + // width: 100%; + border-bottom:1px solid $borderC; + img { + display: block; + overflow: hidden; + width: pxToRem(90px); + height: pxToRem(120px); + padding-right: pxToRem(20px); + float: left; + } + .material-desc { + font-size: pxToRem(24px); + overflow: hidden; + } } } .material-type { diff --git a/template/m.yohobuy.com/partials/product/product_description.phtml b/template/m.yohobuy.com/partials/product/product_description.phtml index 55de810..c98cbd0 100644 --- a/template/m.yohobuy.com/partials/product/product_description.phtml +++ b/template/m.yohobuy.com/partials/product/product_description.phtml @@ -74,12 +74,7 @@ {{#list}} {{#if @first}} <div class="swiper-slide first-group" > - <!-- {{#params}} - {{#if @first} - {{else}} - <img class="lazy avatar" data-original="{{param}}" alt=""> - {{/if}} - {{/params}} --> + </div> {{else}} <div class="swiper-slide" > @@ -106,15 +101,20 @@ <span class="en-title">{{enTitle}}</span> </h1> <div class="detail"> - <img class="lazy" data-original="{{img}}" alt=""> - <p class="material-desc"> - {{desc}} - </p> + {{#list}} + <div class="material-item"> + <img class="lazy" data-original="{{img}}" alt=""> + <p class="material-desc"> + {{desc}} + </p> + </div> + {{/list}} </div> - <img class="lazy material-type" data-original="{{materialType}}" alt="" > </div> {{/materials}} + + {{#washTips}} <div class="icons-wrapper washTips page-block"> <ul class="icons-list clearfix">