Merge branch 'feature/cart' of http://git.dev.yoho.cn/web/yohobuy into feature/cart
Showing
33 changed files
with
495 additions
and
309 deletions
@@ -817,7 +817,7 @@ | @@ -817,7 +817,7 @@ | ||
817 | }, | 817 | }, |
818 | ... | 818 | ... |
819 | ], | 819 | ], |
820 | - | 820 | + |
821 | totalNum: 20 | 821 | totalNum: 20 |
822 | } | 822 | } |
823 | 823 | ||
@@ -1245,10 +1245,9 @@ | @@ -1245,10 +1245,9 @@ | ||
1245 | 'notForSale':'非卖品', | 1245 | 'notForSale':'非卖品', |
1246 | 1246 | ||
1247 | 1247 | ||
1248 | - thumb: [ | 1248 | + thumbs: [ |
1249 | { | 1249 | { |
1250 | - id:1, | ||
1251 | - url : '' | 1250 | + img : '' |
1252 | }, | 1251 | }, |
1253 | ... | 1252 | ... |
1254 | ], | 1253 | ], |
@@ -1256,34 +1255,36 @@ | @@ -1256,34 +1255,36 @@ | ||
1256 | price: '', | 1255 | price: '', |
1257 | salePrice: '', | 1256 | salePrice: '', |
1258 | colors: [ | 1257 | colors: [ |
1259 | - { | ||
1260 | - id: 1, | ||
1261 | - chosed: true, | ||
1262 | - name: '黄色', | ||
1263 | - colorNum:10, | ||
1264 | - sizeNumStr:'10/20/30' //对应的商品尺码数目,用斜杠分割 | ||
1265 | - | ||
1266 | - }, | ||
1267 | - ... | ||
1268 | - ], | 1258 | + { |
1259 | + id: 1, | ||
1260 | + skcId:, | ||
1261 | + chosed: true, | ||
1262 | + name: '黄色', | ||
1263 | + colorNum:10, | ||
1264 | + sizeNumStr:'10/20/30' //对应的商品尺码数目,用斜杠分割 | ||
1265 | + | ||
1266 | + }, | ||
1267 | + ... | ||
1268 | + ], | ||
1269 | + | ||
1269 | sizes: [ | 1270 | sizes: [ |
1270 | { | 1271 | { |
1271 | id: 2, | 1272 | id: 2, |
1273 | + skuId:, | ||
1274 | + goodId:, | ||
1272 | chosed: true, | 1275 | chosed: true, |
1273 | name: 'X', | 1276 | name: 'X', |
1274 | sizeNum: 2, | 1277 | sizeNum: 2, |
1275 | colorNumStr:'10/20/30' //对应的商品颜色数目用斜杠分割 | 1278 | colorNumStr:'10/20/30' //对应的商品颜色数目用斜杠分割 |
1276 | }, | 1279 | }, |
1277 | ... | 1280 | ... |
1278 | - ], | ||
1279 | - | ||
1280 | - totalNum: 20 | 1281 | + ] |
1281 | }, | 1282 | }, |
1282 | 'introUrl' : '', | 1283 | 'introUrl' : '', |
1283 | 'id' : '', | 1284 | 'id' : '', |
1284 | 'preferenceUrl' :'', | 1285 | 'preferenceUrl' :'', |
1285 | } | 1286 | } |
1286 | -### 评价列表页面 | 1287 | +### 评价列表页面 |
1287 | { | 1288 | { |
1288 | 'comments':{ | 1289 | 'comments':{ |
1289 | 'list' : [ | 1290 | 'list' : [ |
@@ -1375,5 +1376,7 @@ | @@ -1375,5 +1376,7 @@ | ||
1375 | 'entitle' : 'LIFESTYLE', | 1376 | 'entitle' : 'LIFESTYLE', |
1376 | } | 1377 | } |
1377 | ], | 1378 | ], |
1378 | - 'showYohood' : true/false | 1379 | + 'showYohood' : true/false, |
1380 | + 'yohoodHref' : '/yohood' | ||
1379 | } | 1381 | } |
1382 | + |
framework @ 75bbc3b0
@@ -22,9 +22,24 @@ class HelpData | @@ -22,9 +22,24 @@ class HelpData | ||
22 | $param['method'] = 'app.help.li'; | 22 | $param['method'] = 'app.help.li'; |
23 | $param['client_secret'] = Sign::getSign($param); | 23 | $param['client_secret'] = Sign::getSign($param); |
24 | 24 | ||
25 | - return Yohobuy::post(Yohobuy::API_URL, $param, $param); | 25 | + return Yohobuy::post(Yohobuy::API_URL, $param); |
26 | } | 26 | } |
27 | 27 | ||
28 | + | ||
29 | + | ||
30 | + /* | ||
31 | + * 获取帮助中心列表 | ||
32 | + */ | ||
33 | + public static function serviceDetail($code) | ||
34 | + { | ||
35 | + //构建必传参数 | ||
36 | + $param = Yohobuy::param(); | ||
37 | + $param['method'] = 'app.help.detail'; | ||
38 | + $param['code'] = $code; | ||
39 | + $param['return_type'] = 'html'; | ||
40 | + $param['client_secret'] = Sign::getSign($param); | ||
41 | + return Yohobuy::post(Yohobuy::API_URL, $param, true); | ||
42 | + } | ||
28 | 43 | ||
29 | 44 | ||
30 | } | 45 | } |
@@ -67,5 +67,17 @@ class IndexData | @@ -67,5 +67,17 @@ class IndexData | ||
67 | 67 | ||
68 | return Yohobuy::get(Yohobuy::SERVICE_URL . 'operations/api/v5/resource/home', $param); | 68 | return Yohobuy::get(Yohobuy::SERVICE_URL . 'operations/api/v5/resource/home', $param); |
69 | } | 69 | } |
70 | + | ||
71 | + /** | ||
72 | + * 获取频道选择页数据 | ||
73 | + * | ||
74 | + * @return array | ||
75 | + */ | ||
76 | + public static function channelData() | ||
77 | + { | ||
78 | + $param = Yohobuy::param(); | ||
79 | + $param['client_secret'] = Sign::getSign($param); | ||
80 | + return Yohobuy::get(Yohobuy::SERVICE_URL . 'operations/api/v5/entrance/getEntrance',$param,3600); | ||
81 | + } | ||
70 | 82 | ||
71 | } | 83 | } |
@@ -6,7 +6,9 @@ | @@ -6,7 +6,9 @@ | ||
6 | 6 | ||
7 | var $ = require('jquery'), | 7 | var $ = require('jquery'), |
8 | lazyLoad = require('yoho.lazyload'), | 8 | lazyLoad = require('yoho.lazyload'), |
9 | - Hammer = require('yoho.hammer'); | 9 | + Hammer = require('yoho.hammer'), |
10 | + dialog = require('./dialog'), | ||
11 | + tip = require('../plugin/tip'); | ||
10 | 12 | ||
11 | var orderId = $('#order-detail').data('id'); | 13 | var orderId = $('#order-detail').data('id'); |
12 | 14 | ||
@@ -24,26 +26,64 @@ optHammer.on('tap', function(e) { | @@ -24,26 +26,64 @@ optHammer.on('tap', function(e) { | ||
24 | if ($cur.hasClass('btn-del')) { | 26 | if ($cur.hasClass('btn-del')) { |
25 | 27 | ||
26 | //删除订单 | 28 | //删除订单 |
27 | - if (confirm('确定删除订单吗?')) { | 29 | + dialog.showDialog({ |
30 | + dialogText: '确定删除订单吗?', | ||
31 | + hasFooter: { | ||
32 | + leftBtnText: '取消', | ||
33 | + rightBtnText: '确定' | ||
34 | + } | ||
35 | + }, function() { | ||
28 | $.ajax({ | 36 | $.ajax({ |
29 | type: 'GET', | 37 | type: 'GET', |
30 | url: '/home/delOrder', | 38 | url: '/home/delOrder', |
31 | data: { | 39 | data: { |
32 | id: orderId | 40 | id: orderId |
33 | } | 41 | } |
42 | + }).then(function(res) { | ||
43 | + $('#dialog-wrapper').hide(); | ||
44 | + if (!res) { | ||
45 | + tip.show('网络错误'); | ||
46 | + } | ||
47 | + if (res.code === 200) { | ||
48 | + tip.show('删除成功'); | ||
49 | + } else { | ||
50 | + tip.show(res.message || '网络错误'); | ||
51 | + } | ||
52 | + window.location.href = '/home/orders'; | ||
53 | + }).fail(function() { | ||
54 | + tip.show('网络错误'); | ||
34 | }); | 55 | }); |
35 | - } | 56 | + }); |
36 | } else if ($cur.hasClass('btn-cancel')) { | 57 | } else if ($cur.hasClass('btn-cancel')) { |
37 | 58 | ||
38 | //取消订单 | 59 | //取消订单 |
39 | - if (confirm('确定取消订单吗?')) { | 60 | + dialog.showDialog({ |
61 | + dialogText: '确定取消订单吗?', | ||
62 | + hasFooter: { | ||
63 | + leftBtnText: '取消', | ||
64 | + rightBtnText: '确定' | ||
65 | + } | ||
66 | + }, function() { | ||
40 | $.ajax({ | 67 | $.ajax({ |
41 | type: 'GET', | 68 | type: 'GET', |
42 | url: '/home/cancelOrder', | 69 | url: '/home/cancelOrder', |
43 | data: { | 70 | data: { |
44 | id: orderId | 71 | id: orderId |
45 | } | 72 | } |
73 | + }).then(function(res) { | ||
74 | + $('#dialog-wrapper').hide(); | ||
75 | + if (!res) { | ||
76 | + tip.show('网络错误'); | ||
77 | + } | ||
78 | + if (res.code === 200) { | ||
79 | + tip.show('取消成功'); | ||
80 | + } else { | ||
81 | + tip.show(res.message || '网络错误'); | ||
82 | + } | ||
83 | + window.location.reload(); | ||
84 | + }).fail(function() { | ||
85 | + tip.show('网络错误'); | ||
46 | }); | 86 | }); |
47 | - } | 87 | + }); |
48 | } | 88 | } |
49 | -}); | ||
89 | +}); |
@@ -10,28 +10,51 @@ var Swiper = require('yoho.iswiper'), | @@ -10,28 +10,51 @@ var Swiper = require('yoho.iswiper'), | ||
10 | 10 | ||
11 | var recommendSwiper, | 11 | var recommendSwiper, |
12 | $recommendForYou = $('.recommend-for-you'), | 12 | $recommendForYou = $('.recommend-for-you'), |
13 | - preferenceUrl = $('#preferenceUrl').val(); | ||
14 | - | ||
15 | -if (preferenceUrl) { | ||
16 | - $.get(preferenceUrl).then(function(html) { | ||
17 | - if (html.length < 5) { | ||
18 | - $recommendForYou.css('display', 'none'); | ||
19 | - } else { | ||
20 | - $recommendForYou.html(html).show(); | ||
21 | - if ($('#swiper-recommend').length) { | ||
22 | - recommendSwiper = new Swiper('#swiper-recommend', { | ||
23 | - slidesPerView: 'auto', | ||
24 | - grabCursor: true, | ||
25 | - slideElement: 'a', | ||
26 | - lazyLoading: true, | ||
27 | - watchSlidesVisibility: true | ||
28 | - }); | 13 | + preferenceUrl = $('#preferenceUrl').val(), |
14 | + winH = $(window).height(), | ||
15 | + end = false, | ||
16 | + requesting = false; | ||
17 | + | ||
18 | + | ||
19 | +function request() { | ||
20 | + if (requesting || end) { | ||
21 | + return; | ||
22 | + } | ||
23 | + | ||
24 | + requesting = true; | ||
25 | + | ||
26 | + if (preferenceUrl) { | ||
27 | + $.get(preferenceUrl).then(function(html) { | ||
28 | + if (html.length < 5) { | ||
29 | + $recommendForYou.css('display', 'none'); | ||
30 | + } else { | ||
31 | + $recommendForYou.html(html).show(); | ||
32 | + if ($('#swiper-recommend').length) { | ||
33 | + recommendSwiper = new Swiper('#swiper-recommend', { | ||
34 | + slidesPerView: 'auto', | ||
35 | + grabCursor: true, | ||
36 | + slideElement: 'a', | ||
37 | + lazyLoading: true, | ||
38 | + watchSlidesVisibility: true | ||
39 | + }); | ||
40 | + } | ||
29 | } | 41 | } |
30 | - } | ||
31 | 42 | ||
32 | - window.rePosFooter(); | 43 | + requesting = false; |
44 | + end = true; | ||
33 | 45 | ||
34 | - }).fail(function() { | ||
35 | - $recommendForYou.hide(); | ||
36 | - }); | 46 | + }).fail(function() { |
47 | + $recommendForYou.hide(); | ||
48 | + }); | ||
49 | + } | ||
37 | } | 50 | } |
51 | + | ||
52 | +function scrollHandler() { | ||
53 | + if (!end || $(window).scrollTop() + winH >= $(document).height() - 50) { | ||
54 | + request(); | ||
55 | + } | ||
56 | +} | ||
57 | + | ||
58 | +$(window).scroll(function() { | ||
59 | + window.requestAnimationFrame(scrollHandler); | ||
60 | +}); |
@@ -78,7 +78,7 @@ $('.yoho-page').on('touchstart', '.chose-panel', function(e) { | @@ -78,7 +78,7 @@ $('.yoho-page').on('touchstart', '.chose-panel', function(e) { | ||
78 | 78 | ||
79 | //根据颜色切换图片 | 79 | //根据颜色切换图片 |
80 | if ($this.closest('.block-list').hasClass('color-list')) { | 80 | if ($this.closest('.block-list').hasClass('color-list')) { |
81 | - $('.chose-panel .basic-info').find('.thumb').addClass('hide').eq(index).removeClass('hide'); | 81 | + $('.chose-panel').find('.thumb').addClass('hide').eq(index).removeClass('hide'); |
82 | } | 82 | } |
83 | 83 | ||
84 | if ($chosed.length === 0) { | 84 | if ($chosed.length === 0) { |
@@ -120,6 +120,10 @@ $('.yoho-page').on('touchstart', '.chose-panel', function(e) { | @@ -120,6 +120,10 @@ $('.yoho-page').on('touchstart', '.chose-panel', function(e) { | ||
120 | } | 120 | } |
121 | numArray = $siblingBlock.find('.chosed').data('numstr').split('/'); | 121 | numArray = $siblingBlock.find('.chosed').data('numstr').split('/'); |
122 | $that.find('.num .left-num').html('剩余' + numArray[index] + '件'); | 122 | $that.find('.num .left-num').html('剩余' + numArray[index] + '件'); |
123 | + if (2 === $chosed.closest('.zero-stock').length) { | ||
124 | + $('#chose-btn-sure').css('background-color', '#c0c0c0'); | ||
125 | + $('#chose-btn-sure').html('已售罄'); | ||
126 | + } | ||
123 | } | 127 | } |
124 | 128 | ||
125 | }).on('touchstart', '.btn-minus', function() { | 129 | }).on('touchstart', '.btn-minus', function() { |
@@ -6,6 +6,7 @@ | @@ -6,6 +6,7 @@ | ||
6 | 6 | ||
7 | var $ = require('jquery'), | 7 | var $ = require('jquery'), |
8 | ellipsis = require('mlellipsis'), | 8 | ellipsis = require('mlellipsis'), |
9 | + chosePanel = require('../shopping-cart/chose-panel'), | ||
9 | lazyLoad = require('yoho.lazyload'); | 10 | lazyLoad = require('yoho.lazyload'); |
10 | 11 | ||
11 | var dialog = require('../me/dialog'), | 12 | var dialog = require('../me/dialog'), |
@@ -149,3 +150,34 @@ $('.cart-goods').on('touchstart', '.checkbox', function() { | @@ -149,3 +150,34 @@ $('.cart-goods').on('touchstart', '.checkbox', function() { | ||
149 | //}) | 150 | //}) |
150 | 151 | ||
151 | 152 | ||
153 | +$('.btn-balance').on('touchend', function() { | ||
154 | + window.location.href = '/shoppingCart/orderEnsure?cartType='; | ||
155 | +}); | ||
156 | + | ||
157 | +$('.down').on('touchend', function() { | ||
158 | + chosePanel.show(); | ||
159 | +}); | ||
160 | +$('.cut').on('touchend', function() { | ||
161 | + var id = $(this).closest('.shopping-cart-good').data('id'); | ||
162 | + | ||
163 | + $.ajax({ | ||
164 | + type: 'GET', | ||
165 | + url: '/shoppingCart/modify', | ||
166 | + data: { | ||
167 | + old_product_sku: id, | ||
168 | + new_product_sku: id, | ||
169 | + buy_number: '0', | ||
170 | + selected: 'Y' | ||
171 | + }, | ||
172 | + success: function(data) { | ||
173 | + if (data.code === 200) { | ||
174 | + window.history.go(0); | ||
175 | + } | ||
176 | + }, | ||
177 | + error: function() { | ||
178 | + tip.show('网络错误'); | ||
179 | + } | ||
180 | + }); | ||
181 | + | ||
182 | +}); | ||
183 | + |
@@ -9,12 +9,14 @@ var $ = require('jquery'), | @@ -9,12 +9,14 @@ var $ = require('jquery'), | ||
9 | Hammer = require('yoho.hammer'), | 9 | Hammer = require('yoho.hammer'), |
10 | Handlebars = require('yoho.handlebars'), | 10 | Handlebars = require('yoho.handlebars'), |
11 | tip = require('../plugin/tip'), | 11 | tip = require('../plugin/tip'), |
12 | + loading = require('../plugin/loading'), | ||
12 | orderInfo = require('./order-info').orderInfo; | 13 | orderInfo = require('./order-info').orderInfo; |
13 | 14 | ||
14 | var dispatchModeHammer, | 15 | var dispatchModeHammer, |
15 | dispatchTimeHammer, | 16 | dispatchTimeHammer, |
16 | $invoice = $('.invoice'), | 17 | $invoice = $('.invoice'), |
17 | $price = $('.price-cal'), | 18 | $price = $('.price-cal'), |
19 | + payType, | ||
18 | priceTmpl = Handlebars.compile($('#tmpl-price').html()); | 20 | priceTmpl = Handlebars.compile($('#tmpl-price').html()); |
19 | 21 | ||
20 | lazyLoad(); | 22 | lazyLoad(); |
@@ -93,39 +95,54 @@ function orderCompute() { | @@ -93,39 +95,54 @@ function orderCompute() { | ||
93 | } | 95 | } |
94 | 96 | ||
95 | function submitOrder() { | 97 | function submitOrder() { |
98 | + loading.showLoadingMask(); | ||
96 | $.ajax({ | 99 | $.ajax({ |
97 | method: 'POST', | 100 | method: 'POST', |
98 | url: '/shoppingCart/orderSub', | 101 | url: '/shoppingCart/orderSub', |
99 | data: { | 102 | data: { |
100 | addressId: orderInfo('addressId'), | 103 | addressId: orderInfo('addressId'), |
101 | cartType: orderInfo('cartType'), | 104 | cartType: orderInfo('cartType'), |
102 | - deliveryId: orderInfo('deliveryId') || 1, | ||
103 | - deliveryTimeId: orderInfo('deliveryTimeId') || 1, | ||
104 | - invoiceText: orderInfo('invoiceText'), | ||
105 | - invoiceType: orderInfo('invoiceType'), | ||
106 | - msg: orderInfo('msg'), | 105 | + deliveryId: orderInfo('deliveryId'), |
106 | + deliveryTimeId: orderInfo('deliveryTimeId'), | ||
107 | + invoiceText: $invoice.find('[name="invoice-title"]').val() || orderInfo('invoiceText'), | ||
108 | + invoiceType: $invoice.find('.invoice-type').val() || orderInfo('invoiceType'), | ||
109 | + msg: $('#msg').find('input').val() || orderInfo('msg'), | ||
107 | paymentTypeId: orderInfo('paymentTypeId'), | 110 | paymentTypeId: orderInfo('paymentTypeId'), |
108 | paymentType: orderInfo('paymentType'), //支付方式 | 111 | paymentType: orderInfo('paymentType'), //支付方式 |
109 | couponCode: orderInfo('couponCode'), | 112 | couponCode: orderInfo('couponCode'), |
110 | yohoCoin: orderInfo('yohoCoin') | 113 | yohoCoin: orderInfo('yohoCoin') |
111 | } | 114 | } |
112 | }).then(function(res) { | 115 | }).then(function(res) { |
116 | + var url; | ||
117 | + | ||
113 | if (!res) { | 118 | if (!res) { |
119 | + loading.hideLoadingMask(); | ||
114 | tip.show('网络出错'); | 120 | tip.show('网络出错'); |
121 | + return; | ||
115 | } | 122 | } |
116 | - if (res.code !== 200) { | ||
117 | - tip.show(res.message || '网络出错'); | 123 | + if (res.code === 200) { |
124 | + if (payType === 2) { | ||
125 | + | ||
126 | + // 货到付款的进入订单页面 | ||
127 | + url = '/home/orderDetail?order_code=' + res.data.order_code; | ||
128 | + } else { | ||
129 | + url = '/home/pay?order_code=' + res.data.order_code; | ||
130 | + } | ||
131 | + window.setCookie('order-info', ''); | ||
132 | + window.location.href = url; | ||
118 | } else { | 133 | } else { |
119 | - console.log(1); | 134 | + loading.hideLoadingMask(); |
135 | + tip.show(res.messege || '网络出错'); | ||
120 | } | 136 | } |
121 | }).fail(function() { | 137 | }).fail(function() { |
138 | + loading.hideLoadingMask(); | ||
122 | tip.show('网络出错'); | 139 | tip.show('网络出错'); |
123 | }); | 140 | }); |
124 | } | 141 | } |
125 | 142 | ||
126 | // 界面点击,状态存 cookie | 143 | // 界面点击,状态存 cookie |
127 | if (!orderInfo('addressId')) { | 144 | if (!orderInfo('addressId')) { |
128 | - orderInfo('addressId', $('.address-wrap').data('address-id')); | 145 | + orderInfo('addressId', $('.address-wrap').data('id')); |
129 | } | 146 | } |
130 | 147 | ||
131 | $('.dispatch-mode').on('touchend', 'li', function() { | 148 | $('.dispatch-mode').on('touchend', 'li', function() { |
@@ -167,7 +184,10 @@ $('#msg').find('input').on('blur', function() { | @@ -167,7 +184,10 @@ $('#msg').find('input').on('blur', function() { | ||
167 | }); | 184 | }); |
168 | 185 | ||
169 | $('.pay-mode').on('click', 'li', function() { | 186 | $('.pay-mode').on('click', 'li', function() { |
170 | - orderInfo('paymentTypeId', $(this).data('pay-id')); | ||
171 | - orderInfo('paymentType', $(this).data('pay-type')); | 187 | + var $this = $(this); |
188 | + | ||
189 | + orderInfo('paymentTypeId', $this.data('pay-id')); | ||
190 | + orderInfo('paymentType', $this.data('pay-type')); | ||
191 | + payType = $this.data('pay-type'); | ||
172 | submitOrder(); | 192 | submitOrder(); |
173 | }); | 193 | }); |
@@ -30,6 +30,7 @@ $newCoupon.on('submit', function() { | @@ -30,6 +30,7 @@ $newCoupon.on('submit', function() { | ||
30 | if (res.code === 200) { | 30 | if (res.code === 200) { |
31 | tip.show('优惠券可用'); | 31 | tip.show('优惠券可用'); |
32 | orderInfo('couponCode', res.data.coupon_code); | 32 | orderInfo('couponCode', res.data.coupon_code); |
33 | + orderInfo('couponValue', res.data.coupon_value); | ||
33 | window.location.href = '/shoppingCart/orderEnsure?coupon_code=' + res.data.coupon_code; | 34 | window.location.href = '/shoppingCart/orderEnsure?coupon_code=' + res.data.coupon_code; |
34 | } else { | 35 | } else { |
35 | tip.show(res.message); | 36 | tip.show(res.message); |
@@ -2,6 +2,16 @@ | @@ -2,6 +2,16 @@ | ||
2 | width: 100%; | 2 | width: 100%; |
3 | overflow: hidden; | 3 | overflow: hidden; |
4 | margin: 0 auto; | 4 | margin: 0 auto; |
5 | + #yohood { | ||
6 | + background-color: transparent; | ||
7 | + background-image: image-url('yohood.png'); | ||
8 | + background-size: 40%; | ||
9 | + background-repeat: no-repeat; | ||
10 | + background-position-x: 26%; | ||
11 | + background-position-y: 36%; | ||
12 | + border: none; | ||
13 | + border-bottom: 4px solid #fff; | ||
14 | + } | ||
5 | .index-header { | 15 | .index-header { |
6 | box-sizing: border-box; | 16 | box-sizing: border-box; |
7 | padding: 0 20rem / $pxConvertRem; | 17 | padding: 0 20rem / $pxConvertRem; |
@@ -151,32 +151,61 @@ | @@ -151,32 +151,61 @@ | ||
151 | } | 151 | } |
152 | } | 152 | } |
153 | } | 153 | } |
154 | + .calculate-num{ | ||
155 | + float: right; | ||
156 | + .calculate{ | ||
157 | + float: right; | ||
158 | + border:1px solid #b0b0b0; | ||
159 | + border-radius:.2rem; | ||
160 | + p{ | ||
161 | + color: #444; | ||
162 | + &:first-child{ | ||
163 | + height: 60rem / $pxConvertRem; | ||
164 | + border-bottom:1px solid #b0b0b0; | ||
165 | + span { | ||
166 | + border-left:1px solid #b0b0b0; | ||
167 | + border-right:1px solid #b0b0b0; | ||
168 | + } | ||
169 | + } | ||
170 | + i{ | ||
171 | + width: 72rem / $pxConvertRem; | ||
172 | + height: 60rem / $pxConvertRem; | ||
173 | + float: left; | ||
174 | + line-height: 60rem / $pxConvertRem; | ||
175 | + text-align: center; | ||
176 | + } | ||
177 | + span{ | ||
178 | + width: 96rem / $pxConvertRem; | ||
179 | + height: 60rem / $pxConvertRem; | ||
180 | + float: left; | ||
181 | + font-size: 40rem / $pxConvertRem; | ||
182 | + line-height: 60rem / $pxConvertRem; | ||
183 | + text-align: center; | ||
184 | + | ||
185 | + } | ||
186 | + &:last-child { | ||
187 | + span{ | ||
188 | + width: 168rem / $pxConvertRem; | ||
189 | + overflow: hidden; | ||
190 | + font-size: 48em / $pxConvertRem; | ||
191 | + text-overflow:ellipsis; | ||
192 | + white-space:nowrap; | ||
193 | + } | ||
194 | + } | ||
195 | + } | ||
196 | + } | ||
197 | + .price{ | ||
198 | + line-height: 60rem / $pxConvertRem; | ||
199 | + font-size: 52em / $pxConvertRem; | ||
200 | + font-weight: bold; | ||
201 | + } | ||
202 | + .count{ | ||
203 | + position: absolute; | ||
204 | + right: 20rem / $pxConvertRem;; | ||
205 | + top: 20rem / $pxConvertRem;; | ||
206 | + font-size: 52em / $pxConvertRem; | ||
154 | 207 | ||
155 | .good-detail-img { | 208 | .good-detail-img { |
156 | - // position: relative; | ||
157 | - //height: 368rem / $pxConvertRem; | ||
158 | - | ||
159 | - //.good-islike { | ||
160 | - // position: absolute; | ||
161 | - // width: 60rem / $pxConvertRem; | ||
162 | - // height: 60rem / $pxConvertRem; | ||
163 | - // top: 0rem / $pxConvertRem; | ||
164 | - // right: 0rem / $pxConvertRem; | ||
165 | - // line-height: 60rem / $pxConvertRem; | ||
166 | - // font-size: 30rem / $pxConvertRem; | ||
167 | - // text-align: center; | ||
168 | - // color: #b0b0b0; | ||
169 | - // text-decoration: none; | ||
170 | - //} | ||
171 | - // | ||
172 | - //.good-like { | ||
173 | - // color: #d72928; | ||
174 | - //} | ||
175 | - //img { | ||
176 | - // display: block; | ||
177 | - // width: 100%; | ||
178 | - // height: 368rem / $pxConvertRem; | ||
179 | - //} | ||
180 | 209 | ||
181 | .few-tag { | 210 | .few-tag { |
182 | position: absolute; | 211 | position: absolute; |
@@ -178,116 +178,6 @@ | @@ -178,116 +178,6 @@ | ||
178 | } | 178 | } |
179 | } | 179 | } |
180 | 180 | ||
181 | - .gift-advance-good { | ||
182 | - position: relative; | ||
183 | - padding: 20rem / $pxConvertRem 0; | ||
184 | - margin-left: 34rem / $pxConvertRem; | ||
185 | - height: 160rem / $pxConvertRem; | ||
186 | - border-bottom: 1px solid #e0e0e0; | ||
187 | - | ||
188 | - &:last-child { | ||
189 | - border-bottom: none; | ||
190 | - } | ||
191 | - } | ||
192 | - | ||
193 | - | ||
194 | - .advance-block .gift-advance-good:last-child { | ||
195 | - border-bottom: none; | ||
196 | - } | ||
197 | - | ||
198 | - .advance-block:last-child .gift-advance-good:last-child { | ||
199 | - border-bottom: 1px solid #e0e0e0; | ||
200 | - } | ||
201 | - | ||
202 | - .thumb-wrap { | ||
203 | - position: relative; | ||
204 | - float: left; | ||
205 | - width: 120rem / $pxConvertRem; | ||
206 | - height: 160rem / $pxConvertRem; | ||
207 | - | ||
208 | - .thumb { | ||
209 | - width: 100%; | ||
210 | - height: 100%; | ||
211 | - } | ||
212 | - } | ||
213 | - | ||
214 | - .tag { | ||
215 | - position: absolute; | ||
216 | - bottom: 0; | ||
217 | - left: 0; | ||
218 | - right: 0; | ||
219 | - height: 25rem / $pxConvertRem; | ||
220 | - color: #fff; | ||
221 | - text-align: center; | ||
222 | - background: #a1ce4e; | ||
223 | - | ||
224 | - &:before { | ||
225 | - content: '赠品'; | ||
226 | - } | ||
227 | - } | ||
228 | - | ||
229 | - .deps { | ||
230 | - margin-left: 135rem / $pxConvertRem; | ||
231 | - } | ||
232 | - | ||
233 | - .name { | ||
234 | - font-size: 28rem / $pxConvertRem; | ||
235 | - } | ||
236 | - | ||
237 | - .row:nth-child(2) { | ||
238 | - font-size: 22rem / $pxConvertRem; | ||
239 | - height: 45rem / $pxConvertRem; | ||
240 | - line-height: 45rem / $pxConvertRem; | ||
241 | - | ||
242 | - > span { | ||
243 | - margin-right: 15rem / $pxConvertRem; | ||
244 | - } | ||
245 | - } | ||
246 | - | ||
247 | - .row:nth-child(3) { | ||
248 | - position: relative; | ||
249 | - } | ||
250 | - | ||
251 | - .color, .size { | ||
252 | - color: #b6b6b6; | ||
253 | - } | ||
254 | - | ||
255 | - .price { | ||
256 | - font-size: 24rem / $pxConvertRem; | ||
257 | - color: #000; | ||
258 | - } | ||
259 | - | ||
260 | - .count { | ||
261 | - font-size: 20rem / $pxConvertRem; | ||
262 | - color: #999; | ||
263 | - margin-left: 22rem / $pxConvertRem; | ||
264 | - } | ||
265 | - | ||
266 | - .chose { | ||
267 | - position: absolute; | ||
268 | - width: 88rem / $pxConvertRem; | ||
269 | - height: 58rem / $pxConvertRem; | ||
270 | - background: #f8f8f8; | ||
271 | - border: 1px solid #ccc; | ||
272 | - right: 20rem / $pxConvertRem; | ||
273 | - top: 71rem / $pxConvertRem; | ||
274 | - font-size: 26rem / $pxConvertRem; | ||
275 | - } | ||
276 | - | ||
277 | - .title { | ||
278 | - height: 50rem / $pxConvertRem; | ||
279 | - line-height: 50rem / $pxConvertRem; | ||
280 | - padding-left: 20rem / $pxConvertRem; | ||
281 | - font-size: 24rem / $pxConvertRem; | ||
282 | - background: #f8f8f8; | ||
283 | - } | ||
284 | - | ||
285 | - .advance-block .tag { | ||
286 | - background: #eb76aa; | ||
287 | - &:before { | ||
288 | - content: '加价购'; | ||
289 | - } | ||
290 | - } | ||
291 | } | 181 | } |
292 | .shopping-cart-zero{ | 182 | .shopping-cart-zero{ |
293 | .cart-zero{ | 183 | .cart-zero{ |
@@ -93,7 +93,7 @@ | @@ -93,7 +93,7 @@ | ||
93 | } | 93 | } |
94 | 94 | ||
95 | .coupon-count { | 95 | .coupon-count { |
96 | - padding: 5rem / $pxConvertRem; | 96 | + padding: 5rem / $pxConvertRem 15rem / $pxConvertRem; |
97 | background: #f00; | 97 | background: #f00; |
98 | color: #fff; | 98 | color: #fff; |
99 | @include border-radius(10px); | 99 | @include border-radius(10px); |
@@ -104,6 +104,14 @@ | @@ -104,6 +104,14 @@ | ||
104 | .coin-check { | 104 | .coin-check { |
105 | float: right; | 105 | float: right; |
106 | color: #999; | 106 | color: #999; |
107 | + | ||
108 | + &.used { | ||
109 | + color: #f00; | ||
110 | + } | ||
111 | + | ||
112 | + .iconfont { | ||
113 | + color: #999; | ||
114 | + } | ||
107 | } | 115 | } |
108 | 116 | ||
109 | .coin-check { | 117 | .coin-check { |
@@ -115,6 +123,10 @@ | @@ -115,6 +123,10 @@ | ||
115 | color: #000; | 123 | color: #000; |
116 | } | 124 | } |
117 | 125 | ||
126 | + em { | ||
127 | + color: #f00; | ||
128 | + } | ||
129 | + | ||
118 | } | 130 | } |
119 | 131 | ||
120 | .checkbox.icon-checkbox { | 132 | .checkbox.icon-checkbox { |
@@ -187,6 +199,10 @@ | @@ -187,6 +199,10 @@ | ||
187 | } | 199 | } |
188 | } | 200 | } |
189 | 201 | ||
202 | + .price-cal { | ||
203 | + font-family: monospace; | ||
204 | + } | ||
205 | + | ||
190 | .cost { | 206 | .cost { |
191 | border-top: 1px solid #f7f7f7; | 207 | border-top: 1px solid #f7f7f7; |
192 | line-height: 100rem / $pxConvertRem; | 208 | line-height: 100rem / $pxConvertRem; |
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <div class="iHelp"> | 2 | <div class="iHelp"> |
3 | <ul> | 3 | <ul> |
4 | {{# iHelp}} | 4 | {{# iHelp}} |
5 | - <li><a href="/home/helpDetail?code={{ code}}"><span>{{ name}}</span><i class="iconfont num"></i></a></li> | 5 | + <li><a href="{{url}}"><span>{{ name}}</span><i class="iconfont num"></i></a></li> |
6 | {{/ iHelp}} | 6 | {{/ iHelp}} |
7 | </ul> | 7 | </ul> |
8 | </div> | 8 | </div> |
@@ -106,15 +106,13 @@ | @@ -106,15 +106,13 @@ | ||
106 | <span class="iconfont num"></span> | 106 | <span class="iconfont num"></span> |
107 | </a> | 107 | </a> |
108 | </div> | 108 | </div> |
109 | - {{! | ||
110 | <div class="group-list"> | 109 | <div class="group-list"> |
111 | - <a class="list-item" href="/help.html"> | 110 | + <a class="list-item" href="/home/help"> |
112 | <span class="iconfont icon"></span> | 111 | <span class="iconfont icon"></span> |
113 | 帮助 | 112 | 帮助 |
114 | <span class="iconfont num"></span> | 113 | <span class="iconfont num"></span> |
115 | </a> | 114 | </a> |
116 | </div> | 115 | </div> |
117 | - }} | ||
118 | 116 | ||
119 | {{> product/recommend-for-you}} | 117 | {{> product/recommend-for-you}} |
120 | {{> product/suspend-cart}} | 118 | {{> product/suspend-cart}} |
@@ -23,7 +23,7 @@ | @@ -23,7 +23,7 @@ | ||
23 | <a href="{{href}}" class="list-item">{{title}} <span class="lighter">{{entitle}}</span> <span class="iconfont right-icon"></span></a> | 23 | <a href="{{href}}" class="list-item">{{title}} <span class="lighter">{{entitle}}</span> <span class="iconfont right-icon"></span></a> |
24 | {{/channelList}} | 24 | {{/channelList}} |
25 | {{#showYohood}} | 25 | {{#showYohood}} |
26 | - <a href="/yohood" id="yohood" class="list-item"> <span class="iconfont right-icon"></span></a> | 26 | + <a href="{{yohoodHref}}" id="yohood" class="list-item"> <span class="iconfont right-icon"></span></a> |
27 | {{/showYohood}} | 27 | {{/showYohood}} |
28 | </div> | 28 | </div> |
29 | </div> | 29 | </div> |
1 | {{> layout/header}} | 1 | {{> layout/header}} |
2 | <div id="mainCart" class="shopping-cart-page yoho-page"> | 2 | <div id="mainCart" class="shopping-cart-page yoho-page"> |
3 | - | ||
4 | {{# shoppingCart}} | 3 | {{# shoppingCart}} |
5 | {{#if cartNav}} | 4 | {{#if cartNav}} |
6 | <ul class="cart-nav clearfix"> | 5 | <ul class="cart-nav clearfix"> |
@@ -45,7 +44,6 @@ | @@ -45,7 +44,6 @@ | ||
45 | 44 | ||
46 | {{/ shoppingCart}} | 45 | {{/ shoppingCart}} |
47 | </div> | 46 | </div> |
48 | - | ||
49 | <div id="advanceBuy" class="shopping-cart-page yoho-page hide"> | 47 | <div id="advanceBuy" class="shopping-cart-page yoho-page hide"> |
50 | {{# shoppingCart}} | 48 | {{# shoppingCart}} |
51 | {{# commonCart}} | 49 | {{# commonCart}} |
@@ -68,6 +66,7 @@ | @@ -68,6 +66,7 @@ | ||
68 | <a href="">随便逛逛</a> | 66 | <a href="">随便逛逛</a> |
69 | </div> | 67 | </div> |
70 | {{> product/recommend-for-you}} | 68 | {{> product/recommend-for-you}} |
69 | + {{> shopping-cart/chose-panel}} | ||
71 | </div> | 70 | </div> |
72 | 71 | ||
73 | {{> shopping-cart/chose-panel}} | 72 | {{> shopping-cart/chose-panel}} |
1 | {{> layout/header}} | 1 | {{> layout/header}} |
2 | <div class="order-ensure-page yoho-page"> | 2 | <div class="order-ensure-page yoho-page"> |
3 | {{# orderEnsure}} | 3 | {{# orderEnsure}} |
4 | - <a class="address-wrap block" href="/shoppingCart/selectAddress" data-address-id="{{addressId}}"> | 4 | + <a class="address-wrap block" data-id="{{addressId}}" href="/shoppingCart/selectAddress"> |
5 | <p class="infos"> | 5 | <p class="infos"> |
6 | 收货地址 | 6 | 收货地址 |
7 | <span class="per-info">{{name}} {{phoneNum}}</span> | 7 | <span class="per-info">{{name}} {{phoneNum}}</span> |
@@ -44,7 +44,6 @@ | @@ -44,7 +44,6 @@ | ||
44 | {{# coupon}} | 44 | {{# coupon}} |
45 | <li class="coupon"> | 45 | <li class="coupon"> |
46 | <a href="/shoppingCart/selectCoupon"> | 46 | <a href="/shoppingCart/selectCoupon"> |
47 | - <!-- <a href="{{url}}"> --> | ||
48 | <span class="title">优惠券</span> | 47 | <span class="title">优惠券</span> |
49 | {{#if count}} | 48 | {{#if count}} |
50 | <span class="coupon-count"> | 49 | <span class="coupon-count"> |
@@ -67,16 +66,14 @@ | @@ -67,16 +66,14 @@ | ||
67 | </li> | 66 | </li> |
68 | {{/coupon}} | 67 | {{/coupon}} |
69 | 68 | ||
70 | - {{# yohoCoin}} | ||
71 | - <li class="coin" data-yoho-coin="{{.}}"> | ||
72 | - <span class="title">YOHO币</span> | ||
73 | - <span class="desc">可抵用¥{{.}}</span> | ||
74 | - <span class="coin-check"> | ||
75 | - <em>- ¥ {{.}}</em> | ||
76 | - <i class="iconfont checkbox icon-cb-checked"></i> | ||
77 | - </span> | ||
78 | - </li> | ||
79 | - {{/ yohoCoin}} | 69 | + <li class="coin" data-yoho-coin="{{yohoCoin}}"> |
70 | + <span class="title">YOHO币</span> | ||
71 | + <span class="desc">可抵用¥{{yohoCoin}}</span> | ||
72 | + <span class="coin-check"> | ||
73 | + <em>- ¥ {{yohoCoin}}</em> | ||
74 | + <i class="iconfont checkbox icon-cb-checked"></i> | ||
75 | + </span> | ||
76 | + </li> | ||
80 | 77 | ||
81 | {{#if invoice}} | 78 | {{#if invoice}} |
82 | <li class="invoice {{#if needInvoice}}focus{{/if}}"> | 79 | <li class="invoice {{#if needInvoice}}focus{{/if}}"> |
@@ -124,7 +121,7 @@ | @@ -124,7 +121,7 @@ | ||
124 | {{/couponPrice}} | 121 | {{/couponPrice}} |
125 | <li> | 122 | <li> |
126 | <span>YOHO币</span> | 123 | <span>YOHO币</span> |
127 | - - {{yohoCoin}} | 124 | + - ¥{{yohoCoin}} |
128 | </li> | 125 | </li> |
129 | <li class="cost"> | 126 | <li class="cost"> |
130 | 应付金额: <em>¥{{price}}</em> | 127 | 应付金额: <em>¥{{price}}</em> |
1 | -{{#cartInfo}} | 1 | + |
2 | <div class="chose-panel"> | 2 | <div class="chose-panel"> |
3 | <div class="main"> | 3 | <div class="main"> |
4 | <div class="infos"> | 4 | <div class="infos"> |
@@ -25,7 +25,7 @@ | @@ -25,7 +25,7 @@ | ||
25 | <span>颜色</span> | 25 | <span>颜色</span> |
26 | <ul class="clearfix" data-type="color"> | 26 | <ul class="clearfix" data-type="color"> |
27 | {{# colors}} | 27 | {{# colors}} |
28 | - <li class="block {{#if chosed}}chosed{{/if}} {{#unless colorNum}}zero-stock{{/unless}}" data-num="{{colorNum}}" data-numstr="{{sizeNumStr}}"> | 28 | + <li class="block {{#if chosed}}chosed{{/if}} {{#unless colorNum}}zero-stock{{/unless}}" data-num="{{colorNum}}" data-numstr="{{sizeNumStr}}" data-skcid="{{skcId}}"> |
29 | {{name}} | 29 | {{name}} |
30 | </li> | 30 | </li> |
31 | {{/ colors}} | 31 | {{/ colors}} |
@@ -35,7 +35,7 @@ | @@ -35,7 +35,7 @@ | ||
35 | <span>尺码</span> | 35 | <span>尺码</span> |
36 | <ul class="clearfix" data-type="size" > | 36 | <ul class="clearfix" data-type="size" > |
37 | {{# sizes}} | 37 | {{# sizes}} |
38 | - <li class="block {{#if chosed}}chosed{{/if}} {{#unless sizeNum}}zero-stock{{/unless}}" data-id={{id}} data-num="{{sizeNum}}" data-numstr="{{colorNumStr}}"> | 38 | + <li class="block {{#if chosed}}chosed{{/if}} {{#unless sizeNum}}zero-stock{{/unless}}" data-id={{id}} data-num="{{sizeNum}}" data-numstr="{{colorNumStr}}" data-skuid="{{skuId}}" data-goodid="{{goodId}}"> |
39 | {{name}} | 39 | {{name}} |
40 | </li> | 40 | </li> |
41 | {{/ sizes}} | 41 | {{/ sizes}} |
@@ -61,4 +61,3 @@ | @@ -61,4 +61,3 @@ | ||
61 | </div> | 61 | </div> |
62 | </div> | 62 | </div> |
63 | </div> | 63 | </div> |
64 | -{{/cartInfo}} |
@@ -10,6 +10,8 @@ | @@ -10,6 +10,8 @@ | ||
10 | {{/if}} | 10 | {{/if}} |
11 | 11 | ||
12 | <div class="info"> | 12 | <div class="info"> |
13 | + <img class="thumb lazy" data-original={{thumb}}> | ||
14 | + <!-- <div class="deps"> | ||
13 | 15 | ||
14 | <div class=""> | 16 | <div class=""> |
15 | <a class="" href="{{url}}"> | 17 | <a class="" href="{{url}}"> |
@@ -74,6 +76,16 @@ | @@ -74,6 +76,16 @@ | ||
74 | </span> | 76 | </span> |
75 | {{/if}} | 77 | {{/if}} |
76 | </p> | 78 | </p> |
79 | + </div> --> | ||
80 | + <div class="calculate-num"> | ||
81 | + <div class="calculate"> | ||
82 | + <p><i class="iconfont cut"></i><span>{{count}}</span><i class="iconfont add"></i></p> | ||
83 | + <p><span>颜色:{{color}}尺码:{{size}}{{name}}</span><i class="iconfont down"></i></p> | ||
84 | + </div> | ||
85 | + <p><span class="price"> ¥{{price}}</span></p> | ||
86 | + <span class="count"> | ||
87 | + ×{{count}} | ||
88 | + </span> | ||
77 | </div> | 89 | </div> |
78 | </div> | 90 | </div> |
79 | <!--<div class="opt-panel hide"> | 91 | <!--<div class="opt-panel hide"> |
@@ -87,4 +99,5 @@ | @@ -87,4 +99,5 @@ | ||
87 | 删除 | 99 | 删除 |
88 | </div> | 100 | </div> |
89 | </div>--> | 101 | </div>--> |
102 | + | ||
90 | </div> | 103 | </div> |
@@ -835,67 +835,77 @@ class HomeController extends AbstractAction | @@ -835,67 +835,77 @@ class HomeController extends AbstractAction | ||
835 | // 审判跳转登录页 | 835 | // 审判跳转登录页 |
836 | $this->auditJumpLogin(); | 836 | $this->auditJumpLogin(); |
837 | 837 | ||
838 | + /* 判断订单号是否传 */ | ||
838 | $orderCode = $this->get('order_code'); | 839 | $orderCode = $this->get('order_code'); |
839 | if (empty($orderCode)) { | 840 | if (empty($orderCode)) { |
840 | $this->error(); | 841 | $this->error(); |
841 | } | 842 | } |
842 | 843 | ||
844 | + /* 订单信息不存在 */ | ||
845 | + $orderDetail = OrderModel::orderDetail($orderCode, $this->_uid, $this->_usession); | ||
846 | + if (empty($orderDetail)) { | ||
847 | + $this->error(); | ||
848 | + } | ||
849 | + | ||
843 | $this->setTitle('订单详情'); | 850 | $this->setTitle('订单详情'); |
844 | $this->setNavHeader('订单详情'); | 851 | $this->setNavHeader('订单详情'); |
845 | 852 | ||
846 | $this->_view->display('order-detail', array( | 853 | $this->_view->display('order-detail', array( |
847 | 'orderDetailPage' => true, | 854 | 'orderDetailPage' => true, |
848 | - 'orderDetail' => OrderModel::orderDetail($orderCode, $this->_uid, $this->_session), | 855 | + 'orderDetail' => $orderDetail, |
849 | )); | 856 | )); |
850 | } | 857 | } |
851 | 858 | ||
852 | /** | 859 | /** |
853 | - * 帮助列表页 | 860 | + * 帮助中心列表页 |
854 | */ | 861 | */ |
855 | public function helpAction() | 862 | public function helpAction() |
856 | { | 863 | { |
857 | $this->setTitle('帮助中心'); | 864 | $this->setTitle('帮助中心'); |
858 | $this->setNavHeader('帮助中心'); | 865 | $this->setNavHeader('帮助中心'); |
859 | - $data = array( | 866 | + |
867 | + $this->_view->display('help', array( | ||
860 | 'iHelp' => Home\HelpModel::serviceInfo(), | 868 | 'iHelp' => Home\HelpModel::serviceInfo(), |
861 | - ); | ||
862 | - $this->_view->display('i-help', $data); | 869 | + )); |
863 | } | 870 | } |
864 | 871 | ||
865 | /** | 872 | /** |
866 | - * 帮助列表页 | 873 | + * 帮助中心列表详细信息 |
867 | */ | 874 | */ |
868 | public function helpDetailAction() | 875 | public function helpDetailAction() |
869 | { | 876 | { |
870 | - $this->setTitle('帮助中心'); | ||
871 | - $this->setNavHeader('帮助中心'); | ||
872 | - $data = array( | ||
873 | - 'iHelp' => array( | ||
874 | - array('name' => '新用户注册'), | ||
875 | - ) | ||
876 | - ); | ||
877 | - $this->_view->display('helpDetail', $data); | 877 | + $caption = $this->get('caption', '帮助中心'); |
878 | + $code = $this->get('code', 0); | ||
879 | + if (empty($code)) { | ||
880 | + $this->error(); | ||
881 | + } | ||
882 | + | ||
883 | + $this->setTitle($caption); | ||
884 | + $this->setNavHeader($caption); | ||
885 | + | ||
886 | + $this->_view->display('helpDetail', array( | ||
887 | + 'iHelp' => Home\HelpModel::serviceDetail($code), | ||
888 | + )); | ||
878 | } | 889 | } |
879 | - /** | 890 | + |
891 | + /** | ||
880 | * YOHO币详情 新版 | 892 | * YOHO币详情 新版 |
881 | */ | 893 | */ |
882 | public function currencyDetailAction() | 894 | public function currencyDetailAction() |
883 | { | 895 | { |
896 | + // 审判跳转登录页 | ||
897 | + $this->auditJumpLogin(); | ||
898 | + | ||
884 | $this->setTitle('YOHO币'); | 899 | $this->setTitle('YOHO币'); |
885 | $this->setNavHeader('YOHO币', true, false); | 900 | $this->setNavHeader('YOHO币', true, false); |
886 | 901 | ||
887 | - $data['money'] = '0'; | ||
888 | - $page = $this->post('page',1); | ||
889 | - $size = $this->post('size', 20); | ||
890 | - // $data = UserModel::getYohoCoinLists($this->_uid,$page,$size); | ||
891 | - $data = UserModel::getYohoCoinLists(3965746,$page,$size); | 902 | + $data = UserModel::getYohoCoinLists($this->_uid, 0, 20); |
892 | $this->_view->display('currency-detail', array( | 903 | $this->_view->display('currency-detail', array( |
893 | 'money' => $data['money'], | 904 | 'money' => $data['money'], |
894 | 'pageFooter' => true, | 905 | 'pageFooter' => true, |
895 | 'currencyDetail' => true, | 906 | 'currencyDetail' => true, |
896 | 'currencyDetailPage' => true | 907 | 'currencyDetailPage' => true |
897 | )); | 908 | )); |
898 | - | ||
899 | } | 909 | } |
900 | 910 | ||
901 | /** | 911 | /** |
@@ -903,18 +913,18 @@ class HomeController extends AbstractAction | @@ -903,18 +913,18 @@ class HomeController extends AbstractAction | ||
903 | */ | 913 | */ |
904 | public function ajaxCurrencyDetailAction() | 914 | public function ajaxCurrencyDetailAction() |
905 | { | 915 | { |
906 | - $data['list'] = array(); | ||
907 | - $data['money'] = 0; | ||
908 | - $page = $this->post('page',1); | ||
909 | - $size = $this->post('size', 20); | ||
910 | - $data = UserModel::getYohoCoinLists($this->_uid,$page,$size); | ||
911 | - //$data = UserModel::getYohoCoinLists(3965746,$page,$size); | ||
912 | - $this->_view->display('ajax-currency-detail', array( | ||
913 | - 'currency' => $data['list'], | ||
914 | - 'pageFooter' => true, | ||
915 | - 'currencyDetailPage' => true | ||
916 | - )); | ||
917 | - | 916 | + if ($this->isAjax()) { |
917 | + $uid = $this->getUid(); | ||
918 | + $page = $this->post('page', 1); | ||
919 | + $data = UserModel::getYohoCoinLists($uid, $page, 20); | ||
920 | + $this->_view->display('ajax-currency-detail', array( | ||
921 | + 'currency' => $data['list'], | ||
922 | + 'pageFooter' => true, | ||
923 | + 'currencyDetailPage' => true | ||
924 | + )); | ||
925 | + } else { | ||
926 | + echo ' '; | ||
927 | + } | ||
918 | } | 928 | } |
919 | 929 | ||
920 | } | 930 | } |
@@ -23,16 +23,16 @@ class IndexController extends AbstractAction | @@ -23,16 +23,16 @@ class IndexController extends AbstractAction | ||
23 | // 设置浏览器缓存5分钟 | 23 | // 设置浏览器缓存5分钟 |
24 | $this->setExpires(300); | 24 | $this->setExpires(300); |
25 | } | 25 | } |
26 | - | 26 | + $result = Index\HomeModel::getChannel(); |
27 | + $result['background'] = Index\HomeModel::getBgImage(); | ||
28 | + $result['channelPage'] = true; | ||
29 | + $result['showDownloadApp'] = true; | ||
30 | + $result['searchUrl'] = Helpers::url('', null, 'search'); | ||
31 | + $result['pageFooter'] = true; | ||
27 | // 渲染模板 | 32 | // 渲染模板 |
28 | - $this->_view->display('index', array( | ||
29 | - 'background' => Index\HomeModel::getBgImage(), | ||
30 | - 'channelPage' => true, | ||
31 | - 'showDownloadApp'=>true, | ||
32 | - 'searchUrl' => Helpers::url('', null, 'search'), | ||
33 | - 'pageFooter' => true, | ||
34 | - )); | 33 | + $this->_view->display('index', $result); |
35 | } | 34 | } |
35 | + | ||
36 | /** | 36 | /** |
37 | * 设置升级公告路由 | 37 | * 设置升级公告路由 |
38 | * | 38 | * |
@@ -13,24 +13,35 @@ class HelpModel | @@ -13,24 +13,35 @@ class HelpModel | ||
13 | /* | 13 | /* |
14 | * 获取帮助中心列表 | 14 | * 获取帮助中心列表 |
15 | */ | 15 | */ |
16 | - | ||
17 | public static function serviceInfo() | 16 | public static function serviceInfo() |
18 | { | 17 | { |
19 | - //调用接口获取数据 | ||
20 | - $res = json_decode(HelpData::serviceInfo(), TRUE); | ||
21 | - $cateInfo = $res['data']; | ||
22 | $iHelp = array(); | 18 | $iHelp = array(); |
23 | - $list = array(); | ||
24 | - if ($cateInfo) { | ||
25 | - foreach ($cateInfo as $key => $value) { | 19 | + |
20 | + $cateInfo = HelpData::serviceInfo(); | ||
21 | + if (!empty($cateInfo['data'])) { | ||
22 | + foreach ($cateInfo['data'] as $key => $value) { | ||
26 | $iHelp[$key]['name'] = $value['caption']; | 23 | $iHelp[$key]['name'] = $value['caption']; |
27 | $iHelp[$key]['code'] = $value['code']; | 24 | $iHelp[$key]['code'] = $value['code']; |
28 | - } | ||
29 | - | 25 | + $iHelp[$key]['url'] = Helpers::url('/home/helpDetail', array('code' => $value['code'], 'caption' => $value['caption'])); |
26 | + } | ||
30 | } | 27 | } |
28 | + | ||
31 | return $iHelp; | 29 | return $iHelp; |
32 | } | 30 | } |
33 | 31 | ||
32 | + /* | ||
33 | + * 获取帮助中心详细内容 | ||
34 | + */ | ||
34 | 35 | ||
35 | -} | 36 | + public static function serviceDetail($code) |
37 | + { | ||
38 | + $res = HelpData::serviceDetail($code); | ||
39 | + if (!empty($res)) { | ||
40 | + if (false !== ($part = strstr($res, '<body>'))) { | ||
41 | + $res = strstr($part, '</body>', true); | ||
42 | + } | ||
43 | + } | ||
44 | + return $res; | ||
45 | + } | ||
36 | 46 | ||
47 | +} |
@@ -590,7 +590,7 @@ class CartModel | @@ -590,7 +590,7 @@ class CartModel | ||
590 | $result['message'] = '请选择配送方式'; | 590 | $result['message'] = '请选择配送方式'; |
591 | } else { | 591 | } else { |
592 | $orderSubRes = CartData::orderSub($uid, $addressId, $cartType, $deliveryTime, $deliveryWay, $invoiceTitle, $invoiceId, $paymentId, $paymentType, $remark, $couponCode, $yohoCoin); | 592 | $orderSubRes = CartData::orderSub($uid, $addressId, $cartType, $deliveryTime, $deliveryWay, $invoiceTitle, $invoiceId, $paymentId, $paymentType, $remark, $couponCode, $yohoCoin); |
593 | - if ($orderSubRes && isset($orderSubRes['code'])) { | 593 | + if ($orderSubRes && isset($orderSubRes['code'])) { |
594 | $result = $orderSubRes; | 594 | $result = $orderSubRes; |
595 | } | 595 | } |
596 | } | 596 | } |
@@ -10,7 +10,7 @@ use Configs\CacheConfig; | @@ -10,7 +10,7 @@ use Configs\CacheConfig; | ||
10 | 10 | ||
11 | /** | 11 | /** |
12 | * 首页相关的模板数据模型 | 12 | * 首页相关的模板数据模型 |
13 | - * | 13 | + * |
14 | * @name HomeModel | 14 | * @name HomeModel |
15 | * @package models | 15 | * @package models |
16 | * @copyright yoho.inc | 16 | * @copyright yoho.inc |
@@ -52,7 +52,7 @@ class HomeModel | @@ -52,7 +52,7 @@ class HomeModel | ||
52 | 52 | ||
53 | /** | 53 | /** |
54 | * 选择频道 | 54 | * 选择频道 |
55 | - * | 55 | + * |
56 | * @return void | 56 | * @return void |
57 | */ | 57 | */ |
58 | public static function goSwitchChannel() | 58 | public static function goSwitchChannel() |
@@ -70,7 +70,7 @@ class HomeModel | @@ -70,7 +70,7 @@ class HomeModel | ||
70 | 70 | ||
71 | /** | 71 | /** |
72 | * 设置选择的频道保存到浏览器COOKIE | 72 | * 设置选择的频道保存到浏览器COOKIE |
73 | - * | 73 | + * |
74 | * @param string $cookie | 74 | * @param string $cookie |
75 | * @return void | 75 | * @return void |
76 | */ | 76 | */ |
@@ -81,7 +81,7 @@ class HomeModel | @@ -81,7 +81,7 @@ class HomeModel | ||
81 | 81 | ||
82 | /** | 82 | /** |
83 | * 获取频道选择页的背景图片 | 83 | * 获取频道选择页的背景图片 |
84 | - * | 84 | + * |
85 | * @return string | false | 85 | * @return string | false |
86 | */ | 86 | */ |
87 | public static function getBgImage() | 87 | public static function getBgImage() |
@@ -122,7 +122,7 @@ class HomeModel | @@ -122,7 +122,7 @@ class HomeModel | ||
122 | 122 | ||
123 | /** | 123 | /** |
124 | * 获取男生,女生底部banner | 124 | * 获取男生,女生底部banner |
125 | - * | 125 | + * |
126 | * @return string | false | 126 | * @return string | false |
127 | */ | 127 | */ |
128 | public static function getBottomBanner($channel) | 128 | public static function getBottomBanner($channel) |
@@ -164,7 +164,7 @@ class HomeModel | @@ -164,7 +164,7 @@ class HomeModel | ||
164 | } | 164 | } |
165 | // 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存 | 165 | // 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存 |
166 | else { | 166 | else { |
167 | - Cache::set($cache, $result); | 167 | + Cache::set($cache, $result); |
168 | } | 168 | } |
169 | } | 169 | } |
170 | 170 | ||
@@ -173,7 +173,7 @@ class HomeModel | @@ -173,7 +173,7 @@ class HomeModel | ||
173 | 173 | ||
174 | /** | 174 | /** |
175 | * 获取男生首页的楼层数据 | 175 | * 获取男生首页的楼层数据 |
176 | - * | 176 | + * |
177 | * @return array | false | 177 | * @return array | false |
178 | */ | 178 | */ |
179 | public static function getBoysFloor() | 179 | public static function getBoysFloor() |
@@ -204,13 +204,13 @@ class HomeModel | @@ -204,13 +204,13 @@ class HomeModel | ||
204 | Cache::set(CacheConfig::KEY_ACTION_BOYS_INDEX, $result); | 204 | Cache::set(CacheConfig::KEY_ACTION_BOYS_INDEX, $result); |
205 | } | 205 | } |
206 | } | 206 | } |
207 | - | 207 | + |
208 | return $result; | 208 | return $result; |
209 | } | 209 | } |
210 | 210 | ||
211 | /** | 211 | /** |
212 | * 获取女生首页的楼层数据 | 212 | * 获取女生首页的楼层数据 |
213 | - * | 213 | + * |
214 | * @return array | false | 214 | * @return array | false |
215 | */ | 215 | */ |
216 | public static function getGirlsFloor() | 216 | public static function getGirlsFloor() |
@@ -247,7 +247,7 @@ class HomeModel | @@ -247,7 +247,7 @@ class HomeModel | ||
247 | 247 | ||
248 | /** | 248 | /** |
249 | * 获取潮童首页的楼层数据 | 249 | * 获取潮童首页的楼层数据 |
250 | - * | 250 | + * |
251 | * @return array | false | 251 | * @return array | false |
252 | */ | 252 | */ |
253 | public static function getKidsFloor() | 253 | public static function getKidsFloor() |
@@ -284,7 +284,7 @@ class HomeModel | @@ -284,7 +284,7 @@ class HomeModel | ||
284 | 284 | ||
285 | /** | 285 | /** |
286 | * 获取创意生活首页的楼层数据 | 286 | * 获取创意生活首页的楼层数据 |
287 | - * | 287 | + * |
288 | * @return array | false | 288 | * @return array | false |
289 | */ | 289 | */ |
290 | public static function getLifestyleFloor() | 290 | public static function getLifestyleFloor() |
@@ -319,4 +319,53 @@ class HomeModel | @@ -319,4 +319,53 @@ class HomeModel | ||
319 | return $result; | 319 | return $result; |
320 | } | 320 | } |
321 | 321 | ||
322 | + /** | ||
323 | + * 获取频道选择页数据 | ||
324 | + * | ||
325 | + * @return array | ||
326 | + */ | ||
327 | + public static function getChannel(){ | ||
328 | + $result = array(); | ||
329 | + $result['showYohood'] = false; | ||
330 | + | ||
331 | + $data = IndexData::channelData(); | ||
332 | + | ||
333 | + $channelList = array(); | ||
334 | + if(isset($data['data']['list'])){ | ||
335 | + foreach($data['data']['list'] as $key => $value){ | ||
336 | + switch ($value['channel_id']) { | ||
337 | + case 5: | ||
338 | + $result['showYohood'] = true; | ||
339 | + $result['yohoodHref'] = '/yohood'; | ||
340 | + break; | ||
341 | + case 1: | ||
342 | + $channelList[$key]['href'] = '/boys'; | ||
343 | + $channelList[$key]['title'] = '男生'; | ||
344 | + $channelList[$key]['entitle'] = 'BOYS'; | ||
345 | + break; | ||
346 | + case 2: | ||
347 | + $channelList[$key]['href'] = '/girls'; | ||
348 | + $channelList[$key]['title'] = '女生'; | ||
349 | + $channelList[$key]['entitle'] = 'GIRLS'; | ||
350 | + break; | ||
351 | + case 3: | ||
352 | + $channelList[$key]['href'] = '/kids'; | ||
353 | + $channelList[$key]['title'] = '潮童'; | ||
354 | + $channelList[$key]['entitle'] = 'KIDS'; | ||
355 | + break; | ||
356 | + case 4: | ||
357 | + $channelList[$key]['href'] = '/lifestyle'; | ||
358 | + $channelList[$key]['title'] = '创意生活'; | ||
359 | + $channelList[$key]['entitle'] = 'LIFESTYLE'; | ||
360 | + break; | ||
361 | + default: | ||
362 | + break; | ||
363 | + } | ||
364 | + } | ||
365 | + $result['channelList'] = $channelList; | ||
366 | + } | ||
367 | + | ||
368 | + return $result; | ||
369 | + } | ||
370 | + | ||
322 | } | 371 | } |
@@ -379,7 +379,7 @@ class UserModel | @@ -379,7 +379,7 @@ class UserModel | ||
379 | public static function getYohoCoinLists($uid, $page, $limit) | 379 | public static function getYohoCoinLists($uid, $page, $limit) |
380 | { | 380 | { |
381 | $result = array(); | 381 | $result = array(); |
382 | - | 382 | + $data['money'] = '0'; |
383 | // 调用接口获取YOHO币 | 383 | // 调用接口获取YOHO币 |
384 | $yohoCoin = UserData::yohoCoinData($uid, $page, $limit, 'post'); | 384 | $yohoCoin = UserData::yohoCoinData($uid, $page, $limit, 'post'); |
385 | // 处理YOHO币数据 | 385 | // 处理YOHO币数据 |
@@ -396,6 +396,7 @@ class UserModel | @@ -396,6 +396,7 @@ class UserModel | ||
396 | } | 396 | } |
397 | } | 397 | } |
398 | $data['list'] = $result; | 398 | $data['list'] = $result; |
399 | + | ||
399 | return $data; | 400 | return $data; |
400 | } | 401 | } |
401 | 402 |
@@ -160,17 +160,15 @@ class DetailModel | @@ -160,17 +160,15 @@ class DetailModel | ||
160 | $colorGroup = array(); | 160 | $colorGroup = array(); |
161 | $sizeList = array(); | 161 | $sizeList = array(); |
162 | $goodsGroup = array(); | 162 | $goodsGroup = array(); |
163 | - $coverImage = ''; | ||
164 | - $colorStorageNum = 0; // 颜色的库存总数 | 163 | + $thumbImageList = array(); |
164 | + $colorStorageGroup = array(); // 颜色分组的库存总数集合, 多个之间用/分隔 | ||
165 | + $sizeStorageStr = ''; // 尺码库存总数集合, 多个之间用/分隔 | ||
166 | + $colorStorageNum = 0; | ||
165 | $totalStorageNum = 0; // 总库存数 | 167 | $totalStorageNum = 0; // 总库存数 |
166 | - foreach ($baseInfo['goodsList'] as $i => $value) { | 168 | + foreach ($baseInfo['goodsList'] as $value) { |
167 | $sizeList = array(); | 169 | $sizeList = array(); |
168 | $colorStorageNum = 0; | 170 | $colorStorageNum = 0; |
169 | - | ||
170 | - // 获取默认的封面图 | ||
171 | - if ($i === 0) { | ||
172 | - $coverImage = Helpers::getImageUrl($value['colorImage'], 60, 60); | ||
173 | - } | 171 | + $sizeStorageStr = ''; |
174 | 172 | ||
175 | // 商品分组 | 173 | // 商品分组 |
176 | if (isset($value['goodsImagesList'])) { | 174 | if (isset($value['goodsImagesList'])) { |
@@ -189,10 +187,13 @@ class DetailModel | @@ -189,10 +187,13 @@ class DetailModel | ||
189 | 'id' => $size['id'], | 187 | 'id' => $size['id'], |
190 | 'skuId' => $size['goodsSizeSkuId'], | 188 | 'skuId' => $size['goodsSizeSkuId'], |
191 | 'goodsId' => $size['goodsId'], | 189 | 'goodsId' => $size['goodsId'], |
190 | + 'colorId' => $value['colorId'], | ||
192 | 'name' => $size['sizeName'], | 191 | 'name' => $size['sizeName'], |
193 | 'sizeNum' => $size['goodsSizeStorageNum'], | 192 | 'sizeNum' => $size['goodsSizeStorageNum'], |
194 | ); | 193 | ); |
195 | $colorStorageNum += intval($size['goodsSizeStorageNum']); | 194 | $colorStorageNum += intval($size['goodsSizeStorageNum']); |
195 | + $sizeStorageStr .= $size['goodsSizeStorageNum'] . '/'; | ||
196 | + $colorStorageGroup[ $size['sizeName'] ][ $value['colorName'] ] = $size['goodsSizeStorageNum']; | ||
196 | } | 197 | } |
197 | } | 198 | } |
198 | 199 | ||
@@ -202,11 +203,19 @@ class DetailModel | @@ -202,11 +203,19 @@ class DetailModel | ||
202 | 'skcId' => $value['productSkc'], | 203 | 'skcId' => $value['productSkc'], |
203 | 'name' => $value['colorName'], | 204 | 'name' => $value['colorName'], |
204 | 'goodsName' => $value['goodsName'], | 205 | 'goodsName' => $value['goodsName'], |
205 | - 'shortUrl' => Helpers::getImageUrl($value['colorImage'], 60, 60), | ||
206 | 'colorNum' => $colorStorageNum, | 206 | 'colorNum' => $colorStorageNum, |
207 | - 'sizes' => $sizeList, | 207 | + 'sizeNumStr' => rtrim($sizeStorageStr, '/'), |
208 | ); | 208 | ); |
209 | 209 | ||
210 | + // 缩略图 | ||
211 | + $thumbImageList[] = array('img' => Helpers::getImageUrl($value['colorImage'], 60, 60) ); | ||
212 | + | ||
213 | + // 统计尺码对应的各个颜色的库存量 | ||
214 | + foreach ($sizeList as &$sizeArr) { | ||
215 | + $sizeArr['colorNumStr'] = implode('/', array_values($colorStorageGroup[ $sizeArr['name'] ]) ); | ||
216 | + } | ||
217 | + | ||
218 | + // 商品库存总数 | ||
210 | $totalStorageNum += $colorStorageNum; | 219 | $totalStorageNum += $colorStorageNum; |
211 | } | 220 | } |
212 | 221 | ||
@@ -238,12 +247,13 @@ class DetailModel | @@ -238,12 +247,13 @@ class DetailModel | ||
238 | if (!$soldOut && !$notForSale) { | 247 | if (!$soldOut && !$notForSale) { |
239 | $result['cartInfo']['addToCartUrl'] = Helpers::url('/product/buy_' . $productId . '_' . $goodsId . '.html'); | 248 | $result['cartInfo']['addToCartUrl'] = Helpers::url('/product/buy_' . $productId . '_' . $goodsId . '.html'); |
240 | $result['cartInfo']['productId'] = $productId; | 249 | $result['cartInfo']['productId'] = $productId; |
241 | - $result['cartInfo']['thumb'] = $coverImage; | 250 | + $result['cartInfo']['thumbs'] = $thumbImageList; |
242 | $result['cartInfo']['name'] = isset($result['goodsName']) ? $result['goodsName'] : ''; | 251 | $result['cartInfo']['name'] = isset($result['goodsName']) ? $result['goodsName'] : ''; |
243 | $result['cartInfo']['price'] = isset($result['goodsPrice']['currentPrice']) ? $result['goodsPrice']['currentPrice'] : ''; | 252 | $result['cartInfo']['price'] = isset($result['goodsPrice']['currentPrice']) ? $result['goodsPrice']['currentPrice'] : ''; |
244 | $result['cartInfo']['salePrice'] = isset($result['goodsPrice']['previousPrice']) ? $result['goodsPrice']['previousPrice'] : ''; | 253 | $result['cartInfo']['salePrice'] = isset($result['goodsPrice']['previousPrice']) ? $result['goodsPrice']['previousPrice'] : ''; |
245 | $result['cartInfo']['totalNum'] = $totalStorageNum; | 254 | $result['cartInfo']['totalNum'] = $totalStorageNum; |
246 | $result['cartInfo']['colors'] = $colorGroup; | 255 | $result['cartInfo']['colors'] = $colorGroup; |
256 | + $result['cartInfo']['sizes'] = $sizeList; | ||
247 | } | 257 | } |
248 | // 非卖品 | 258 | // 非卖品 |
249 | elseif ($notForSale) { | 259 | elseif ($notForSale) { |
@@ -336,7 +346,7 @@ class DetailModel | @@ -336,7 +346,7 @@ class DetailModel | ||
336 | 346 | ||
337 | $referenceList = array(); | 347 | $referenceList = array(); |
338 | // 判断是否显示参考尺码 | 348 | // 判断是否显示参考尺码 |
339 | - $showReference = !empty($sizeInfo['sizeInfoBo']['sizeBoList'][0]['referenceSize']) && ($sizeInfo['sizeInfoBo']['sizeBoList'][0]['referenceSize']['gender'] == $gender || $sizeInfo['sizeInfoBo']['sizeBoList'][0]['referenceSize']['gender'] == 3); | 349 | + $showReference = !empty($sizeInfo['sizeInfoBo']['sizeBoList'][0]['referenceSize']); |
340 | if ($showReference) { | 350 | if ($showReference) { |
341 | $referenceList[0] = array('param' => $referenceName); | 351 | $referenceList[0] = array('param' => $referenceName); |
342 | } | 352 | } |
@@ -351,7 +361,10 @@ class DetailModel | @@ -351,7 +361,10 @@ class DetailModel | ||
351 | foreach ($sizeInfo['sizeInfoBo']['sizeBoList'] as $value) { | 361 | foreach ($sizeInfo['sizeInfoBo']['sizeBoList'] as $value) { |
352 | $item = array(); | 362 | $item = array(); |
353 | $sizeNameList[] = array('param' => $value['sizeName']); | 363 | $sizeNameList[] = array('param' => $value['sizeName']); |
354 | - if (!empty($value['referenceSize']['gender']) && ($value['referenceSize']['gender'] == $gender || $value['referenceSize']['gender'] == 3)) { | 364 | + if (!empty($value['referenceSize']['gender']) && $boyReference && ($value['referenceSize']['gender'] == 1 || $value['referenceSize']['gender'] == 3)) { |
365 | + $referenceList[] = array('param' => empty($value['referenceSize']['referenceName']) ? ' ' : $value['referenceSize']['referenceName']); | ||
366 | + } | ||
367 | + elseif (!empty($value['referenceSize']['gender']) && $girlReference && ($value['referenceSize']['gender'] == 2 || $value['referenceSize']['gender'] == 3)) { | ||
355 | $referenceList[] = array('param' => empty($value['referenceSize']['referenceName']) ? ' ' : $value['referenceSize']['referenceName']); | 368 | $referenceList[] = array('param' => empty($value['referenceSize']['referenceName']) ? ' ' : $value['referenceSize']['referenceName']); |
356 | } | 369 | } |
357 | foreach ($value['sortAttributes'] as $attr) { | 370 | foreach ($value['sortAttributes'] as $attr) { |
@@ -59,7 +59,7 @@ class BindController extends AbstractAction | @@ -59,7 +59,7 @@ class BindController extends AbstractAction | ||
59 | $phoneNum=$this->get('phoneNum'); | 59 | $phoneNum=$this->get('phoneNum'); |
60 | 60 | ||
61 | $data = array( | 61 | $data = array( |
62 | - 'bindIndex'=>true,//js标识 | 62 | + 'bindCode'=>true,//js标识 |
63 | 'backUrl' => '/', // 返回的URL链接 | 63 | 'backUrl' => '/', // 返回的URL链接 |
64 | 'showHeaderImg' => true, // 控制显示头部图片 | 64 | 'showHeaderImg' => true, // 控制显示头部图片 |
65 | 'isPassportPage' => true, // 模板中模块标识 | 65 | 'isPassportPage' => true, // 模板中模块标识 |
@@ -86,15 +86,17 @@ class BindController extends AbstractAction | @@ -86,15 +86,17 @@ class BindController extends AbstractAction | ||
86 | $sourceType = $this->get('sourceType'); | 86 | $sourceType = $this->get('sourceType'); |
87 | $nickname = $this->get('nickname'); | 87 | $nickname = $this->get('nickname'); |
88 | $areaCode = $this->get('areaCode', '86'); | 88 | $areaCode = $this->get('areaCode', '86'); |
89 | + $phoneNum=$this->get('phoneNum'); | ||
89 | $data = array( | 90 | $data = array( |
90 | - 'bindIndex'=>true,//js标识 | 91 | + 'bindPwd'=>true,//js标识 |
91 | 'backUrl' => '/', // 返回的URL链接 | 92 | 'backUrl' => '/', // 返回的URL链接 |
92 | 'showHeaderImg' => true, // 控制显示头部图片 | 93 | 'showHeaderImg' => true, // 控制显示头部图片 |
93 | 'isPassportPage' => true, // 模板中模块标识 | 94 | 'isPassportPage' => true, // 模板中模块标识 |
94 | 'sourceType' => $sourceType, // 第三方登录来源 | 95 | 'sourceType' => $sourceType, // 第三方登录来源 |
95 | 'openId' => $openId, // openId | 96 | 'openId' => $openId, // openId |
96 | 'nickname' => $nickname, //昵称 | 97 | 'nickname' => $nickname, //昵称 |
97 | - 'areaCode' => $areaCode //国别码 | 98 | + 'areaCode' => $areaCode, //国别码 |
99 | + 'phoneNum' => $phoneNum //国别码 | ||
98 | ); | 100 | ); |
99 | 101 | ||
100 | // 渲染模板 | 102 | // 渲染模板 |
@@ -138,7 +140,7 @@ class BindController extends AbstractAction | @@ -138,7 +140,7 @@ class BindController extends AbstractAction | ||
138 | } | 140 | } |
139 | else | 141 | else |
140 | { | 142 | { |
141 | - $data = array('code' => $res['code'], 'message' => $res['message'], 'data' => $res['data']); | 143 | + $data = array('code' => $res['code'], 'message' => $res['message'], 'data' => isset($res['data'])?$res['data']:''); |
142 | } | 144 | } |
143 | } | 145 | } |
144 | while (false); | 146 | while (false); |
@@ -192,15 +194,15 @@ class BindController extends AbstractAction | @@ -192,15 +194,15 @@ class BindController extends AbstractAction | ||
192 | } | 194 | } |
193 | 195 | ||
194 | $phoneNum = $this->post('phoneNum'); | 196 | $phoneNum = $this->post('phoneNum'); |
195 | - $msgCode = $this->post('msgCode'); | 197 | + $code = $this->post('code'); |
196 | $areaCode = $this->post('areaCode'); | 198 | $areaCode = $this->post('areaCode'); |
197 | 199 | ||
198 | - if (!is_numeric($phoneNum) || !$msgCode) | 200 | + if (!is_numeric($phoneNum) || !$code) |
199 | { | 201 | { |
200 | break; | 202 | break; |
201 | } | 203 | } |
202 | 204 | ||
203 | - $data = BindData::checkBindCode($areaCode,$phoneNum, $msgCode); | 205 | + $data = BindData::checkBindCode($areaCode,$phoneNum, $code); |
204 | if (!isset($data['code'])) | 206 | if (!isset($data['code'])) |
205 | { | 207 | { |
206 | break; | 208 | break; |
@@ -187,7 +187,7 @@ class LoginController extends AbstractAction | @@ -187,7 +187,7 @@ class LoginController extends AbstractAction | ||
187 | $isBind = $result['data']['is_bind']; | 187 | $isBind = $result['data']['is_bind']; |
188 | if ($isBind == 'N') | 188 | if ($isBind == 'N') |
189 | { | 189 | { |
190 | - $this->go(Helpers::url('/passport/bind/index',array('openId'=>$userId,'sourceType'=>'alipay','nickName'=>$realName))); | 190 | + $this->go(Helpers::url('/passport/bind/index',array('openId'=>$userId,'sourceType'=>'alipay','nickname'=>$realName))); |
191 | } | 191 | } |
192 | 192 | ||
193 | $refer = $this->getCookie('refer'); | 193 | $refer = $this->getCookie('refer'); |
@@ -226,7 +226,7 @@ class LoginController extends AbstractAction | @@ -226,7 +226,7 @@ class LoginController extends AbstractAction | ||
226 | $isBind = $result['data']['is_bind']; | 226 | $isBind = $result['data']['is_bind']; |
227 | if ($isBind == 'N') | 227 | if ($isBind == 'N') |
228 | { | 228 | { |
229 | - $this->go(Helpers::url('/passport/bind/index',array('openId'=>$access['openid'],'sourceType'=>'qq','nickName'=>$partnerInfo['nickname']))); | 229 | + $this->go(Helpers::url('/passport/bind/index',array('openId'=>$access['openid'],'sourceType'=>'qq','nickname'=>$partnerInfo['nickname']))); |
230 | } | 230 | } |
231 | 231 | ||
232 | $refer = $this->getCookie('refer'); | 232 | $refer = $this->getCookie('refer'); |
@@ -270,7 +270,7 @@ class LoginController extends AbstractAction | @@ -270,7 +270,7 @@ class LoginController extends AbstractAction | ||
270 | $isBind = $result['data']['is_bind']; | 270 | $isBind = $result['data']['is_bind']; |
271 | if ($isBind == 'N') | 271 | if ($isBind == 'N') |
272 | { | 272 | { |
273 | - $this->go(Helpers::url('/passport/bind/index',array('openId'=>$access['uid'],'sourceType'=>'sina','nickName'=>$partnerInfo['screen_name']))); | 273 | + $this->go(Helpers::url('/passport/bind/index',array('openId'=>$access['uid'],'sourceType'=>'sina','nickname'=>$partnerInfo['screen_name']))); |
274 | } | 274 | } |
275 | 275 | ||
276 | $refer = $this->getCookie('refer'); | 276 | $refer = $this->getCookie('refer'); |
-
Please register or login to post a comment