Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
26 changed files
with
90 additions
and
45 deletions
@@ -81,17 +81,21 @@ class BindData | @@ -81,17 +81,21 @@ class BindData | ||
81 | * @param string $area 国别码 | 81 | * @param string $area 国别码 |
82 | * @param string $password 密码 | 82 | * @param string $password 密码 |
83 | */ | 83 | */ |
84 | - public static function bindMobile($openId, $nickname, $sourceType, $mobile, $area, $password = '') | 84 | + public static function bindMobile($openId, $sourceType, $mobile, $area, $password = '', $nickname = '') |
85 | { | 85 | { |
86 | $param = Yohobuy::param(); | 86 | $param = Yohobuy::param(); |
87 | 87 | ||
88 | $param['method'] = 'app.passport.bind'; | 88 | $param['method'] = 'app.passport.bind'; |
89 | $param['mobile'] = $mobile; | 89 | $param['mobile'] = $mobile; |
90 | $param['open_id'] = $openId; | 90 | $param['open_id'] = $openId; |
91 | - $param['nickname'] = $nickname; | ||
92 | $param['source_type'] = $sourceType; | 91 | $param['source_type'] = $sourceType; |
93 | $param['area'] = $area; | 92 | $param['area'] = $area; |
94 | - if (!empty($password)) { | 93 | + if (!empty($nickname)) |
94 | + { | ||
95 | + $param['nickname'] = $nickname; | ||
96 | + } | ||
97 | + if (!empty($password)) | ||
98 | + { | ||
95 | $param['password'] = $password; | 99 | $param['password'] = $password; |
96 | } | 100 | } |
97 | $param['client_secret'] = Sign::getSign($param); | 101 | $param['client_secret'] = Sign::getSign($param); |
@@ -99,7 +103,6 @@ class BindData | @@ -99,7 +103,6 @@ class BindData | ||
99 | return Yohobuy::get(Yohobuy::API_URL, $param); | 103 | return Yohobuy::get(Yohobuy::API_URL, $param); |
100 | } | 104 | } |
101 | 105 | ||
102 | - | ||
103 | /** | 106 | /** |
104 | * 换绑手机检验 | 107 | * 换绑手机检验 |
105 | * @param string $mobile 手机号 | 108 | * @param string $mobile 手机号 |
@@ -116,7 +119,6 @@ class BindData | @@ -116,7 +119,6 @@ class BindData | ||
116 | return Yohobuy::get(Yohobuy::API_URL, $param); | 119 | return Yohobuy::get(Yohobuy::API_URL, $param); |
117 | } | 120 | } |
118 | 121 | ||
119 | - | ||
120 | /** | 122 | /** |
121 | * 换绑手机 | 123 | * 换绑手机 |
122 | * @param string $uid 用户Id | 124 | * @param string $uid 用户Id |
@@ -138,5 +140,4 @@ class BindData | @@ -138,5 +140,4 @@ class BindData | ||
138 | return Yohobuy::get(Yohobuy::API_URL, $param); | 140 | return Yohobuy::get(Yohobuy::API_URL, $param); |
139 | } | 141 | } |
140 | 142 | ||
141 | - | ||
142 | } | 143 | } |
@@ -595,9 +595,13 @@ class Helpers | @@ -595,9 +595,13 @@ class Helpers | ||
595 | $oneGoods['inValid'] = true; | 595 | $oneGoods['inValid'] = true; |
596 | } elseif ($value['goods_type'] == 'gift' && !isset($value['isAdvanceBuy'])) { | 596 | } elseif ($value['goods_type'] == 'gift' && !isset($value['isAdvanceBuy'])) { |
597 | $oneGoods['isGift'] = true; | 597 | $oneGoods['isGift'] = true; |
598 | + $oneGoods['salesPrice'] = self::transPrice($value['sales_price']); | ||
599 | + $oneGoods['price'] = self::transPrice($value['sale_price']); | ||
598 | } elseif ($value['goods_type'] == 'price_gift') { | 600 | } elseif ($value['goods_type'] == 'price_gift') { |
599 | $oneGoods['showCheckbox'] = true; | 601 | $oneGoods['showCheckbox'] = true; |
600 | $oneGoods['isAdvanceBuy'] = true; | 602 | $oneGoods['isAdvanceBuy'] = true; |
603 | + $oneGoods['salesPrice'] = self::transPrice($value['sales_price']); | ||
604 | + $oneGoods['price'] = self::transPrice($value['sale_price']); | ||
601 | } else { | 605 | } else { |
602 | $oneGoods['showCheckbox'] = true; | 606 | $oneGoods['showCheckbox'] = true; |
603 | } | 607 | } |
@@ -634,6 +638,7 @@ class Helpers | @@ -634,6 +638,7 @@ class Helpers | ||
634 | $gift['promotionTitle'] = $value['promotion_title']; | 638 | $gift['promotionTitle'] = $value['promotion_title']; |
635 | 639 | ||
636 | foreach ($value['goods_list'] as $single) { | 640 | foreach ($value['goods_list'] as $single) { |
641 | + $oneGoods = array(); | ||
637 | $oneGoods['id'] = $single['product_skn']; | 642 | $oneGoods['id'] = $single['product_skn']; |
638 | $oneGoods['name'] = $single['product_name']; | 643 | $oneGoods['name'] = $single['product_name']; |
639 | $oneGoods['thumb'] = !empty($single['goods_images']) ? Images::getImageUrl($single['goods_images'], 120, 160) : ''; | 644 | $oneGoods['thumb'] = !empty($single['goods_images']) ? Images::getImageUrl($single['goods_images'], 120, 160) : ''; |
No preview for this file type
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > | 2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > |
3 | <svg xmlns="http://www.w3.org/2000/svg"> | 3 | <svg xmlns="http://www.w3.org/2000/svg"> |
4 | <metadata> | 4 | <metadata> |
5 | -Created by FontForge 20120731 at Thu Dec 17 13:53:30 2015 | 5 | +Created by FontForge 20120731 at Mon Dec 21 17:16:11 2015 |
6 | By Ads | 6 | By Ads |
7 | </metadata> | 7 | </metadata> |
8 | <defs> | 8 | <defs> |
@@ -16,10 +16,10 @@ Created by FontForge 20120731 at Thu Dec 17 13:53:30 2015 | @@ -16,10 +16,10 @@ Created by FontForge 20120731 at Thu Dec 17 13:53:30 2015 | ||
16 | ascent="896" | 16 | ascent="896" |
17 | descent="-128" | 17 | descent="-128" |
18 | x-height="792" | 18 | x-height="792" |
19 | - bbox="-0.75 -224 3943 833" | 19 | + bbox="-0.75 -224 3943 893" |
20 | underline-thickness="50" | 20 | underline-thickness="50" |
21 | underline-position="-100" | 21 | underline-position="-100" |
22 | - unicode-range="U+0078-E640" | 22 | + unicode-range="U+0078-E641" |
23 | /> | 23 | /> |
24 | <missing-glyph horiz-adv-x="374" | 24 | <missing-glyph horiz-adv-x="374" |
25 | d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" /> | 25 | d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" /> |
@@ -263,5 +263,10 @@ q0 -2 2 -5l15 -32q9 -30 39 -38v-3h392l18 1v2q14 4 24.5 14t14.5 24l98 217q40 77 1 | @@ -263,5 +263,10 @@ q0 -2 2 -5l15 -32q9 -30 39 -38v-3h392l18 1v2q14 4 24.5 14t14.5 24l98 217q40 77 1 | ||
263 | q0 7 3 12.5t9 9t12 3.5h119l3 -1h2q1 0 2 -1l4 -2q2 -1 4 -3q1 -1 2 -1.5t1 -1.5l4 -6l38 -83h619q8 0 10 -3q3 -6 1 -19t-7.5 -29.5t-13.5 -31.5zM470 107q-33 0 -56.5 -23t-23.5 -56q0 -22 10.5 -40.5t29 -29t40.5 -10.5q33 0 56.5 23.5t23.5 56.5t-23.5 56t-56.5 23z | 263 | q0 7 3 12.5t9 9t12 3.5h119l3 -1h2q1 0 2 -1l4 -2q2 -1 4 -3q1 -1 2 -1.5t1 -1.5l4 -6l38 -83h619q8 0 10 -3q3 -6 1 -19t-7.5 -29.5t-13.5 -31.5zM470 107q-33 0 -56.5 -23t-23.5 -56q0 -22 10.5 -40.5t29 -29t40.5 -10.5q33 0 56.5 23.5t23.5 56.5t-23.5 56t-56.5 23z |
264 | M470 -23q-21 0 -36 15t-15 36t15 36t36 15q14 0 25.5 -7t18.5 -19t7 -25q0 -22 -15 -36.5t-36 -14.5zM747 107q-33 0 -56.5 -23t-23.5 -56q0 -22 10.5 -40.5t29 -29t40.5 -10.5q33 0 56.5 23.5t23.5 56.5t-23.5 56t-56.5 23zM747 -23q-14 0 -26 6.5t-18.5 18.5t-6.5 25.5 | 264 | M470 -23q-21 0 -36 15t-15 36t15 36t36 15q14 0 25.5 -7t18.5 -19t7 -25q0 -22 -15 -36.5t-36 -14.5zM747 107q-33 0 -56.5 -23t-23.5 -56q0 -22 10.5 -40.5t29 -29t40.5 -10.5q33 0 56.5 23.5t23.5 56.5t-23.5 56t-56.5 23zM747 -23q-14 0 -26 6.5t-18.5 18.5t-6.5 25.5 |
265 | t6.5 25.5t18.5 19t26 7q21 0 36 -15t15 -36t-15 -36t-36 -15z" /> | 265 | t6.5 25.5t18.5 19t26 7q21 0 36 -15t15 -36t-15 -36t-36 -15z" /> |
266 | + <glyph glyph-name="uniE641" unicode="" horiz-adv-x="1045" | ||
267 | +d="M522 893q-103 0 -197 -40t-162 -108t-108.5 -162t-40.5 -197.5t40.5 -197.5t108.5 -162t162 -108t197.5 -40t197.5 40t162 108t108 162t40 197.5t-40 197.5t-108 162t-162 108t-198 40zM522 -49q-88 0 -168.5 34.5t-138.5 93t-92.5 138.5t-34.5 168.5t34.5 169 | ||
268 | +t92.5 138.5t138.5 92.5t169 34.5t168.5 -34.5t138.5 -92.5t93 -138.5t34.5 -169t-34.5 -168.5t-93 -138.5t-138.5 -93t-169 -34.5zM775 268l-105 61q-11 4 -21 6.5t-18 2.5t-15 -0.5t-13 -4t-10 -5.5t-9 -6l-6 -7q-2 -2 -6 -7l-3 -4l-6 -10q-34 -4 -59 21l-51 50 | ||
269 | +q-24 25 -20 60l9 4q3 5 16 16t17 18t4 25t-11 43h-1l-60 105q-8 13 -20.5 20t-26 7t-27.5 -7l-62 -36q-3 -1 -6 -4l-6 -6l-6 -6q-3 -3 -5.5 -6t-4.5 -5t-3 -4l-1 -1q-14 -87 24.5 -183.5t121.5 -174.5q72 -68 157 -101.5t165 -29.5q4 1 10.5 2.5t20.5 10t21 20.5l36 62 | ||
270 | +q11 20 5.5 41.5t-25.5 32.5z" /> | ||
266 | </font> | 271 | </font> |
267 | </defs></svg> | 272 | </defs></svg> |
No preview for this file type
No preview for this file type
static/img/me/employ/employ-red.jpg
0 → 100644
12.6 KB
@@ -93,7 +93,7 @@ function orderCompute() { | @@ -93,7 +93,7 @@ function orderCompute() { | ||
93 | }).then(function(res) { | 93 | }).then(function(res) { |
94 | var priceHtml; | 94 | var priceHtml; |
95 | 95 | ||
96 | - if (!res.length) { | 96 | + if ($.type(res) !== 'object') { |
97 | window.location.reload(); | 97 | window.location.reload(); |
98 | } else { | 98 | } else { |
99 | /*if (res.order_amount) { | 99 | /*if (res.order_amount) { |
@@ -70,6 +70,16 @@ $('#coupon-list').on('touchend', '.employ-main', function() { | @@ -70,6 +70,16 @@ $('#coupon-list').on('touchend', '.employ-main', function() { | ||
70 | 70 | ||
71 | orderInfo('couponCode', $this.data('coupon-code')); | 71 | orderInfo('couponCode', $this.data('coupon-code')); |
72 | orderInfo('couponName', $this.data('coupon-name')); | 72 | orderInfo('couponName', $this.data('coupon-name')); |
73 | +}).on('touchstart', '.employ-main', function() { | ||
74 | + var $this = $(this); | ||
75 | + | ||
76 | + $this.siblings().removeClass('focus'); | ||
77 | + $this.addClass('focus'); | ||
78 | +}).on('touchend touchcancel', '.employ-main', function() { | ||
79 | + var $this = $(this); | ||
80 | + | ||
81 | + $this.siblings().removeClass('focus'); | ||
82 | + $this.removeClass('focus'); | ||
73 | }); | 83 | }); |
74 | 84 | ||
75 | $('body').on('touchend', '.not-use', function() { | 85 | $('body').on('touchend', '.not-use', function() { |
@@ -42,13 +42,10 @@ optHammer.on('tap', function(e) { | @@ -42,13 +42,10 @@ optHammer.on('tap', function(e) { | ||
42 | }).then(function(res) { | 42 | }).then(function(res) { |
43 | $('#dialog-wrapper').hide(); | 43 | $('#dialog-wrapper').hide(); |
44 | if (!res) { | 44 | if (!res) { |
45 | - tip.show('网络错误'); | ||
46 | return; | 45 | return; |
47 | } | 46 | } |
48 | - if (res.code === 200) { | ||
49 | - tip.show('删除成功'); | ||
50 | - } else { | ||
51 | - tip.show(res.message || '网络错误'); | 47 | + if (res.message) { |
48 | + tip.show(res.message); | ||
52 | } | 49 | } |
53 | window.location.href = '/home/orders'; | 50 | window.location.href = '/home/orders'; |
54 | }).fail(function() { | 51 | }).fail(function() { |
@@ -74,13 +71,10 @@ optHammer.on('tap', function(e) { | @@ -74,13 +71,10 @@ optHammer.on('tap', function(e) { | ||
74 | }).then(function(res) { | 71 | }).then(function(res) { |
75 | $('#dialog-wrapper').hide(); | 72 | $('#dialog-wrapper').hide(); |
76 | if (!res) { | 73 | if (!res) { |
77 | - tip.show('网络错误'); | ||
78 | return; | 74 | return; |
79 | } | 75 | } |
80 | - if (res.code === 200) { | ||
81 | - tip.show('取消成功'); | ||
82 | - } else { | ||
83 | - tip.show(res.message || '网络错误'); | 76 | + if (res.message) { |
77 | + tip.show(res.message); | ||
84 | } | 78 | } |
85 | window.location.href = '/home/orders'; | 79 | window.location.href = '/home/orders'; |
86 | }).fail(function() { | 80 | }).fail(function() { |
@@ -20,14 +20,14 @@ var api = require('../api'), | @@ -20,14 +20,14 @@ var api = require('../api'), | ||
20 | var trim = $.trim; | 20 | var trim = $.trim; |
21 | var showErrTip = tip.show; | 21 | var showErrTip = tip.show; |
22 | 22 | ||
23 | -var requesting = false; | 23 | +var requested = false; |
24 | 24 | ||
25 | function nextStep(url, mobileNo, areaCode) { | 25 | function nextStep(url, mobileNo, areaCode) { |
26 | - if (requesting) { | 26 | + if (requested) { |
27 | return false; | 27 | return false; |
28 | } | 28 | } |
29 | 29 | ||
30 | - requesting = true; | 30 | + requested = true; |
31 | 31 | ||
32 | $.ajax({ | 32 | $.ajax({ |
33 | type: 'POST', | 33 | type: 'POST', |
@@ -39,13 +39,10 @@ function nextStep(url, mobileNo, areaCode) { | @@ -39,13 +39,10 @@ function nextStep(url, mobileNo, areaCode) { | ||
39 | success: function(res) { | 39 | success: function(res) { |
40 | console.log(res.data); | 40 | console.log(res.data); |
41 | location.href = url; | 41 | location.href = url; |
42 | - | ||
43 | - requesting = false; | ||
44 | }, | 42 | }, |
45 | error: function() { | 43 | error: function() { |
46 | tip.show('出错了,请重试!'); | 44 | tip.show('出错了,请重试!'); |
47 | - | ||
48 | - requesting = false; | 45 | + requested = false; |
49 | } | 46 | } |
50 | }); | 47 | }); |
51 | } | 48 | } |
@@ -16,6 +16,8 @@ var tip = require('../../plugin/tip'); | @@ -16,6 +16,8 @@ var tip = require('../../plugin/tip'); | ||
16 | var trim = $.trim; | 16 | var trim = $.trim; |
17 | var showErrTip = tip.show; | 17 | var showErrTip = tip.show; |
18 | 18 | ||
19 | +var requested = false; | ||
20 | + | ||
19 | api.selectCssHack($('#country-select')); | 21 | api.selectCssHack($('#country-select')); |
20 | 22 | ||
21 | api.bindClearEvt(); | 23 | api.bindClearEvt(); |
@@ -40,7 +42,15 @@ $btnNext.on('touchstart', function() { | @@ -40,7 +42,15 @@ $btnNext.on('touchstart', function() { | ||
40 | return; | 42 | return; |
41 | } | 43 | } |
42 | 44 | ||
45 | + if (requested) { | ||
46 | + return false; | ||
47 | + } | ||
48 | + | ||
49 | + | ||
43 | if (api.phoneRegx[areaCode].test(pn)) { | 50 | if (api.phoneRegx[areaCode].test(pn)) { |
51 | + | ||
52 | + requested = true; | ||
53 | + | ||
44 | $.ajax({ | 54 | $.ajax({ |
45 | url: '/passport/reg/verifymobile', | 55 | url: '/passport/reg/verifymobile', |
46 | type: 'POST', | 56 | type: 'POST', |
@@ -53,10 +63,15 @@ $btnNext.on('touchstart', function() { | @@ -53,10 +63,15 @@ $btnNext.on('touchstart', function() { | ||
53 | location.href = data.data; | 63 | location.href = data.data; |
54 | } else { | 64 | } else { |
55 | showErrTip(data.message); | 65 | showErrTip(data.message); |
66 | + requested = false; | ||
56 | } | 67 | } |
68 | + }, | ||
69 | + error: function(err) { | ||
70 | + showErrTip('出错了,请重试'); | ||
71 | + requested = false; | ||
57 | } | 72 | } |
58 | }); | 73 | }); |
59 | } else { | 74 | } else { |
60 | showErrTip('手机号格式不正确,请重新输入'); | 75 | showErrTip('手机号格式不正确,请重新输入'); |
61 | } | 76 | } |
62 | -}); | ||
77 | +}); |
@@ -32,6 +32,9 @@ function showFooter() { | @@ -32,6 +32,9 @@ function showFooter() { | ||
32 | }, 200); | 32 | }, 200); |
33 | } | 33 | } |
34 | 34 | ||
35 | +if ($('#goodsDiscount h1').length < 1) { | ||
36 | + $('.dropdown').remove(); | ||
37 | +} | ||
35 | showFooter(); | 38 | showFooter(); |
36 | 39 | ||
37 | lazyLoad($('img.lazy')); | 40 | lazyLoad($('img.lazy')); |
@@ -105,6 +105,8 @@ | @@ -105,6 +105,8 @@ | ||
105 | right: 20rem / $pxConvertRem; | 105 | right: 20rem / $pxConvertRem; |
106 | top: 71rem / $pxConvertRem; | 106 | top: 71rem / $pxConvertRem; |
107 | font-size: 26rem / $pxConvertRem; | 107 | font-size: 26rem / $pxConvertRem; |
108 | + line-height: 58rem / $pxConvertRem; | ||
109 | + text-align: center; | ||
108 | } | 110 | } |
109 | 111 | ||
110 | .title { | 112 | .title { |
@@ -3,6 +3,14 @@ | @@ -3,6 +3,14 @@ | ||
3 | position: relative; | 3 | position: relative; |
4 | padding-left: 16rem / $pxConvertRem; | 4 | padding-left: 16rem / $pxConvertRem; |
5 | 5 | ||
6 | + .prevent-img-click { | ||
7 | + width: 20rem / $pxConvertRem; | ||
8 | + height: 200rem / $pxConvertRem; | ||
9 | + position: absolute; | ||
10 | + background-color: transparent; | ||
11 | + z-index: 99; | ||
12 | + } | ||
13 | + | ||
6 | .checkbox { | 14 | .checkbox { |
7 | position: absolute; | 15 | position: absolute; |
8 | top: 50%; | 16 | top: 50%; |
@@ -40,6 +40,9 @@ | @@ -40,6 +40,9 @@ | ||
40 | background-size: 100% 100%; | 40 | background-size: 100% 100%; |
41 | color: #fff; | 41 | color: #fff; |
42 | position: relative; | 42 | position: relative; |
43 | + &.focus { | ||
44 | + background-image: image-url('me/employ/employ-red.jpg'); | ||
45 | + } | ||
43 | span{ | 46 | span{ |
44 | width: 34.482759%; | 47 | width: 34.482759%; |
45 | height: 100%; | 48 | height: 100%; |
@@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
12 | {{else}} | 12 | {{else}} |
13 | {{# freebie}} | 13 | {{# freebie}} |
14 | <div class="advance-block gift-block" data-promotion-id="{{promotionId}}"> | 14 | <div class="advance-block gift-block" data-promotion-id="{{promotionId}}"> |
15 | - <p class="title">{{title}}</p> | 15 | + <p class="title">{{promotionTitle}}</p> |
16 | {{#goods}} | 16 | {{#goods}} |
17 | {{> cart/gift-advance-good}} | 17 | {{> cart/gift-advance-good}} |
18 | {{/goods}} | 18 | {{/goods}} |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <span class="iconfont"></span> | 20 | <span class="iconfont"></span> |
21 | 赠品 | 21 | 赠品 |
22 | <span class="iconfont icon-right-arrow"></span> | 22 | <span class="iconfont icon-right-arrow"></span> |
23 | - <span class="count">{{count}}</span> | 23 | + <span class="count">{{giftCount}}</span> |
24 | </a> | 24 | </a> |
25 | </li> | 25 | </li> |
26 | {{/ freebie}} | 26 | {{/ freebie}} |
@@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
11 | <span class="price market-price">¥{{marketPrice}}</span> | 11 | <span class="price market-price">¥{{marketPrice}}</span> |
12 | {{/if}} | 12 | {{/if}} |
13 | </p> | 13 | </p> |
14 | - <button class="chose">选择</button> | 14 | + <span class="chose">选择</span> |
15 | </div> | 15 | </div> |
16 | 16 | ||
17 | 17 |
@@ -8,6 +8,7 @@ | @@ -8,6 +8,7 @@ | ||
8 | {{/if}} | 8 | {{/if}} |
9 | 9 | ||
10 | <div class="info"> | 10 | <div class="info"> |
11 | + <div class="prevent-img-click"></div> | ||
11 | <a href="{{link}}"> | 12 | <a href="{{link}}"> |
12 | <img class="thumb lazy" data-original="{{thumb}}"> | 13 | <img class="thumb lazy" data-original="{{thumb}}"> |
13 | </a> | 14 | </a> |
@@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
7 | <a href="{{.}}" class="iconfont nav-home"></a> | 7 | <a href="{{.}}" class="iconfont nav-home"></a> |
8 | {{/navHome}} | 8 | {{/navHome}} |
9 | {{#navPhone}} | 9 | {{#navPhone}} |
10 | - <a href="{{.}}" class="iconfont nav-home"></a> | 10 | + <a href="{{.}}" class="iconfont nav-home"></a> |
11 | {{/navPhone}} | 11 | {{/navPhone}} |
12 | {{#navTitle}} | 12 | {{#navTitle}} |
13 | <p class="nav-title">{{.}}</p> | 13 | <p class="nav-title">{{.}}</p> |
@@ -5,11 +5,11 @@ | @@ -5,11 +5,11 @@ | ||
5 | <a class="swiper-slide" href="{{url}}"> | 5 | <a class="swiper-slide" href="{{url}}"> |
6 | <img class="swiper-lazy img-box" data-src="{{thumb}}"> | 6 | <img class="swiper-lazy img-box" data-src="{{thumb}}"> |
7 | <div class="price"> | 7 | <div class="price"> |
8 | - <span class="sale-price {{^price}}no-price{{/price}}">¥{{salePrice}}</span> | ||
9 | - {{#price}}<span class="old-price">¥{{.}}</span>{{/price}} | 8 | + <span class="sale-price {{^price}}no-price{{/price}}">¥{{salePrice}}</span> |
9 | + {{#price}}<span class="old-price">¥{{.}}</span>{{/price}} | ||
10 | </div> | 10 | </div> |
11 | <div class="swiper-lazy-preloader"></div> | 11 | <div class="swiper-lazy-preloader"></div> |
12 | </a> | 12 | </a> |
13 | {{/recommendList}} | 13 | {{/recommendList}} |
14 | </div> | 14 | </div> |
15 | -</div> | ||
15 | +</div> |
@@ -46,7 +46,7 @@ class CartModel | @@ -46,7 +46,7 @@ class CartModel | ||
46 | * | 46 | * |
47 | * @param integer $uid 用户ID | 47 | * @param integer $uid 用户ID |
48 | * @param string $shoppingKey 未登录用户唯一识别码 | 48 | * @param string $shoppingKey 未登录用户唯一识别码 |
49 | - * @param string $cartType 购物车类型 | 49 | + * @param string $cartType 购物车类型,默认是是所有购物车,ordinary为普通购物车,advance为预售购物车 |
50 | * @param bool $onlyGift 只获取赠品的商品数据 | 50 | * @param bool $onlyGift 只获取赠品的商品数据 |
51 | * @param bool $onlyAdvanceBuy 只获取加价购的商品数据 | 51 | * @param bool $onlyAdvanceBuy 只获取加价购的商品数据 |
52 | * @return array|mixed 处理之后的购物车数据 | 52 | * @return array|mixed 处理之后的购物车数据 |
@@ -73,7 +73,7 @@ class CartModel | @@ -73,7 +73,7 @@ class CartModel | ||
73 | 73 | ||
74 | $cart = $cartData['data']; | 74 | $cart = $cartData['data']; |
75 | 75 | ||
76 | - if ($cartType !== 'all') { // 加价购或者赠品数据 | 76 | + if ($onlyGift || $onlyAdvanceBuy) { // 加价购或者赠品数据 |
77 | $result = self::procCartData($cart['ordinary_cart_data'], $onlyGift, $onlyAdvanceBuy); | 77 | $result = self::procCartData($cart['ordinary_cart_data'], $onlyGift, $onlyAdvanceBuy); |
78 | break; | 78 | break; |
79 | } | 79 | } |
@@ -99,7 +99,7 @@ class CartModel | @@ -99,7 +99,7 @@ class CartModel | ||
99 | // 以上两个购物车中都有数据, 默认显示普通购物车 | 99 | // 以上两个购物车中都有数据, 默认显示普通购物车 |
100 | else { | 100 | else { |
101 | $result['cartNav'] = true; | 101 | $result['cartNav'] = true; |
102 | - $result['cartType'] = 'ordinary'; | 102 | + $result['cartType'] = $cartType !== 'all' ? $cartType : 'ordinary'; |
103 | } | 103 | } |
104 | 104 | ||
105 | /* 普通购物车 */ | 105 | /* 普通购物车 */ |
@@ -40,10 +40,11 @@ class IndexController extends AbstractAction | @@ -40,10 +40,11 @@ class IndexController extends AbstractAction | ||
40 | 40 | ||
41 | $shoppingKey = Helpers::getShoppingKeyByCookie(); | 41 | $shoppingKey = Helpers::getShoppingKeyByCookie(); |
42 | $uid = $this->getUid(true); | 42 | $uid = $this->getUid(true); |
43 | + $cartType = $this->get('cartType', 'all'); | ||
43 | 44 | ||
44 | $data = array( | 45 | $data = array( |
45 | 'shoppingCartPage' => true, | 46 | 'shoppingCartPage' => true, |
46 | - 'shoppingCart' => CartModel::getCartData($uid, $shoppingKey) | 47 | + 'shoppingCart' => CartModel::getCartData($uid, $shoppingKey, $cartType) |
47 | ); | 48 | ); |
48 | 49 | ||
49 | // 渲染模板 | 50 | // 渲染模板 |
@@ -225,14 +225,14 @@ class BindController extends AbstractAction | @@ -225,14 +225,14 @@ class BindController extends AbstractAction | ||
225 | $openId = $this->post('openId'); | 225 | $openId = $this->post('openId'); |
226 | $areaCode = $this->post('areaCode', '86'); | 226 | $areaCode = $this->post('areaCode', '86'); |
227 | $sourceType = $this->post('sourceType'); | 227 | $sourceType = $this->post('sourceType'); |
228 | - $nickname = $this->post('nickname'); | ||
229 | - $password = $this->post('password'); | 228 | +// $nickname = $this->post('nickname');//nickname不同步信息 |
229 | + $password = !empty($this->post('password'))?$this->post('password'):''; | ||
230 | 230 | ||
231 | if (!is_numeric($phoneNum) || !$openId || !$sourceType || !$areaCode) { | 231 | if (!is_numeric($phoneNum) || !$openId || !$sourceType || !$areaCode) { |
232 | break; | 232 | break; |
233 | } | 233 | } |
234 | 234 | ||
235 | - $res = BindData::bindMobile($openId, $nickname, $sourceType, $phoneNum, $areaCode, $password); | 235 | + $res = BindData::bindMobile($openId,$sourceType, $phoneNum, $areaCode, $password); |
236 | if (!isset($res['code'])) { | 236 | if (!isset($res['code'])) { |
237 | break; | 237 | break; |
238 | } | 238 | } |
-
Please register or login to post a comment