Authored by 郝肖肖

店铺优惠券APP,领取修复

... ... @@ -18,7 +18,6 @@ $(".coupon-content .receive-btn").on('touchstart', function(e) {
$.ajax({
method: 'POST',
// url: '/product/index/userCoupon',
url: location.protocol + '//m.yohobuy.com/product/index/userCoupon',
data: {
couponID: code,
... ... @@ -37,8 +36,9 @@ $(".coupon-content .receive-btn").on('touchstart', function(e) {
$(that).unbind('touchstart');//移除绑定事件
return true;
} else if (data.code === 4401) {
$('body').append('<a href=\'' + data.url + '\'><span id="jump-login"><span></a>');
$('#jump-login').click();
$('#shop-login').remove();
$('body').append('<a href=\'' + data.url + '\'><span id="shop-login"><span></a>');
$('#shop-login').click();
} else {
tip.show(data.message);
}
... ...
... ... @@ -745,7 +745,7 @@ class IndexController extends AbstractAction
$refer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
$toUrl = Helpers::url('/signin.html')."?refer=".$refer;
if (!empty($appVersion)){
$toUrl .= '&openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"'.$refer.'"}}}';
$toUrl .= '&openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"'. $refer . '","param":{}},"requesturl":{"param":{"method":"app.promotion.getCoupon","couponId":"' . Encryption::decrypt($couponID) . '"},"url":"' . API_URL . '"},"priority":"Y"}}';
}
$data['url'] = $toUrl;
break;
... ...