Authored by 毕凯

下单确认 添加使用 新优惠券

... ... @@ -13,6 +13,17 @@ var conponTmpl = Handlebars.compile($('#tmpl-coupon').html()),
ellipsis.init();
$('#new-coupon').on('submit', function() {
$.ajax({
method: 'POST',
url: '',
data: $(this).serialize()
}).then(function(res) {
});
return false;
});
function getCouponDate() {
if (!canGetCoupon) {
return;
... ...
... ... @@ -2,6 +2,32 @@
margin-top: pxToRem(30px);
margin-bottom: pxToRem(30px);
#new-coupon {
margin-bottom: pxToRem(30px);
padding-left: pxToRem(30px);
padding-right: pxToRem(30px);
input {
padding: 0 pxToRem(12px);
width: pxToRem(380px);
height: pxToRem(80px);
border: 1px solid #b0b0b0;
border-radius: .1rem;
outline: 0;
}
.submit {
margin-left: pxToRem(30px);
width: pxToRem(120px);
height: pxToRem(80px);
color: #fff;
background: #b0b0b0;
border-radius: .1rem;
border: none;
outline: 0;
}
}
.coupon-list {
.employ-main:first-child {
margin-top: 0;
... ...
{{> layout/header}}
<div class="yoho-page select-coupon-page my-coupon-page">
<form id="new-coupon" method="POST" action="">
<input type="text" name="coupon-code" value="" placeholder="输入优惠券号码">
<button type="submit" class="submit">确定</button>
</form>
<div id="coupon-list" class="coupon-list"></div>
<div class="not-avaliable-coupon-line hide">不可使用的优惠券</div>
<div id="coupon-list-not" class="coupon-list"></div>
... ...