...
|
...
|
@@ -64,7 +64,9 @@ function getUrlParam(name) { |
|
|
|
|
|
$('.on-lingqu', 'div.main-right-use').on('click', function() {
|
|
|
var $curDom = $(this),
|
|
|
req = '';
|
|
|
req = '',
|
|
|
href = '',
|
|
|
a = '';
|
|
|
|
|
|
if (getUrlParam('app_version')) {
|
|
|
req += '&app_version=' + getUrlParam('app_version');
|
...
|
...
|
@@ -73,6 +75,8 @@ $('.on-lingqu', 'div.main-right-use').on('click', function() { |
|
|
if (getUrlParam('uid')) {
|
|
|
req += '&uid=' + getUrlParam('uid');
|
|
|
}
|
|
|
|
|
|
|
|
|
if (!$curDom.hasClass('received')) {
|
|
|
$.ajax({
|
|
|
url: '//m.yohobuy.com/coupon/receiveCoupon?code=a83b7d55324fb65f96c1f85a3387ebd8' + req,
|
...
|
...
|
@@ -93,8 +97,11 @@ $('.on-lingqu', 'div.main-right-use').on('click', function() { |
|
|
location.href = newUrl;
|
|
|
} else {
|
|
|
if (status) {
|
|
|
$curDom.html('').removeClass('on-receive').removeClass('no-bg');
|
|
|
$curDom.addClass('received');
|
|
|
href = $curDom.parent(".main-right-use").attr("href");
|
|
|
$curDom.parent(".main-right-use").wrap("<a class='main-right-use' href="+href+"></a>");
|
|
|
a = $curDom.parent(".main-right-use").parent("a");
|
|
|
a.html('<span class="received"></span>');
|
|
|
|
|
|
tip.show('领券成功');
|
|
|
} else {
|
|
|
tip.show(msg);
|
...
|
...
|
|