...
|
...
|
@@ -15,6 +15,7 @@ var $ = require('yoho-jquery'), |
|
|
var isGetData;
|
|
|
|
|
|
var $newCoupon = $('#new-coupon'),
|
|
|
linkUrl = document.referrer,
|
|
|
$couponList = $('#coupon-list');
|
|
|
|
|
|
var winH = $(window).height();
|
...
|
...
|
@@ -37,6 +38,14 @@ function fixedLayOut() { |
|
|
|
|
|
ellipsis.init();
|
|
|
|
|
|
function goToBack() {
|
|
|
if (linkUrl) {
|
|
|
window.location.href = linkUrl;
|
|
|
} else {
|
|
|
history.go(-1);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
$newCoupon.on('submit', function() {
|
|
|
var $this = $(this);
|
|
|
|
...
|
...
|
@@ -59,7 +68,7 @@ $newCoupon.on('submit', function() { |
|
|
orderInfo('yohoCoin', 0);
|
|
|
orderInfo('couponCode', res.data.coupon_code);
|
|
|
orderInfo('couponName', res.data.coupon_title);
|
|
|
history.go(-1);
|
|
|
goToBack();
|
|
|
}
|
|
|
}).fail(function() {
|
|
|
tip.show('网络错误');
|
...
|
...
|
@@ -85,7 +94,7 @@ $('body').on('touchend', '.not-use', function() { |
|
|
|
|
|
// 实付金额发生变化,使用有货币为0
|
|
|
orderInfo('yohoCoin', 0);
|
|
|
history.go(-1);
|
|
|
goToBack();
|
|
|
});
|
|
|
|
|
|
|
...
|
...
|
@@ -142,7 +151,7 @@ function getCouponHandle(allCoupons) { |
|
|
|
|
|
// 实付金额发生变化,使用有货币为0
|
|
|
orderInfo('yohoCoin', 0);
|
|
|
history.go(-1);
|
|
|
goToBack();
|
|
|
} else if (res.message) {
|
|
|
tip.show(res.message);
|
|
|
}
|
...
|
...
|
|