Authored by 毕凯

添加优惠券搜索

... ... @@ -19,7 +19,14 @@ $('#new-coupon').on('submit', function() {
url: '',
data: $(this).serialize()
}).then(function(res) {
if (res.avaliable) {
$('#coupon-list').html(conponTmpl({
coupons: res.coupons
}));
$('#coupon-list-not').html('');
} else {
tip.show(res.msg);
}
});
return false;
});
... ...
... ... @@ -9,7 +9,7 @@
input {
padding: 0 pxToRem(12px);
width: pxToRem(380px);
width: pxToRem(384px);
height: pxToRem(80px);
border: 1px solid #b0b0b0;
border-radius: .1rem;
... ... @@ -18,7 +18,7 @@
.submit {
margin-left: pxToRem(30px);
width: pxToRem(120px);
width: pxToRem(130px);
height: pxToRem(80px);
color: #fff;
background: #b0b0b0;
... ...
{{> 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="输入优惠券码">
<input type="text" name="coupon-code" value="" placeholder="输入优惠券码">
<button type="submit" class="submit">确定</button>
</form>
<div id="coupon-list" class="coupon-list"></div>
... ...