Authored by 郝肖肖

店铺跨域问题

... ... @@ -37,7 +37,8 @@ $(".coupon-content .receive-btn").on('touchstart', function(e) {
$(that).unbind('touchstart');//移除绑定事件
return true;
} else if (data.code === 4401) {
document.location.href = data.url;
$('body').append('<a href=\'' + data.url + '\'><span id="jump-login"><span></a>');
$('#jump-login').click();
} else {
tip.show(data.message);
}
... ...
... ... @@ -719,7 +719,10 @@ class IndexController extends AbstractAction
* @param int couponID
* @return json
*/
public function userCouponAction() {
public function userCouponAction()
{
header('Access-Control-Allow-Origin:' . $_SERVER['HTTP_ORIGIN']);
header('Access-Control-Allow-Credentials:true');
$data = array();
$appVersion = $this->post('app_version', 0);
... ...