Authored by ccbikai

商品详情页面模板整理

... ... @@ -277,10 +277,11 @@ const _detailDataPkg = (origin, uid, vipLevel, ua) => {
if (_.has(dest, 'feedbacks.consultsNum')) {
consultParams.total = dest.feedbacks.consultsNum;
dest.feedbacks.consultsUrl = helpers.urlFormat('/product/detail/consult', consultParams);
} else {
dest.feedbacks.consultsUrl = helpers.urlFormat('/product/detail/consultform', consultParams);
}
dest.feedbacks.consultsUrl = helpers.urlFormat('/product/detail/consultform', consultParams);
// 商品评价
dest.feedbacks.commentsNum = 0;
... ...
... ... @@ -24,7 +24,7 @@
{{/ tags}}
</div>
{{# bannerTop}}
{{> product/banner-swiper-arrow}}
{{> product/detail/banner-swiper-arrow}}
{{/ bannerTop}}
</div>
{{# goodsName}}
... ... @@ -184,4 +184,4 @@
{{/loginUrl}}
</div>
{{/ result}}
\ No newline at end of file
{{/ result}}
... ...
{{# result}}
{{> product/detail/product-description}}
{{/ result}}
\ No newline at end of file
{{#goodsDescription}}
<div class="goods-desc page-block">
<div class="service"></div>
<h1 class="title">
{{title}}
<span class="en-title">{{enTitle}}</span>
</h1>
{{#detail}}
<div class="detail table">
{{#list}}
<div class="column">{{param}}</div>
{{/list}}
</div>
{{/detail}}
{{#if desc}}
<div class="desc-text">{{desc}}</div>
{{/if}}
</div>
{{/goodsDescription}}
{{#sizeInfo}}
<div class="size-info page-block">
<h1 class="title">
{{title}}
<span class="en-title">{{enTitle}}</span>
</h1>
{{#detail}}
<div class="detail">
<div class="swiper-container detail-swiper" id="size-swiper-container">
<div class="swiper-wrapper">
{{#list}}
<div class="swiper-slide " >
{{#params}}
<div class="cell">{{param}}</div>
{{/params}}
</div>
{{/list}}
</div>
</div>
<p class="tips">提示:左滑查看完整表格信息</p>
</div>
{{/detail}}
</div>
{{/sizeInfo}}
{{#measurementMethod}}
<div class="measurement-method page-block">
<h1 class="title">
{{title}}
<span class="en-title">{{enTitle}}</span>
</h1>
<div class="detail" style="width:100%">
<img class="lazy" data-original="{{img}}" alt="">
</div>
</div>
{{/measurementMethod}}
{{#reference}}
<div class="size-info page-block">
<h1 class="title">
{{title}}
<span class="en-title">{{enTitle}}</span>
</h1>
{{#detail}}
<div class="detail">
<div class="swiper-container detail-swiper" id="reference-swiper-container">
<div class="swiper-wrapper">
{{#list}}
{{#if @first}}
<div class="swiper-slide first-group" >
{{#params}}
{{#if @first}}
{{else}}
<div>
<img class="avatar lazy" data-original="{{param}}" alt="">
</div>
{{/if}}
{{/params}}
</div>
{{else}}
<div class="swiper-slide" >
{{#params}}
<div class=" cell">{{param}}</div>
{{/params}}
</div>
{{/if}}
{{/list}}
</div>
</div>
<p class="tips">提示:左滑查看完整表格信息</p>
</div>
{{/detail}}
</div>
{{/reference}}
{{#materials}}
<div class="materials page-block">
<h1 class="title">
{{title}}
<span class="en-title">{{enTitle}}</span>
</h1>
<div class="detail">
{{#list}}
<div class="material-item">
<!-- <img class="lazy" data-original="{{img}}" alt="">
<p class="material-desc">
{{desc}}
</p>-->
<div class="material-image">
<img src="{{img}}" alt="材质图">
</div>
<div class="material-desc">
{{desc}}
</div>
</div>
{{/list}}
</div>
</div>
{{/materials}}
{{#washTips}}
<div class="wash-tips page-block">
<div class="detail table clearfix">
{{#list}}
<div class="tip">
<img src="{{img}}" alt="">
<span class="caption">{{caption}}</span>
</div>
{{/list}}
</div>
</div>
{{/washTips}}
{{#productDetail}}
<div class="product-detail page-block">
<h1 class="title">
{{{title}}}
<span class="en-title">{{{enTitle}}}</span>
</h1>
<div class="pro-detail">
<p>{{{desc}}}</p>
{{#list}}
<img class="lazy" data-original="{{img}}" alt="">
{{/list}}
</div>
</div>
{{/productDetail}}
{{/ result}}
... ...
{{> product/detail/recommend-content}}
\ No newline at end of file
<div class="title">为您优选新品</div>
<div id="swiper-recommend" class="swiper-container">
<div class="swiper-wrapper swiper-wrapper-recommend">
{{# recommendList}}
<a class="swiper-slide" href="{{url}}">
<img class="swiper-lazy img-box" data-src="{{image thumb 299 388}}">
<div class="sale-name">
{{name}}
</div>
<div class="price">
<span class="sale-price {{^price}}no-price{{/price}}">¥{{salePrice}}</span>
{{#price}}<span class="old-price">{{.}}</span>{{/price}}
</div>
<div class="swiper-lazy-preloader"></div>
</a>
{{/ recommendList}}
</div>
</div>
... ...
{{#if list}}
<div class="banner-top">
<div class="banner-swiper swiper-container">
<ul class="swiper-wrapper">
{{# list}}
<li class="swiper-slide">
<a href="{{url}}">
<img class="swiper-lazy" data-src="{{src}}">
</a>
<div class="swiper-lazy-preloader"></div>
</li>
{{/ list}}
</ul>
</div>
<div class="swiper-pagination">
<div class="pagination-inner">
</div>
</div>
</div>
{{else}}
<div class="banner-top-single">
<a href={{url}}>
<img class="img" src="{{img}}">
</a>
</div>
{{/if}}
... ... @@ -19,10 +19,10 @@
<div class="my-swiper-button-prev prev-grey"></div>
<div class="my-swiper-button-next next-grey"></div>
</div>
{{^}}
<div class="banner-top-single">
<a href={{url}}>
<img class="img" src="{{image img 450 600}}">
</a>
</div>
{{/if}}
\ No newline at end of file
{{^}}
<div class="banner-top-single">
<a href={{url}}>
<img class="img" src="{{image img 450 600}}">
</a>
</div>
{{/if}}
... ...
{{#goodsDescription}}
<div class="goods-desc page-block">
<div class="service"></div>
<h1 class="title">
{{title}}
<span class="en-title">{{enTitle}}</span>
</h1>
{{#detail}}
<div class="detail table">
{{#list}}
<div class="column">{{param}}</div>
{{/list}}
</div>
{{/detail}}
{{#if desc}}
<div class="desc-text">{{desc}}</div>
{{/if}}
</div>
{{/goodsDescription}}
{{#sizeInfo}}
<div class="size-info page-block">
<h1 class="title">
{{title}}
<span class="en-title">{{enTitle}}</span>
</h1>
{{#detail}}
<div class="detail">
<div class="swiper-container detail-swiper" id="size-swiper-container">
<div class="swiper-wrapper">
{{#list}}
<div class="swiper-slide " >
{{#params}}
<div class="cell">{{param}}</div>
{{/params}}
</div>
{{/list}}
</div>
</div>
<p class="tips">提示:左滑查看完整表格信息</p>
</div>
{{/detail}}
</div>
{{/sizeInfo}}
{{#measurementMethod}}
<div class="measurement-method page-block">
<h1 class="title">
{{title}}
<span class="en-title">{{enTitle}}</span>
</h1>
<div class="detail" style="width:100%">
<img class="lazy" data-original="{{img}}" alt="">
</div>
</div>
{{/measurementMethod}}
{{#reference}}
<div class="size-info page-block">
<h1 class="title">
{{title}}
<span class="en-title">{{enTitle}}</span>
</h1>
{{#detail}}
<div class="detail">
<div class="swiper-container detail-swiper" id="reference-swiper-container">
<div class="swiper-wrapper">
{{#list}}
{{#if @first}}
<div class="swiper-slide first-group" >
{{#params}}
{{#if @first}}
{{else}}
<div>
<img class="avatar lazy" data-original="{{param}}" alt="">
</div>
{{/if}}
{{/params}}
</div>
{{else}}
<div class="swiper-slide" >
{{#params}}
<div class=" cell">{{param}}</div>
{{/params}}
</div>
{{/if}}
{{/list}}
</div>
</div>
<p class="tips">提示:左滑查看完整表格信息</p>
</div>
{{/detail}}
</div>
{{/reference}}
{{#materials}}
<div class="materials page-block">
<h1 class="title">
{{title}}
<span class="en-title">{{enTitle}}</span>
</h1>
<div class="detail">
{{#list}}
<div class="material-item">
<!-- <img class="lazy" data-original="{{img}}" alt="">
<p class="material-desc">
{{desc}}
</p>-->
<div class="material-image">
<img src="{{img}}" alt="材质图">
</div>
<div class="material-desc">
{{desc}}
</div>
</div>
{{/list}}
</div>
</div>
{{/materials}}
{{#washTips}}
<div class="wash-tips page-block">
<div class="detail table clearfix">
{{#list}}
<div class="tip">
<img src="{{img}}" alt="">
<span class="caption">{{caption}}</span>
</div>
{{/list}}
</div>
</div>
{{/washTips}}
{{#productDetail}}
<div class="product-detail page-block">
<h1 class="title">
{{{title}}}
<span class="en-title">{{{enTitle}}}</span>
</h1>
<div class="pro-detail">
<p>{{{desc}}}</p>
{{#list}}
<img class="lazy" data-original="{{img}}" alt="">
{{/list}}
</div>
</div>
{{/productDetail}}
<div class="title">为您优选新品</div>
<div id="swiper-recommend" class="swiper-container">
<div class="swiper-wrapper swiper-wrapper-recommend">
{{# recommendList}}
<a class="swiper-slide" href="{{url}}">
<img class="swiper-lazy img-box" data-src="{{image thumb 299 388}}">
<div class="sale-name">
{{name}}
</div>
<div class="price">
<span class="sale-price {{^price}}no-price{{/price}}">¥{{salePrice}}</span>
{{#price}}<span class="old-price">{{.}}</span>{{/price}}
</div>
<div class="swiper-lazy-preloader"></div>
</a>
{{/ recommendList}}
</div>
</div>
\ No newline at end of file
... ... @@ -15,8 +15,8 @@ module.exports = {
port: 6001,
siteUrl: '//m.yohobuy.com',
domains: {
api: 'http://testapi.yoho.cn:28078/',
service: 'http://testservice.yoho.cn:28077/'
api: 'http://api.yoho.yohoops.org/',
service: 'http://service.yoho.yohoops.org/'
// api: 'http://devapi.yoho.cn:58078/',
// service: 'http://devservice.yoho.cn:58077/'
... ...