Authored by yyq

fix js

... ... @@ -292,6 +292,13 @@
</script>
{{/if}}
{{!-- 支付成功页面 --}}
{{#if paySuccessPage}}
<script>
seajs.use('js/pay/success');
</script>
{{/if}}
{{!-- 微信支付 --}}
{{#if wechatqrcodePage}}
<script>
... ...
... ... @@ -45,6 +45,9 @@ require('./js/shopping/pay');
//微信扫码支付
require('./js/pay/wechatqrcode');
//支付成功页
require('./js/pay/success');
//关于我们
require('./js/about/entry');
... ...
var $ = require('yoho.jquery');
(function() {
var $bestForYou = $('#best-for-you');
var $box, boxInfo;
if (!$bestForYou.length) {
return;
}
$box = $bestForYou.children('.product-wrap');
boxInfo = {
index: 0,
width: $box.find('li').width() + 10,
totalPage: Math.ceil(($box.find('li').length + 1) / 5)
};
if (boxInfo.totalPage > 1) {
boxInfo.totalPage = boxInfo.totalPage > 3 ? 3 : boxInfo.totalPage;
$bestForYou.find('.change-btn').show().click(function() {
boxInfo.index++;
$box.get(0).scrollLeft = (boxInfo.index % boxInfo.totalPage) * boxInfo.width * 5;
});
}
})();
... ...
/**
* 支付成功页
*/
require('./best-for-you');
... ...
... ... @@ -15,13 +15,14 @@
border: 1px solid #e0e0e0;
> h1 {
font-size: 26px;
font-size: 28px;
line-height: 1;
.pay-sure-icon {
display: inline-block;
width: 32px;
height: 32px;
margin-right: 20px;
background: resolve('pay/pay-sure-icon.png');
vertical-align: text-bottom;
}
... ...
... ... @@ -15,13 +15,14 @@
border: 1px solid #e0e0e0;
> h1 {
font-size: 26px;
font-size: 28px;
line-height: 1;
.pay-sure-icon {
display: inline-block;
width: 32px;
height: 32px;
margin-right: 20px;
background: resolve('pay/pay-sure-icon.png');
vertical-align: text-bottom;
}
... ...
... ... @@ -396,7 +396,8 @@ class NoticeController extends WebAction
'orderNum' => $dealResult['data']['orderNum'],
'items' => $dealResult['data']['items']
),
'point' => $point
'point' => $point,
'paySuccessPage' => true
);
}
... ...
... ... @@ -168,7 +168,7 @@ class PayreturnController extends WebAction
$dealResult['data']['bestForYou'] = IndexModel::preferenceData($channelNum, $uid, $udid, '100004', 15);
$data = array('payNotice' => $dealResult['data'], 'point' => $point);
$data = array('payNotice' => $dealResult['data'], 'point' => $point, 'paySuccessPage' => true);
}
//头部导航
... ...
... ... @@ -102,7 +102,8 @@ class PayController extends WebAction
'orderNum' => $data['orderNum'],
'items' => $data['orderGoods']
),
'payPage' => true
'payPage' => true,
'paySuccessPage' => true
));
}
/**
... ...