Authored by 郝肖肖

店铺优惠券APP,领取修复

@@ -18,7 +18,6 @@ $(".coupon-content .receive-btn").on('touchstart', function(e) { @@ -18,7 +18,6 @@ $(".coupon-content .receive-btn").on('touchstart', function(e) {
18 18
19 $.ajax({ 19 $.ajax({
20 method: 'POST', 20 method: 'POST',
21 - // url: '/product/index/userCoupon',  
22 url: location.protocol + '//m.yohobuy.com/product/index/userCoupon', 21 url: location.protocol + '//m.yohobuy.com/product/index/userCoupon',
23 data: { 22 data: {
24 couponID: code, 23 couponID: code,
@@ -37,8 +36,9 @@ $(".coupon-content .receive-btn").on('touchstart', function(e) { @@ -37,8 +36,9 @@ $(".coupon-content .receive-btn").on('touchstart', function(e) {
37 $(that).unbind('touchstart');//移除绑定事件 36 $(that).unbind('touchstart');//移除绑定事件
38 return true; 37 return true;
39 } else if (data.code === 4401) { 38 } else if (data.code === 4401) {
40 - $('body').append('<a href=\'' + data.url + '\'><span id="jump-login"><span></a>');  
41 - $('#jump-login').click(); 39 + $('#shop-login').remove();
  40 + $('body').append('<a href=\'' + data.url + '\'><span id="shop-login"><span></a>');
  41 + $('#shop-login').click();
42 } else { 42 } else {
43 tip.show(data.message); 43 tip.show(data.message);
44 } 44 }
@@ -745,7 +745,7 @@ class IndexController extends AbstractAction @@ -745,7 +745,7 @@ class IndexController extends AbstractAction
745 $refer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''; 745 $refer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
746 $toUrl = Helpers::url('/signin.html')."?refer=".$refer; 746 $toUrl = Helpers::url('/signin.html')."?refer=".$refer;
747 if (!empty($appVersion)){ 747 if (!empty($appVersion)){
748 - $toUrl .= '&openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"'.$refer.'"}}}'; 748 + $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"}}';
749 } 749 }
750 $data['url'] = $toUrl; 750 $data['url'] = $toUrl;
751 break; 751 break;