Showing
9 changed files
with
50 additions
and
5 deletions
@@ -292,6 +292,13 @@ | @@ -292,6 +292,13 @@ | ||
292 | </script> | 292 | </script> |
293 | {{/if}} | 293 | {{/if}} |
294 | 294 | ||
295 | +{{!-- 支付成功页面 --}} | ||
296 | +{{#if paySuccessPage}} | ||
297 | + <script> | ||
298 | + seajs.use('js/pay/success'); | ||
299 | + </script> | ||
300 | +{{/if}} | ||
301 | + | ||
295 | {{!-- 微信支付 --}} | 302 | {{!-- 微信支付 --}} |
296 | {{#if wechatqrcodePage}} | 303 | {{#if wechatqrcodePage}} |
297 | <script> | 304 | <script> |
@@ -45,6 +45,9 @@ require('./js/shopping/pay'); | @@ -45,6 +45,9 @@ require('./js/shopping/pay'); | ||
45 | //微信扫码支付 | 45 | //微信扫码支付 |
46 | require('./js/pay/wechatqrcode'); | 46 | require('./js/pay/wechatqrcode'); |
47 | 47 | ||
48 | +//支付成功页 | ||
49 | +require('./js/pay/success'); | ||
50 | + | ||
48 | //关于我们 | 51 | //关于我们 |
49 | require('./js/about/entry'); | 52 | require('./js/about/entry'); |
50 | 53 |
web-static/js/pay/best-for-you.js
0 → 100644
1 | +var $ = require('yoho.jquery'); | ||
2 | + | ||
3 | +(function() { | ||
4 | + var $bestForYou = $('#best-for-you'); | ||
5 | + var $box, boxInfo; | ||
6 | + | ||
7 | + if (!$bestForYou.length) { | ||
8 | + return; | ||
9 | + } | ||
10 | + | ||
11 | + $box = $bestForYou.children('.product-wrap'); | ||
12 | + | ||
13 | + boxInfo = { | ||
14 | + index: 0, | ||
15 | + width: $box.find('li').width() + 10, | ||
16 | + totalPage: Math.ceil(($box.find('li').length + 1) / 5) | ||
17 | + }; | ||
18 | + | ||
19 | + if (boxInfo.totalPage > 1) { | ||
20 | + boxInfo.totalPage = boxInfo.totalPage > 3 ? 3 : boxInfo.totalPage; | ||
21 | + $bestForYou.find('.change-btn').show().click(function() { | ||
22 | + boxInfo.index++; | ||
23 | + $box.get(0).scrollLeft = (boxInfo.index % boxInfo.totalPage) * boxInfo.width * 5; | ||
24 | + }); | ||
25 | + } | ||
26 | +})(); |
@@ -15,13 +15,14 @@ | @@ -15,13 +15,14 @@ | ||
15 | border: 1px solid #e0e0e0; | 15 | border: 1px solid #e0e0e0; |
16 | 16 | ||
17 | > h1 { | 17 | > h1 { |
18 | - font-size: 26px; | 18 | + font-size: 28px; |
19 | line-height: 1; | 19 | line-height: 1; |
20 | 20 | ||
21 | .pay-sure-icon { | 21 | .pay-sure-icon { |
22 | display: inline-block; | 22 | display: inline-block; |
23 | width: 32px; | 23 | width: 32px; |
24 | height: 32px; | 24 | height: 32px; |
25 | + margin-right: 20px; | ||
25 | background: resolve('pay/pay-sure-icon.png'); | 26 | background: resolve('pay/pay-sure-icon.png'); |
26 | vertical-align: text-bottom; | 27 | vertical-align: text-bottom; |
27 | } | 28 | } |
@@ -15,13 +15,14 @@ | @@ -15,13 +15,14 @@ | ||
15 | border: 1px solid #e0e0e0; | 15 | border: 1px solid #e0e0e0; |
16 | 16 | ||
17 | > h1 { | 17 | > h1 { |
18 | - font-size: 26px; | 18 | + font-size: 28px; |
19 | line-height: 1; | 19 | line-height: 1; |
20 | 20 | ||
21 | .pay-sure-icon { | 21 | .pay-sure-icon { |
22 | display: inline-block; | 22 | display: inline-block; |
23 | width: 32px; | 23 | width: 32px; |
24 | height: 32px; | 24 | height: 32px; |
25 | + margin-right: 20px; | ||
25 | background: resolve('pay/pay-sure-icon.png'); | 26 | background: resolve('pay/pay-sure-icon.png'); |
26 | vertical-align: text-bottom; | 27 | vertical-align: text-bottom; |
27 | } | 28 | } |
@@ -396,7 +396,8 @@ class NoticeController extends WebAction | @@ -396,7 +396,8 @@ class NoticeController extends WebAction | ||
396 | 'orderNum' => $dealResult['data']['orderNum'], | 396 | 'orderNum' => $dealResult['data']['orderNum'], |
397 | 'items' => $dealResult['data']['items'] | 397 | 'items' => $dealResult['data']['items'] |
398 | ), | 398 | ), |
399 | - 'point' => $point | 399 | + 'point' => $point, |
400 | + 'paySuccessPage' => true | ||
400 | ); | 401 | ); |
401 | } | 402 | } |
402 | 403 |
@@ -168,7 +168,7 @@ class PayreturnController extends WebAction | @@ -168,7 +168,7 @@ class PayreturnController extends WebAction | ||
168 | 168 | ||
169 | $dealResult['data']['bestForYou'] = IndexModel::preferenceData($channelNum, $uid, $udid, '100004', 15); | 169 | $dealResult['data']['bestForYou'] = IndexModel::preferenceData($channelNum, $uid, $udid, '100004', 15); |
170 | 170 | ||
171 | - $data = array('payNotice' => $dealResult['data'], 'point' => $point); | 171 | + $data = array('payNotice' => $dealResult['data'], 'point' => $point, 'paySuccessPage' => true); |
172 | 172 | ||
173 | } | 173 | } |
174 | //头部导航 | 174 | //头部导航 |
@@ -102,7 +102,8 @@ class PayController extends WebAction | @@ -102,7 +102,8 @@ class PayController extends WebAction | ||
102 | 'orderNum' => $data['orderNum'], | 102 | 'orderNum' => $data['orderNum'], |
103 | 'items' => $data['orderGoods'] | 103 | 'items' => $data['orderGoods'] |
104 | ), | 104 | ), |
105 | - 'payPage' => true | 105 | + 'payPage' => true, |
106 | + 'paySuccessPage' => true | ||
106 | )); | 107 | )); |
107 | } | 108 | } |
108 | /** | 109 | /** |
-
Please register or login to post a comment