Merge branch 'release/1.0' of http://git.yoho.cn/fe/yoho-blk into release/1.0
Showing
13 changed files
with
26 additions
and
20 deletions
@@ -9,6 +9,13 @@ | @@ -9,6 +9,13 @@ | ||
9 | {{# goodInfo}} | 9 | {{# goodInfo}} |
10 | <div class="product-main clearfix" data-id="{{id}}"> | 10 | <div class="product-main clearfix" data-id="{{id}}"> |
11 | <div class="thumbs left clearfix"> | 11 | <div class="thumbs left clearfix"> |
12 | + <div class="thumb-show right"> | ||
13 | + <img id="main-thumb" src="{{image img 482 643}}" style="display: block;"> | ||
14 | + <div class="check-btns"> | ||
15 | + <span class="iconfont pre-thumb"></span> | ||
16 | + <span class="iconfont next-thumb"></span> | ||
17 | + </div> | ||
18 | + </div> | ||
12 | <div class="thumb-list hide"> | 19 | <div class="thumb-list hide"> |
13 | {{# colors}} | 20 | {{# colors}} |
14 | <div class="thumb-wrap{{#unless cur}} hide{{/unless}}"> | 21 | <div class="thumb-wrap{{#unless cur}} hide{{/unless}}"> |
@@ -24,13 +31,6 @@ | @@ -24,13 +31,6 @@ | ||
24 | </div> | 31 | </div> |
25 | {{/ colors}} | 32 | {{/ colors}} |
26 | </div> | 33 | </div> |
27 | - <div class="thumb-show right"> | ||
28 | - <img id="main-thumb" src="{{image img 482 643}}" style="display: block;"> | ||
29 | - <div class="check-btns"> | ||
30 | - <span class="iconfont pre-thumb"></span> | ||
31 | - <span class="iconfont next-thumb"></span> | ||
32 | - </div> | ||
33 | - </div> | ||
34 | </div> | 34 | </div> |
35 | <div class="infos left clearfix"> | 35 | <div class="infos left clearfix"> |
36 | <p class="brand-name">{{brandName}}</p> | 36 | <p class="brand-name">{{brandName}}</p> |
@@ -79,7 +79,7 @@ const callback = (req, res) => { | @@ -79,7 +79,7 @@ const callback = (req, res) => { | ||
79 | if (result.code === 200) { | 79 | if (result.code === 200) { |
80 | let data = result.data; | 80 | let data = result.data; |
81 | 81 | ||
82 | - res.render('pay-success', { | 82 | + res.display('pay-success', { |
83 | defaultHeader: false, | 83 | defaultHeader: false, |
84 | content: { | 84 | content: { |
85 | cost: data.pay, | 85 | cost: data.pay, |
@@ -18,7 +18,7 @@ const pay = require(`${cRoot}/pay`); // 支付 | @@ -18,7 +18,7 @@ const pay = require(`${cRoot}/pay`); // 支付 | ||
18 | router.get('/cart', cartCtrl.index); | 18 | router.get('/cart', cartCtrl.index); |
19 | router.post('/cart/product/change_num', cartCtrl.changeProductNum); | 19 | router.post('/cart/product/change_num', cartCtrl.changeProductNum); |
20 | router.delete('/cart/product/remove', cartCtrl.removeProduct); | 20 | router.delete('/cart/product/remove', cartCtrl.removeProduct); |
21 | -router.post('/cart/product/send_to_favorite', cartCtrl.sendToFavorite); | 21 | +router.post('/cart/product/send_to_favorite', auth, cartCtrl.sendToFavorite); |
22 | router.post('/cart/add', cartCtrl.addToCart); | 22 | router.post('/cart/add', cartCtrl.addToCart); |
23 | router.post('/cart/toggleSelectGoods', cartCtrl.toggleSelectGoods); | 23 | router.post('/cart/toggleSelectGoods', cartCtrl.toggleSelectGoods); |
24 | router.get('/cart/checkStorage', cartCtrl.checkStorage); | 24 | router.get('/cart/checkStorage', cartCtrl.checkStorage); |
@@ -21,7 +21,7 @@ | @@ -21,7 +21,7 @@ | ||
21 | 1.每天15:00以前成功支付的订单将在当天发货,15:00-00:00成功付款的订单将在第二天发货。 | 21 | 1.每天15:00以前成功支付的订单将在当天发货,15:00-00:00成功付款的订单将在第二天发货。 |
22 | 2.当订单发货后,您可以登录<a class="blue" href="/me/order">订单中心</a>查询快递发货详情。 | 22 | 2.当订单发货后,您可以登录<a class="blue" href="/me/order">订单中心</a>查询快递发货详情。 |
23 | 3.YOHO!BLK有货支持“开箱验货”和“15天退换货保障”收货后请当面验货,如果发现商品有任何问题请致电客服电话400-889-9646, | 23 | 3.YOHO!BLK有货支持“开箱验货”和“15天退换货保障”收货后请当面验货,如果发现商品有任何问题请致电客服电话400-889-9646, |
24 | - <a class="blue" href="">“退换货政策”</a>请点击查看。<em class="blue">4.尊敬的用户:近期为网络诈骗高发期,YOHO!BLK有货郑重声明,不会以任何形式索取客户的账户信息或引导转账,敬请提高警惕,谨防诈骗</em> | 24 | + <a class="blue" href="/help?id=43">“退换货政策”</a>请点击查看。<em class="blue">4.尊敬的用户:近期为网络诈骗高发期,YOHO!BLK有货郑重声明,不会以任何形式索取客户的账户信息或引导转账,敬请提高警惕,谨防诈骗</em> |
25 | </p> | 25 | </p> |
26 | </div> | 26 | </div> |
27 | {{/ content}} | 27 | {{/ content}} |
@@ -33,9 +33,9 @@ | @@ -33,9 +33,9 @@ | ||
33 | {{/if}} | 33 | {{/if}} |
34 | <span class="iconfont"></span> | 34 | <span class="iconfont"></span> |
35 | </div> | 35 | </div> |
36 | - {{#expect_arrival_time}} | 36 | + {{#if expect_arrival_time}} |
37 | <div class="published-at">上市期: {{expect_arrival_time}}</div> | 37 | <div class="published-at">上市期: {{expect_arrival_time}}</div> |
38 | - {{/expect_arrival_time}} | 38 | + {{/if}} |
39 | </li> | 39 | </li> |
40 | <li class="price-num"> | 40 | <li class="price-num"> |
41 | <span class="price sale-price">¥ {{round sales_price 2}}</span> | 41 | <span class="price sale-price">¥ {{round sales_price 2}}</span> |
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | </label> | 8 | </label> |
9 | </div> | 9 | </div> |
10 | <div class="item product">货品</div> | 10 | <div class="item product">货品</div> |
11 | - <div class="item price">价格</div> | 11 | + <div class="item price">单价</div> |
12 | <div class="item num">数量</div> | 12 | <div class="item num">数量</div> |
13 | <div class="item pro-total-price">总价</div> | 13 | <div class="item pro-total-price">总价</div> |
14 | <div class="item actions">操作</div> | 14 | <div class="item actions">操作</div> |
@@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
7 | </p> | 7 | </p> |
8 | {{^}} | 8 | {{^}} |
9 | <p class="info-text"> | 9 | <p class="info-text"> |
10 | - 温馨提示: 亲爱的顾客,您还没有<a href="/passport/login">登录</a>哦, 所有的商品价购、活动信息以登录后显示为准。 | 10 | + 温馨提示: 亲爱的顾客,您还没有<a href="/passport/login">登录</a>哦, 所有的商品价格、活动信息以登录后显示为准。 |
11 | <span class="iconfont pull-right close"></span> | 11 | <span class="iconfont pull-right close"></span> |
12 | </p> | 12 | </p> |
13 | {{/if}} | 13 | {{/if}} |
@@ -182,6 +182,9 @@ const requestNavBar = (type) => { | @@ -182,6 +182,9 @@ const requestNavBar = (type) => { | ||
182 | cache: true, | 182 | cache: true, |
183 | code: 200 | 183 | code: 200 |
184 | }).then(res => { | 184 | }).then(res => { |
185 | + if (!res) { | ||
186 | + return {}; | ||
187 | + } | ||
185 | return setHeaderData(res.data, type); | 188 | return setHeaderData(res.data, type); |
186 | }); | 189 | }); |
187 | }; | 190 | }; |
@@ -7,7 +7,7 @@ module.exports = function(leftNumber) { | @@ -7,7 +7,7 @@ module.exports = function(leftNumber) { | ||
7 | leftNumber = typeof num1 === 'number' ? leftNumber : parseFloat(leftNumber, 10); | 7 | leftNumber = typeof num1 === 'number' ? leftNumber : parseFloat(leftNumber, 10); |
8 | 8 | ||
9 | if (leftNumber <= 3 && leftNumber >= 0) { | 9 | if (leftNumber <= 3 && leftNumber >= 0) { |
10 | - return `仅剩${leftNumber}件`; | 10 | + return '仅剩' + leftNumber + '件'; |
11 | } else if (leftNumber < 0) { | 11 | } else if (leftNumber < 0) { |
12 | return '库存不足'; | 12 | return '库存不足'; |
13 | } | 13 | } |
@@ -27,7 +27,7 @@ lazyLoad($('.banner-img')); | @@ -27,7 +27,7 @@ lazyLoad($('.banner-img')); | ||
27 | // 浮动在线客服和返回顶部的鼠标移入移出切换效果 | 27 | // 浮动在线客服和返回顶部的鼠标移入移出切换效果 |
28 | function toggleShow(e) { | 28 | function toggleShow(e) { |
29 | $(e.target).find('span').toggleClass('hide'); | 29 | $(e.target).find('span').toggleClass('hide'); |
30 | -}; | 30 | +} |
31 | 31 | ||
32 | $('.service, .return-top').hover(toggleShow, toggleShow); | 32 | $('.service, .return-top').hover(toggleShow, toggleShow); |
33 | 33 |
@@ -471,4 +471,11 @@ var Cart = { | @@ -471,4 +471,11 @@ var Cart = { | ||
471 | } | 471 | } |
472 | }; | 472 | }; |
473 | 473 | ||
474 | +require('yoho-jquery-dotdotdot'); | ||
475 | + | ||
476 | +// product name dotdotdot | ||
477 | +$('.pro-name a').dotdotdot({ | ||
478 | + wrap: 'letter' | ||
479 | +}); | ||
480 | + | ||
474 | module.exports = Cart; | 481 | module.exports = Cart; |
@@ -112,9 +112,6 @@ $hoverColor: #379ed6; | @@ -112,9 +112,6 @@ $hoverColor: #379ed6; | ||
112 | width: 234px; | 112 | width: 234px; |
113 | word-wrap: break-word; | 113 | word-wrap: break-word; |
114 | margin-bottom: 13px; | 114 | margin-bottom: 13px; |
115 | - display: -webkit-box; | ||
116 | - -webkit-box-orient: vertical; | ||
117 | - -webkit-line-clamp: 2; | ||
118 | line-height: 1.3em; | 115 | line-height: 1.3em; |
119 | overflow: hidden; | 116 | overflow: hidden; |
120 | :hover { | 117 | :hover { |
-
Please register or login to post a comment