fixed confilct. code review by BiKai
Showing
4 changed files
with
18 additions
and
17 deletions
@@ -23,15 +23,15 @@ class Yohobuy | @@ -23,15 +23,15 @@ class Yohobuy | ||
23 | // const SERVICE_URL = 'http://service.api.yohobuy.com/'; | 23 | // const SERVICE_URL = 'http://service.api.yohobuy.com/'; |
24 | // const YOHOBUY_URL = 'http://www.yohobuy.com/'; | 24 | // const YOHOBUY_URL = 'http://www.yohobuy.com/'; |
25 | 25 | ||
26 | - const API_URL = 'http://apih5.yoho.cn/'; | ||
27 | - const API_URL2 = 'http://apih5.yoho.cn/'; | ||
28 | - const SERVICE_URL = 'http://serviceh5.yoho.cn/'; | ||
29 | - const YOHOBUY_URL = 'http://www.yohobuy.com/'; | 26 | +// const API_URL = 'http://apih5.yoho.cn/'; |
27 | +// const API_URL2 = 'http://apih5.yoho.cn/'; | ||
28 | +// const SERVICE_URL = 'http://serviceh5.yoho.cn/'; | ||
29 | +// const YOHOBUY_URL = 'http://www.yohobuy.com/'; | ||
30 | 30 | ||
31 | // /* 测试环境 */ | 31 | // /* 测试环境 */ |
32 | -// const API_URL = 'http://testapi.yoho.cn:28078/'; | ||
33 | -// const SERVICE_URL = 'http://testservice.yoho.cn:28077/'; | ||
34 | -// const YOHOBUY_URL = 'http://www.yohobuy.com/'; | 32 | + const API_URL = 'http://testapi.yoho.cn:28078/'; |
33 | + const SERVICE_URL = 'http://testservice.yoho.cn:28077/'; | ||
34 | + const YOHOBUY_URL = 'http://www.yohobuy.com/'; | ||
35 | 35 | ||
36 | /** | 36 | /** |
37 | * 私钥列表 | 37 | * 私钥列表 |
@@ -591,6 +591,7 @@ class Helpers | @@ -591,6 +591,7 @@ class Helpers | ||
591 | } elseif ($value['goods_type'] == 'gift' && !isset($value['isAdvanceBuy'])) { | 591 | } elseif ($value['goods_type'] == 'gift' && !isset($value['isAdvanceBuy'])) { |
592 | $oneGoods['isGift'] = true; | 592 | $oneGoods['isGift'] = true; |
593 | } elseif ($value['goods_type'] == 'price_gift') { | 593 | } elseif ($value['goods_type'] == 'price_gift') { |
594 | + $oneGoods['showCheckbox'] = true; | ||
594 | $oneGoods['isAdvanceBuy'] = true; | 595 | $oneGoods['isAdvanceBuy'] = true; |
595 | } else { | 596 | } else { |
596 | $oneGoods['showCheckbox'] = true; | 597 | $oneGoods['showCheckbox'] = true; |
@@ -631,7 +632,7 @@ class Helpers | @@ -631,7 +632,7 @@ class Helpers | ||
631 | $oneGoods['id'] = $single['product_skn']; | 632 | $oneGoods['id'] = $single['product_skn']; |
632 | $oneGoods['name'] = $single['product_name']; | 633 | $oneGoods['name'] = $single['product_name']; |
633 | $oneGoods['thumb'] = !empty($single['goods_images']) ? Images::getImageUrl($single['goods_images'], 120, 160) : ''; | 634 | $oneGoods['thumb'] = !empty($single['goods_images']) ? Images::getImageUrl($single['goods_images'], 120, 160) : ''; |
634 | - $oneGoods['price'] = self::transPrice($single['sales_price']); | 635 | + $oneGoods['price'] = self::transPrice($single['last_price']); |
635 | $oneGoods['marketPrice'] = self::transPrice($single['market_price']); | 636 | $oneGoods['marketPrice'] = self::transPrice($single['market_price']); |
636 | $oneGoods['count'] = $single['storage_number']; | 637 | $oneGoods['count'] = $single['storage_number']; |
637 | 638 |
@@ -16,6 +16,7 @@ var page = 1, | @@ -16,6 +16,7 @@ var page = 1, | ||
16 | isGetData; | 16 | isGetData; |
17 | 17 | ||
18 | var conponTmpl = Handlebars.compile($('#tmpl-coupon').html()), | 18 | var conponTmpl = Handlebars.compile($('#tmpl-coupon').html()), |
19 | + conponNotAvaliableTmpl = Handlebars.compile($('#tmpl-coupon-not-avaliable').html()), | ||
19 | $newCoupon = $('#new-coupon'); | 20 | $newCoupon = $('#new-coupon'); |
20 | 21 | ||
21 | var winH = $(window).height(); | 22 | var winH = $(window).height(); |
@@ -137,14 +138,13 @@ function getCouponHandle(coupons) { | @@ -137,14 +138,13 @@ function getCouponHandle(coupons) { | ||
137 | coupons: coupons | 138 | coupons: coupons |
138 | })); | 139 | })); |
139 | 140 | ||
140 | - // 产品说,暂时不做不可使用的优惠券 | ||
141 | - // if (notAvailableCoupons.length) { | ||
142 | - // $('.not-avaliable-coupon-line').show(); | ||
143 | - // } | ||
144 | - // $('#coupon-list-not').append(conponNotAvaliableTmpl({ | ||
145 | - // notAvailableCoupons: notAvailableCoupons | ||
146 | - // })); | ||
147 | 141 | ||
142 | + if (notAvailableCoupons.length) { | ||
143 | + $('.not-avaliable-coupon-line').show(); | ||
144 | + } | ||
145 | + $('#coupon-list-not').append(conponNotAvaliableTmpl({ | ||
146 | + notAvailableCoupons: notAvailableCoupons | ||
147 | + })); | ||
148 | window.rePosFooter(); | 148 | window.rePosFooter(); |
149 | 149 | ||
150 | } | 150 | } |
@@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
13 | <ul class="freebie-and-advance-buy"> | 13 | <ul class="freebie-and-advance-buy"> |
14 | {{# freebie}} | 14 | {{# freebie}} |
15 | <li class="freebie"> | 15 | <li class="freebie"> |
16 | - <a href="/cart/index/gift?cartType="> | 16 | + <a href="/cart/index/gift?cartType={{cartType}}"> |
17 | <span class="iconfont"></span> | 17 | <span class="iconfont"></span> |
18 | 赠品 | 18 | 赠品 |
19 | <span class="count">{{count}}</span> | 19 | <span class="count">{{count}}</span> |
@@ -23,7 +23,7 @@ | @@ -23,7 +23,7 @@ | ||
23 | {{/ freebie}} | 23 | {{/ freebie}} |
24 | {{#if advanceBuy}} | 24 | {{#if advanceBuy}} |
25 | <li class="advance-buy"> | 25 | <li class="advance-buy"> |
26 | - <a href="/cart/index/advanceBuy?cartType="> | 26 | + <a href="/cart/index/advanceBuy?cartType={{cartType}}"> |
27 | <span class="iconfont"></span> | 27 | <span class="iconfont"></span> |
28 | 加价购 | 28 | 加价购 |
29 | <span class="count">{{advanceBuyCount}}</span> | 29 | <span class="count">{{advanceBuyCount}}</span> |
-
Please register or login to post a comment