Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
14 changed files
with
267 additions
and
109 deletions
framework @ e9d066dd
@@ -17,7 +17,7 @@ use Plugin\Cache; | @@ -17,7 +17,7 @@ use Plugin\Cache; | ||
17 | class Yohobuy | 17 | class Yohobuy |
18 | { | 18 | { |
19 | 19 | ||
20 | -// /* 正式环境 */ | 20 | + /* 正式环境 */ |
21 | // const API_URL = 'http://api2.open.yohobuy.com/'; | 21 | // const API_URL = 'http://api2.open.yohobuy.com/'; |
22 | // const API_URL2 = 'http://api.open.yohobuy.com/'; | 22 | // const API_URL2 = 'http://api.open.yohobuy.com/'; |
23 | // const SERVICE_URL = 'http://service.api.yohobuy.com/'; | 23 | // const SERVICE_URL = 'http://service.api.yohobuy.com/'; |
@@ -35,18 +35,10 @@ class CacheConfig | @@ -35,18 +35,10 @@ class CacheConfig | ||
35 | const KEY_ACTION_SEARCH_SEARCH = 'key_action_search_search'; // 搜索的数据 | 35 | const KEY_ACTION_SEARCH_SEARCH = 'key_action_search_search'; // 搜索的数据 |
36 | const KEY_ACTION_SEARCH_FILTER = 'key_action_search_filter'; // 搜索的过滤条件 | 36 | const KEY_ACTION_SEARCH_FILTER = 'key_action_search_filter'; // 搜索的过滤条件 |
37 | 37 | ||
38 | -<<<<<<< HEAD | ||
39 | - const KEY_ACTION_HOME_GRADE = 'key_action_home_grade';//会员等级 | ||
40 | - const KEY_ACTION_HOME_PREFERENTIAL = 'key_action_home_preferential';//会员特权详情 | ||
41 | - const KEY_ACTION_GUANG_PLUSTAR_DATA = 'key_action_guang_plustar_data'; // 逛PLUSTAR | ||
42 | - const KEY_ACTION_GUANG_DETAIL_DATA = 'key_action_guang_detail_data'; // 逛内容详情 | ||
43 | - const KEY_ACTION_HOME_ORDER_ORDER = 'key_action_home_order_order';//订单列表 | ||
44 | -======= | ||
45 | const KEY_ACTION_GUANG_PLUSSTAR_INDEX = 'key_action_guang_plusstar_index'; // 国际优选 | 38 | const KEY_ACTION_GUANG_PLUSSTAR_INDEX = 'key_action_guang_plusstar_index'; // 国际优选 |
46 | const KEY_ACTION_GUANG_PLUSSTAR_LIST = 'key_action_guang_plusstar_list'; // 明星原创 | 39 | const KEY_ACTION_GUANG_PLUSSTAR_LIST = 'key_action_guang_plusstar_list'; // 明星原创 |
47 | const KEY_ACTION_GUANG_PLUSTAR_DATA = 'key_action_guang_plustar_data'; // 逛PLUSTAR | 40 | const KEY_ACTION_GUANG_PLUSTAR_DATA = 'key_action_guang_plustar_data'; // 逛PLUSTAR |
48 | const KEY_ACTION_GUANG_DETAIL_DATA = 'key_action_guang_detail_data'; // 逛内容详情 | 41 | const KEY_ACTION_GUANG_DETAIL_DATA = 'key_action_guang_detail_data'; // 逛内容详情 |
49 | const KEY_ACTION_GUANG_RSS_DATA = 'key_action_guang_detail_data'; // 逛订阅内容 | 42 | const KEY_ACTION_GUANG_RSS_DATA = 'key_action_guang_detail_data'; // 逛订阅内容 |
50 | ->>>>>>> master | ||
51 | 43 | ||
52 | } | 44 | } |
@@ -22,7 +22,7 @@ class PlusstarData | @@ -22,7 +22,7 @@ class PlusstarData | ||
22 | { | 22 | { |
23 | 23 | ||
24 | const URI_BRANDLIST = 'guang/api/v1/plustar/getlist'; | 24 | const URI_BRANDLIST = 'guang/api/v1/plustar/getlist'; |
25 | - const URI_BRANDINFO_PLUSSTAR = 'guang/service/v1/plustar/'; // 'guang/service/v3/plustar/' | 25 | + const URI_BRANDINFO_PLUSSTAR = 'guang/service/v3/plustar/'; // 'guang/service/v3/plustar/' |
26 | const URI_BRANDINFO_FAVORITE = 'shops/service/v1/favorite/'; | 26 | const URI_BRANDINFO_FAVORITE = 'shops/service/v1/favorite/'; |
27 | const URI_BRANDINFO_ARTICLE = 'guang/service/v1/article/'; | 27 | const URI_BRANDINFO_ARTICLE = 'guang/service/v1/article/'; |
28 | 28 |
@@ -13,9 +13,9 @@ var goodsSwiper, | @@ -13,9 +13,9 @@ var goodsSwiper, | ||
13 | // winH = $(window).height(), | 13 | // winH = $(window).height(), |
14 | sizeSwiper, | 14 | sizeSwiper, |
15 | refSwiper, | 15 | refSwiper, |
16 | + commentsNum, | ||
16 | handleHelper; | 17 | handleHelper; |
17 | 18 | ||
18 | - | ||
19 | lazyLoad($('img.lazy')); | 19 | lazyLoad($('img.lazy')); |
20 | 20 | ||
21 | goodsSwiper = new Swiper('.banner-swiper', { | 21 | goodsSwiper = new Swiper('.banner-swiper', { |
@@ -28,22 +28,56 @@ goodsSwiper = new Swiper('.banner-swiper', { | @@ -28,22 +28,56 @@ goodsSwiper = new Swiper('.banner-swiper', { | ||
28 | prevButton: '.my-swiper-button-prev' | 28 | prevButton: '.my-swiper-button-prev' |
29 | }); | 29 | }); |
30 | 30 | ||
31 | +//初始化tab | ||
32 | +(function() { | ||
33 | + var consultsNum = $('#nav-tab .consults-num').html() - 0; | ||
31 | 34 | ||
32 | -$('#nav-tab li').on('click', function() { | ||
33 | - var index = $(this).index(); | ||
34 | 35 | ||
36 | + commentsNum = $('#nav-tab .comments-num').html() - 0; | ||
35 | 37 | ||
36 | - if (!$(this).hasClass('focus')) { | 38 | + $('#nav-tab li').each(function() { |
39 | + $(this).removeClass('focus'); | ||
40 | + }); | ||
41 | + | ||
42 | + $('#feedback-content .content').each(function() { | ||
43 | + $(this).addClass('hide'); | ||
44 | + }); | ||
45 | + if (0 !== commentsNum) { | ||
46 | + $('#nav-tab .comment-nav').addClass('focus'); | ||
47 | + $('#feedback-content .comment-content').removeClass('hide'); | ||
48 | + | ||
49 | + } else if (0 !== consultsNum) { | ||
50 | + $('#nav-tab .consult-nav').addClass('focus'); | ||
51 | + $('#feedback-content .consult-content').removeClass('hide'); | ||
52 | + } | ||
53 | +})(); | ||
37 | 54 | ||
38 | - $('#nav-tab li').each(function() { | ||
39 | - $(this).removeClass('focus'); | ||
40 | - }); | ||
41 | - $('#feedback-content .content').each(function() { | ||
42 | - $(this).addClass('hide'); | ||
43 | - }); | 55 | +$('#nav-tab li').on('click', function() { |
56 | + var index = $(this).index(); | ||
57 | + | ||
58 | + if ($(this).hasClass('comment-nav') && 0 === commentsNum) { | ||
59 | + alert('暂无商品评价'); | ||
60 | + } else { | ||
61 | + if (!$(this).hasClass('focus')) { | ||
62 | + | ||
63 | + $('#nav-tab li').each(function() { | ||
64 | + $(this).removeClass('focus'); | ||
65 | + }); | ||
66 | + $('#feedback-content .content').each(function() { | ||
67 | + $(this).addClass('hide'); | ||
68 | + }); | ||
69 | + | ||
70 | + $(this).addClass('focus'); | ||
71 | + $('#feedback-content .content:eq(' + index + ')').removeClass('hide'); | ||
72 | + } | ||
73 | + } | ||
74 | +}); | ||
44 | 75 | ||
45 | - $(this).addClass('focus'); | ||
46 | - $('#feedback-content .content:eq(' + index + ')').removeClass('hide'); | 76 | +$('.goodsDiscount .dropdown').on('click', function() { |
77 | + if ($('.goodsDiscount .discount-folder').is(':hidden')) { | ||
78 | + $('.goodsDiscount .discount-folder').slideDown(); | ||
79 | + } else { | ||
80 | + $('.goodsDiscount .discount-folder').slideUp(); | ||
47 | } | 81 | } |
48 | }); | 82 | }); |
49 | 83 |
@@ -9,9 +9,10 @@ var Swiper = require('yoho.iswiper'); | @@ -9,9 +9,10 @@ var Swiper = require('yoho.iswiper'); | ||
9 | 9 | ||
10 | var recommendSwiper; | 10 | var recommendSwiper; |
11 | 11 | ||
12 | -recommendSwiper = new Swiper('.swiper-recommend', { | ||
13 | - | ||
14 | - // lazyLoading: true, | ||
15 | - // lazyLoadingInPrevNext: true, | ||
16 | - slidesPerView: 'auto' | 12 | +recommendSwiper = new Swiper('#swiper-recommend', { |
13 | + slidesPerView: 'auto', | ||
14 | + grabCursor: true, | ||
15 | + slideElement: 'li', | ||
16 | + lazyLoading: true, | ||
17 | + watchSlidesVisibility: true | ||
17 | }); | 18 | }); |
@@ -226,29 +226,36 @@ $basicBtnC:#eb0313; | @@ -226,29 +226,36 @@ $basicBtnC:#eb0313; | ||
226 | } | 226 | } |
227 | } | 227 | } |
228 | .goodsDiscount{ | 228 | .goodsDiscount{ |
229 | - min-height: pxToRem(88px); | ||
230 | - padding-left:pxToRem(28px); | ||
231 | - padding-right:pxToRem(28px); | ||
232 | - font-size: pxToRem(28px); | ||
233 | - color: $mainFontC; | ||
234 | - line-height: pxToRem(88px); | ||
235 | - | ||
236 | - border-bottom: 1px solid $borderC; | ||
237 | - | ||
238 | - .iconfont{ | ||
239 | - display: inline-block; | ||
240 | - width: pxToRem(35px); | ||
241 | - font-size: pxToRem(45px); | ||
242 | - float: right; | ||
243 | - color:#e0e0e0; | ||
244 | - // padding-left:pxToRem(50px); | ||
245 | - } | ||
246 | - } | 229 | + |
230 | + font-size: pxToRem(28px); | ||
231 | + color: $mainFontC; | ||
232 | + border-bottom: 1px solid $borderC; | ||
233 | + h1{ | ||
234 | + padding : pxToRem(30px) pxToRem(28px); | ||
235 | + line-height: pxToRem(36px); | ||
236 | + // line-height: pxToRem(88px); | ||
237 | + } | ||
238 | + .iconfont{ | ||
239 | + display: inline-block; | ||
240 | + width: pxToRem(35px); | ||
241 | + font-size: pxToRem(45px); | ||
242 | + float: right; | ||
243 | + color:#e0e0e0; | ||
244 | + // padding-left:pxToRem(50px); | ||
245 | + } | ||
246 | + .discount-folder{ | ||
247 | + .folder-item{ | ||
248 | + border-top: 1px solid $borderC; | ||
249 | + } | ||
250 | + display: none; | ||
251 | + } | ||
252 | + | ||
253 | +} | ||
247 | .goodsSubtitle, | 254 | .goodsSubtitle, |
248 | .goodsDiscount{ | 255 | .goodsDiscount{ |
249 | text-indent: pxToRem(-14px); | 256 | text-indent: pxToRem(-14px); |
250 | } | 257 | } |
251 | - .feedback-list-page { | 258 | + .feedback-list { |
252 | padding-top: pxToRem(30px); | 259 | padding-top: pxToRem(30px); |
253 | background-color: #f0f0f0; | 260 | background-color: #f0f0f0; |
254 | 261 | ||
@@ -404,7 +411,20 @@ $basicBtnC:#eb0313; | @@ -404,7 +411,20 @@ $basicBtnC:#eb0313; | ||
404 | display: none; | 411 | display: none; |
405 | } | 412 | } |
406 | } | 413 | } |
407 | - | 414 | +.feedback-list .nodata{ |
415 | + height: pxToRem(88px); | ||
416 | + font-size: pxToRem(28px); | ||
417 | + line-height: pxToRem(88px); | ||
418 | + background-color: #fff; | ||
419 | + padding:0 pxToRem(28px); | ||
420 | + .go-consult{ | ||
421 | + float: right; | ||
422 | + color: $subFontC; | ||
423 | + span{ | ||
424 | + font-size: pxToRem(28px); | ||
425 | + } | ||
426 | + } | ||
427 | +} | ||
408 | .enter-store{ | 428 | .enter-store{ |
409 | min-height: pxToRem(100px); | 429 | min-height: pxToRem(100px); |
410 | display: table; | 430 | display: table; |
@@ -484,6 +504,8 @@ $basicBtnC:#eb0313; | @@ -484,6 +504,8 @@ $basicBtnC:#eb0313; | ||
484 | 504 | ||
485 | .detail-swiper{ | 505 | .detail-swiper{ |
486 | .swiper-wrapper{ | 506 | .swiper-wrapper{ |
507 | + height: pxToRem(200px); | ||
508 | + overflow: hidden; | ||
487 | .swiper-slide{ | 509 | .swiper-slide{ |
488 | width: pxToRem(114px); | 510 | width: pxToRem(114px); |
489 | div{ | 511 | div{ |
@@ -516,7 +538,7 @@ $basicBtnC:#eb0313; | @@ -516,7 +538,7 @@ $basicBtnC:#eb0313; | ||
516 | .measurement-method{ | 538 | .measurement-method{ |
517 | .detail{ | 539 | .detail{ |
518 | width: 100%; | 540 | width: 100%; |
519 | - // height: pxToRem(300px); | 541 | + height: pxToRem(260px); |
520 | img{ | 542 | img{ |
521 | float:left; | 543 | float:left; |
522 | width: pxToRem(270px); | 544 | width: pxToRem(270px); |
@@ -584,7 +606,8 @@ $basicBtnC:#eb0313; | @@ -584,7 +606,8 @@ $basicBtnC:#eb0313; | ||
584 | font-size: pxToRem(34px); | 606 | font-size: pxToRem(34px); |
585 | color:$basicBtnC; | 607 | color:$basicBtnC; |
586 | } | 608 | } |
587 | - &.addto-cart{ | 609 | + &.addto-cart, |
610 | + &.sold-out{ | ||
588 | height: pxToRem(80px); | 611 | height: pxToRem(80px); |
589 | width: pxToRem(260px); | 612 | width: pxToRem(260px); |
590 | margin:0 pxToRem(100px) 0 pxToRem(115px); | 613 | margin:0 pxToRem(100px) 0 pxToRem(115px); |
@@ -594,6 +617,9 @@ $basicBtnC:#eb0313; | @@ -594,6 +617,9 @@ $basicBtnC:#eb0313; | ||
594 | line-height: pxToRem(80px); | 617 | line-height: pxToRem(80px); |
595 | text-align: center; | 618 | text-align: center; |
596 | } | 619 | } |
620 | + &.sold-out{ | ||
621 | + background-color: #f58189; | ||
622 | + } | ||
597 | } | 623 | } |
598 | .num-tag{ | 624 | .num-tag{ |
599 | position: absolute; | 625 | position: absolute; |
@@ -12,25 +12,28 @@ | @@ -12,25 +12,28 @@ | ||
12 | font-weight: bold; | 12 | font-weight: bold; |
13 | } | 13 | } |
14 | 14 | ||
15 | - .swiper-recommend { | 15 | + .swiper-container { |
16 | padding: pxToRem(20px) 0; | 16 | padding: pxToRem(20px) 0; |
17 | width: 100%; | 17 | width: 100%; |
18 | + height: pxToRem(252px); | ||
18 | overflow: hidden; | 19 | overflow: hidden; |
19 | 20 | ||
20 | - .swiper-slider { | ||
21 | - margin: 0 pxToRem(10px); | 21 | + .swiper-slide { |
22 | + padding: 0 pxToRem(10px); | ||
23 | + float: left; | ||
24 | + width: pxToRem(156px); | ||
22 | 25 | ||
23 | &:first-child { | 26 | &:first-child { |
24 | - margin-left: pxToRem(30px); | 27 | + padding-left: pxToRem(30px); |
25 | } | 28 | } |
26 | 29 | ||
27 | &:last-child { | 30 | &:last-child { |
28 | - margin-right: pxToRem(30px); | 31 | + padding-right: pxToRem(30px); |
29 | } | 32 | } |
30 | 33 | ||
31 | img { | 34 | img { |
32 | - width: pxToRem(156px); | ||
33 | - max-width: none; | 35 | + width: 100%; |
36 | + height: pxToRem(208px); | ||
34 | } | 37 | } |
35 | } | 38 | } |
36 | } | 39 | } |
@@ -42,19 +45,21 @@ | @@ -42,19 +45,21 @@ | ||
42 | line-height: 1; | 45 | line-height: 1; |
43 | 46 | ||
44 | span { | 47 | span { |
48 | + display: block; | ||
45 | // chrome 最小支持12px, 设计图是 10px ,用CSS3变换 | 49 | // chrome 最小支持12px, 设计图是 10px ,用CSS3变换 |
46 | @include transform(scale(0.875)); | 50 | @include transform(scale(0.875)); |
47 | } | 51 | } |
48 | 52 | ||
49 | .sale-price { | 53 | .sale-price { |
50 | color: #d9134f; | 54 | color: #d9134f; |
55 | + margin-left: pxToRem(-10px); | ||
51 | } | 56 | } |
52 | 57 | ||
53 | .old-price { | 58 | .old-price { |
54 | position: absolute; | 59 | position: absolute; |
55 | top: 0; | 60 | top: 0; |
56 | - right: 0; | ||
57 | - color: #ededed; | 61 | + right: pxToRem(-6px); |
62 | + color: #b0b0b0; | ||
58 | } | 63 | } |
59 | 64 | ||
60 | .no-price { | 65 | .no-price { |
@@ -95,7 +95,9 @@ | @@ -95,7 +95,9 @@ | ||
95 | <span class="iconfont num"></span> | 95 | <span class="iconfont num"></span> |
96 | </a> | 96 | </a> |
97 | </div> | 97 | </div> |
98 | - | 98 | + |
99 | + {{#isLogin}} | ||
99 | {{> product/recommend-for-you}} | 100 | {{> product/recommend-for-you}} |
101 | + {{/isLogin}} | ||
100 | </div> | 102 | </div> |
101 | {{> layout/footer}} | 103 | {{> layout/footer}} |
@@ -43,28 +43,107 @@ | @@ -43,28 +43,107 @@ | ||
43 | 43 | ||
44 | {{#goodsDiscount}} | 44 | {{#goodsDiscount}} |
45 | <div class="goodsDiscount"> | 45 | <div class="goodsDiscount"> |
46 | - <h1>{{.}}<span class="iconfont"></span></h1> | 46 | + {{#each list}} |
47 | + {{#if @first}} | ||
48 | + <h1>{{this}}<span class="iconfont dropdown"></span></h1> | ||
49 | + <div class="discount-folder"> | ||
50 | + {{else}} | ||
51 | + <h1 class="folder-item">{{this}}</h1> | ||
52 | + {{/if}} | ||
53 | + {{/list}} | ||
54 | + </div> | ||
47 | </div> | 55 | </div> |
48 | {{/goodsDiscount}} | 56 | {{/goodsDiscount}} |
49 | 57 | ||
50 | <div class="feedback-list "> | 58 | <div class="feedback-list "> |
51 | {{# feedbacks}} | 59 | {{# feedbacks}} |
52 | - {{#if nodata}} | ||
53 | - <div class="nodata"> | ||
54 | - <span>暂无商品评价和咨询</span> | ||
55 | - <a class="go-consult">我要咨询<i class="iconfont"><span class="iconfont"></span></a> | 60 | + {{#if commentsNum}} |
61 | + <!--tab begin--> | ||
62 | + <ul id="nav-tab" class="nav-tab clearfix"> | ||
63 | + <li class="comment-nav">商品评价(<span class="comments-num">{{commentsNum}}</span>)</li> | ||
64 | + <li class="consult-nav">购买咨询(<span class="consults-num">{{consultsNum}}</span>)</li> | ||
65 | + </ul> | ||
66 | + <div id="feedback-content" > | ||
67 | + | ||
68 | + <div class="comment-content content "> | ||
69 | + {{#if commentsNum}} | ||
70 | + <div class="comment-content-main content-main"> | ||
71 | + {{# comments}} | ||
72 | + <span class="user-name"> | ||
73 | + {{userName}} | ||
74 | + </span> | ||
75 | + <span class="goods-spec"> | ||
76 | + {{desc}} | ||
77 | + </span> | ||
78 | + <p class="detail-content"> | ||
79 | + {{content}} | ||
80 | + </p> | ||
81 | + <span class="comment-time"> | ||
82 | + {{time}} | ||
83 | + </span> | ||
84 | + {{/ comments}} | ||
85 | + </div> | ||
86 | + {{else}} | ||
87 | + <div class="comment-content-main content-main no-item"> | ||
88 | + <span class="iconfont"></span>暂无评论 | ||
89 | + </div> | ||
90 | + {{/if}} | ||
91 | + <div class="comment-content-footer"> | ||
92 | + <a href="{{link}}">查看更多 <span class="iconfont"></span></a> | ||
93 | + </div> | ||
56 | </div> | 94 | </div> |
95 | + | ||
96 | + | ||
97 | + <div class="consult-content content hide "> | ||
98 | + {{#if consultsNum}} | ||
99 | + <div class="consult-content-main content-main"> | ||
100 | + {{# consults}} | ||
101 | + <div class="question"> | ||
102 | + <span class="iconfont"></span> | ||
103 | + <p>{{question}} | ||
104 | + <span class="time"> | ||
105 | + {{time}} | ||
106 | + </span> | ||
107 | + </p> | ||
108 | + </div> | ||
109 | + | ||
110 | + <div class="answer"> | ||
111 | + <span class="iconfont"></span> | ||
112 | + <p>{{answer}}</p> | ||
113 | + </div> | ||
114 | + {{/ consults}} | ||
115 | + </div> | ||
116 | + <div class="consult-content-footer"> | ||
117 | + <a href="{{link}}"> | ||
118 | + 查看更多 | ||
119 | + <span class="iconfont"></span></a> | ||
120 | + </div> | ||
121 | + {{else}} | ||
122 | + <div class="comment-content-main content-main no-item"> | ||
123 | + <span class="iconfont"></span>暂无咨询 | ||
124 | + </div> | ||
125 | + <div class="consult-content-footer"> | ||
126 | + <a href="{{link}}"> | ||
127 | + 我要咨询 | ||
128 | + <span class="iconfont"></span></a> | ||
129 | + </div> | ||
130 | + {{/if}} | ||
131 | + | ||
132 | + </div> | ||
133 | + </div> | ||
134 | + <!--/tab end--> | ||
57 | {{else}} | 135 | {{else}} |
58 | - | ||
59 | - <ul id="nav-tab" class="nav-tab clearfix"> | ||
60 | - <li class="comment-nav focus">{{commentName}}({{commentsNum}})</li> | ||
61 | - <li class="consult-nav">{{consultName}}({{consultsNum}})</li> | ||
62 | - </ul> | ||
63 | - <div id="feedback-content" > | ||
64 | - | ||
65 | - <div class="comment-content content "> | ||
66 | - {{#if commentsNum}} | ||
67 | - <div class="comment-content-main content-main"> | 136 | + {{#if consultsNum}} |
137 | + <!--tab begin--> | ||
138 | + <ul id="nav-tab" class="nav-tab clearfix"> | ||
139 | + <li class="comment-nav">商品评价(<span class="comments-num">{{commentsNum}}</span>)</li> | ||
140 | + <li class="consult-nav">购买咨询(<span class="consults-num">{{consultsNum}}</span>)</li> | ||
141 | + </ul> | ||
142 | + <div id="feedback-content" > | ||
143 | + | ||
144 | + <div class="comment-content content "> | ||
145 | + {{#if commentsNum}} | ||
146 | + <div class="comment-content-main content-main"> | ||
68 | {{# comments}} | 147 | {{# comments}} |
69 | <span class="user-name"> | 148 | <span class="user-name"> |
70 | {{userName}} | 149 | {{userName}} |
@@ -80,13 +159,13 @@ | @@ -80,13 +159,13 @@ | ||
80 | </span> | 159 | </span> |
81 | {{/ comments}} | 160 | {{/ comments}} |
82 | </div> | 161 | </div> |
83 | - {{else}} | ||
84 | - <div class="comment-content-main content-main no-item"> | ||
85 | - <span class="iconfont"></span>暂无评论 | ||
86 | - </div> | 162 | + {{else}} |
163 | + <div class="comment-content-main content-main no-item"> | ||
164 | + <span class="iconfont"></span>暂无评论 | ||
165 | + </div> | ||
87 | {{/if}} | 166 | {{/if}} |
88 | <div class="comment-content-footer"> | 167 | <div class="comment-content-footer"> |
89 | - <a href="{{moreComments}}">查看更多 <span class="iconfont"></span></a> | 168 | + <a href="{{link}}">查看更多 <span class="iconfont"></span></a> |
90 | </div> | 169 | </div> |
91 | </div> | 170 | </div> |
92 | 171 | ||
@@ -101,7 +180,7 @@ | @@ -101,7 +180,7 @@ | ||
101 | <span class="time"> | 180 | <span class="time"> |
102 | {{time}} | 181 | {{time}} |
103 | </span> | 182 | </span> |
104 | - </p> | 183 | + </p> |
105 | </div> | 184 | </div> |
106 | 185 | ||
107 | <div class="answer"> | 186 | <div class="answer"> |
@@ -111,24 +190,34 @@ | @@ -111,24 +190,34 @@ | ||
111 | {{/ consults}} | 190 | {{/ consults}} |
112 | </div> | 191 | </div> |
113 | <div class="consult-content-footer"> | 192 | <div class="consult-content-footer"> |
114 | - <a href="{{moreConsults}}"> | 193 | + <a href="{{link}}"> |
115 | 查看更多 | 194 | 查看更多 |
116 | <span class="iconfont"></span></a> | 195 | <span class="iconfont"></span></a> |
117 | - </div> | 196 | + </div> |
118 | {{else}} | 197 | {{else}} |
119 | - <div class="comment-content-main content-main no-item"> | ||
120 | - <span class="iconfont"></span>暂无咨询 | ||
121 | - </div> | ||
122 | - <div class="consult-content-footer"> | ||
123 | - <a href="{{gotoConsults}}"> | 198 | + <div class="comment-content-main content-main no-item"> |
199 | + <span class="iconfont"></span>暂无咨询 | ||
200 | + </div> | ||
201 | + <div class="consult-content-footer"> | ||
202 | + <a href="{{link}}"> | ||
124 | 我要咨询 | 203 | 我要咨询 |
125 | <span class="iconfont"></span></a> | 204 | <span class="iconfont"></span></a> |
126 | </div> | 205 | </div> |
127 | - {{/if}} | 206 | + {{/if}} |
128 | 207 | ||
208 | + </div> | ||
209 | + </div> | ||
210 | + <!--/tab end--> | ||
211 | + {{else}} | ||
212 | + <div class="nodata"> | ||
213 | + <span>暂无商品评价和咨询</span> | ||
214 | + <a class="go-consult">我要咨询<span class="iconfont"></span></a> | ||
129 | </div> | 215 | </div> |
130 | - </div> | 216 | + {{/if}} |
131 | {{/if}} | 217 | {{/if}} |
218 | + | ||
219 | + | ||
220 | + | ||
132 | {{/ feedbacks}} | 221 | {{/ feedbacks}} |
133 | </div> | 222 | </div> |
134 | 223 | ||
@@ -189,7 +278,7 @@ | @@ -189,7 +278,7 @@ | ||
189 | <div class="swiper-container detail-swiper" id="size-swiper-container"> | 278 | <div class="swiper-container detail-swiper" id="size-swiper-container"> |
190 | <div class="swiper-wrapper"> | 279 | <div class="swiper-wrapper"> |
191 | {{#list}} | 280 | {{#list}} |
192 | - <div class="swiper-slide blue-slide" > | 281 | + <div class="swiper-slide " > |
193 | <div class="size-name cell">{{name}}</div> | 282 | <div class="size-name cell">{{name}}</div> |
194 | <div class="size-m cell">{{sizem}}</div> | 283 | <div class="size-m cell">{{sizem}}</div> |
195 | <div class="size-xl cell">{{sizexl}}</div> | 284 | <div class="size-xl cell">{{sizexl}}</div> |
@@ -303,7 +392,11 @@ | @@ -303,7 +392,11 @@ | ||
303 | <div class="cart-bar"> | 392 | <div class="cart-bar"> |
304 | <span class="num-tag">{{numInCart}}</span> | 393 | <span class="num-tag">{{numInCart}}</span> |
305 | <a href="" class="num-incart iconfont"></a> | 394 | <a href="" class="num-incart iconfont"></a> |
395 | + {{#if goodsInstore}} | ||
306 | <a href="" class="addto-cart ">加入购物车</a> | 396 | <a href="" class="addto-cart ">加入购物车</a> |
397 | + {{else}} | ||
398 | + <a href="" class="sold-out">已售罄</a> | ||
399 | + {{/if}} | ||
307 | <a href="" class="favorite iconfont"></a> | 400 | <a href="" class="favorite iconfont"></a> |
308 | </div> | 401 | </div> |
309 | {{/cartInfo}} | 402 | {{/cartInfo}} |
1 | {{# recommendForYou}} | 1 | {{# recommendForYou}} |
2 | <div class="recommend-for-you"> | 2 | <div class="recommend-for-you"> |
3 | <div class="title">为您优选新品</div> | 3 | <div class="title">为您优选新品</div> |
4 | - <div class="swiper-recommend"> | ||
5 | - <ul class="swiper-wrapper"> | 4 | + <div id="swiper-recommend" class="swiper-container"> |
5 | + <ul class="swiper-wrapper swiper-wrapper-recommend"> | ||
6 | {{#recommendList}} | 6 | {{#recommendList}} |
7 | - <li class="swiper-slider"> | ||
8 | - <img class="img-box" src="{{thumb}}"> | 7 | + <li class="swiper-slide"> |
8 | + <img class="swiper-lazy img-box" data-src="{{thumb}}"> | ||
9 | <div class="price"> | 9 | <div class="price"> |
10 | <span class="sale-price {{^price}}no-price{{/price}}">¥{{salePrice}}</span> | 10 | <span class="sale-price {{^price}}no-price{{/price}}">¥{{salePrice}}</span> |
11 | {{#price}}<span class="old-price">¥{{.}}</span>{{/price}} | 11 | {{#price}}<span class="old-price">¥{{.}}</span>{{/price}} |
12 | </div> | 12 | </div> |
13 | + <div class="swiper-lazy-preloader"></div> | ||
13 | </li> | 14 | </li> |
14 | {{/recommendList}} | 15 | {{/recommendList}} |
15 | </ul> | 16 | </ul> |
@@ -423,13 +423,13 @@ class UserModel | @@ -423,13 +423,13 @@ class UserModel | ||
423 | 423 | ||
424 | // 调用接口获取地址数据 | 424 | // 调用接口获取地址数据 |
425 | $suggest = UserData::suggestData($udid, $page, $limit); | 425 | $suggest = UserData::suggestData($udid, $page, $limit); |
426 | - //print_r($suggest); | ||
427 | 426 | ||
428 | // 处理意见反馈数据 | 427 | // 处理意见反馈数据 |
429 | if (isset($suggest['data']) && !empty($suggest['data'])) { | 428 | if (isset($suggest['data']) && !empty($suggest['data'])) { |
430 | $one = array(); | 429 | $one = array(); |
431 | foreach ($suggest['data']['list'] as $val) { | 430 | foreach ($suggest['data']['list'] as $val) { |
432 | $one = array(); | 431 | $one = array(); |
432 | + $one['suggest_id'] = $val['id']; | ||
433 | $one['imgUrl'] = Helpers::getImageUrl($val['cover_image'], 640, 240); | 433 | $one['imgUrl'] = Helpers::getImageUrl($val['cover_image'], 640, 240); |
434 | $one['title'] = $val['filter_content']; | 434 | $one['title'] = $val['filter_content']; |
435 | $one['content'] = $val['reply_content']; | 435 | $one['content'] = $val['reply_content']; |
@@ -3,6 +3,7 @@ | @@ -3,6 +3,7 @@ | ||
3 | use Action\AbstractAction; | 3 | use Action\AbstractAction; |
4 | use LibModels\Wap\Guang\PlusstarData; | 4 | use LibModels\Wap\Guang\PlusstarData; |
5 | use Plugin\Helpers; | 5 | use Plugin\Helpers; |
6 | +use Plugin\Images; | ||
6 | 7 | ||
7 | /** | 8 | /** |
8 | * 明星品牌和原创品牌 | 9 | * 明星品牌和原创品牌 |
@@ -131,7 +132,7 @@ class PlusstarController extends AbstractAction | @@ -131,7 +132,7 @@ class PlusstarController extends AbstractAction | ||
131 | $data['psDetail'] = true; | 132 | $data['psDetail'] = true; |
132 | $data['ps']['id'] = $brandId; | 133 | $data['ps']['id'] = $brandId; |
133 | $data['ps']['banner'] = Helpers::getImageUrl($brandInfo['getBrandInfo']['data']['cover_img'], 640, 309); | 134 | $data['ps']['banner'] = Helpers::getImageUrl($brandInfo['getBrandInfo']['data']['cover_img'], 640, 309); |
134 | - $data['ps']['logo'] = Helpers::getImageUrl($brandInfo['getBrandInfo']['data']['brand_ico'], 160, 160); | 135 | + $data['ps']['logo'] = Images::getSourceUrl($brandInfo['getBrandInfo']['data']['brand_ico'],'brandLogo'); |
135 | $data['ps']['name'] = $brandInfo['getBrandInfo']['data']['brand_name']; | 136 | $data['ps']['name'] = $brandInfo['getBrandInfo']['data']['brand_name']; |
136 | $data['ps']['isLike'] = $brandInfo['getUidBrandFav']; | 137 | $data['ps']['isLike'] = $brandInfo['getUidBrandFav']; |
137 | $data['ps']['intro'] = empty($brandInfo['getBrandInfo']['data']['brand_intro']) ? false : strtr(strip_tags($brandInfo['getBrandInfo']['data']['brand_intro']), array(' ' => ' ')); | 138 | $data['ps']['intro'] = empty($brandInfo['getBrandInfo']['data']['brand_intro']) ? false : strtr(strip_tags($brandInfo['getBrandInfo']['data']['brand_intro']), array(' ' => ' ')); |
@@ -13,10 +13,6 @@ class DetailController extends AbstractAction | @@ -13,10 +13,6 @@ class DetailController extends AbstractAction | ||
13 | */ | 13 | */ |
14 | public function indexAction() | 14 | public function indexAction() |
15 | { | 15 | { |
16 | - $commentsNum = 0; | ||
17 | - $consultsNum = 0; | ||
18 | - $nodate =0; | ||
19 | - | ||
20 | $data = array ( | 16 | $data = array ( |
21 | 'goodsDetailPage' => true, | 17 | 'goodsDetailPage' => true, |
22 | 'pageHeader' => array ( | 18 | 'pageHeader' => array ( |
@@ -68,16 +64,21 @@ SHOE BQT KEN BLOCK', | @@ -68,16 +64,21 @@ SHOE BQT KEN BLOCK', | ||
68 | ) | 64 | ) |
69 | ) | 65 | ) |
70 | ), | 66 | ), |
71 | - 'goodsDiscount'=>'【summer final sale】满¥499立享6.8折', | 67 | + 'goodsDiscount'=>array( |
68 | + 'list'=>array( | ||
69 | + '【summer final sale】满¥499立享6.8折', | ||
70 | + '【BACK TO SCHOOL】满¥499赠送Paul | ||
71 | + Franke帽子一个,多买多送!', | ||
72 | + '【BACK TO SCHOOL】满¥499赠送Paul | ||
73 | + Franke帽子一个,多买多送!' | ||
74 | + ) | ||
75 | + ), | ||
72 | 'feedbacks'=>array( | 76 | 'feedbacks'=>array( |
73 | 'commentsNum'=>0, | 77 | 'commentsNum'=>0, |
74 | 'consultsNum'=>0, | 78 | 'consultsNum'=>0, |
75 | - 'nodata' =>0, | ||
76 | - 'commentName'=>'商品评价', | ||
77 | - 'consultName' =>'购买咨询', | ||
78 | - 'moreComments'=>'http://www.baidu.com', | ||
79 | - 'moreConsults'=>'http://www.baidu.com', | ||
80 | - 'gotoConsults'=>'http://www.baidu.com', | 79 | + // 'commentName'=>'商品评价', |
80 | + // 'consultName' =>'购买咨询', | ||
81 | + 'link'=>'', | ||
81 | 'comments'=>array( | 82 | 'comments'=>array( |
82 | array( | 83 | array( |
83 | 'userName'=>'Lynnic', | 84 | 'userName'=>'Lynnic', |
@@ -233,7 +234,8 @@ SHOE BQT KEN BLOCK', | @@ -233,7 +234,8 @@ SHOE BQT KEN BLOCK', | ||
233 | ), | 234 | ), |
234 | 235 | ||
235 | 'cartInfo' =>array( | 236 | 'cartInfo' =>array( |
236 | - 'numInCart' => 3 | 237 | + 'numInCart' => 3, |
238 | + 'goodsInstore'=>0 | ||
237 | ) | 239 | ) |
238 | 240 | ||
239 | ); | 241 | ); |
@@ -247,6 +249,7 @@ SHOE BQT KEN BLOCK', | @@ -247,6 +249,7 @@ SHOE BQT KEN BLOCK', | ||
247 | 249 | ||
248 | public function commentsAction(){ | 250 | public function commentsAction(){ |
249 | $data = array( | 251 | $data = array( |
252 | + | ||
250 | 'goodsCommentsPage' =>true, | 253 | 'goodsCommentsPage' =>true, |
251 | 'pageHeader' => array ( | 254 | 'pageHeader' => array ( |
252 | 'navBack' => 'sss ', | 255 | 'navBack' => 'sss ', |
-
Please register or login to post a comment