Authored by biao

增加支付中心点击效果, code review by XWG

... ... @@ -143,6 +143,16 @@ function showPage() {
$pageList.css('visibility', 'visible');
}
function bindTouchedEvent() {
var $boxs = $('.box');
$boxs.on('touchstart', function(e) {
$(this).addClass('bytouch');
}).on('touchend touchcancel', function() {
$boxs.removeClass('bytouch');
});
}
if (wxHammer) {
wxHammer.on('tap', function() {
callpay(theOrderCode);
... ... @@ -154,9 +164,11 @@ function main() {
loading.hideLoadingMask();
showPage();
loadIcon();
bindTouchedEvent();
}
loading.showLoadingMask();
$(document).ready(main);
... ...
... ... @@ -5,6 +5,10 @@
visibility: hidden;
}
.box.bytouch {
background-color:#eee;
}
.box {
border: 1px solid #eee;
border-radius: 10rem / $pxConvertRem;
... ... @@ -23,6 +27,7 @@
@include flexbox((display: flex, align-items: center));
}
.icon {
width: 15%;
... ... @@ -38,7 +43,7 @@
height: 60rem / $pxConvertRem;
background-image: image-url("layout/pay-icon.png");
background-size: 90%;
background-position-y: 8rem / $pxConvertRem;
background-position-y: 12rem / $pxConvertRem;
background-position-x: center;
background-repeat: no-repeat;
}
... ...