Showing
2 changed files
with
2 additions
and
2 deletions
@@ -213,7 +213,7 @@ function getNamedCoupon(activityId, couponId, isApp, userIsLogged) | @@ -213,7 +213,7 @@ function getNamedCoupon(activityId, couponId, isApp, userIsLogged) | ||
213 | { | 213 | { |
214 | $.ajax({ | 214 | $.ajax({ |
215 | type: 'POST', | 215 | type: 'POST', |
216 | - url: !isApp ? '/cuxiao/coupon/getnamed' : '/cuxiao/coupon/getnamed?uid=' + GetQueryString('uid'), | 216 | + url: isApp && uid ? '/cuxiao/coupon/getnamed?uid=' + uid : '/cuxiao/coupon/getnamed', |
217 | data: 'activityId=' + activityId + '&couponId=' + couponId, | 217 | data: 'activityId=' + activityId + '&couponId=' + couponId, |
218 | success: function (data) { | 218 | success: function (data) { |
219 | setCookie('_Coupon' + activityId, null, { | 219 | setCookie('_Coupon' + activityId, null, { |
@@ -971,7 +971,7 @@ class CouponController extends HuodongAction | @@ -971,7 +971,7 @@ class CouponController extends HuodongAction | ||
971 | $uid = $this->get('uid'); // session 获取不到 UID,直接获取查询字符串的 uid, 严重问题,不安全,需要修复 | 971 | $uid = $this->get('uid'); // session 获取不到 UID,直接获取查询字符串的 uid, 严重问题,不安全,需要修复 |
972 | } | 972 | } |
973 | 973 | ||
974 | - if (!$uid) { | 974 | + if (empty($uid)) { |
975 | $result['code'] = 400; | 975 | $result['code'] = 400; |
976 | $result['message'] = '请先登录'; | 976 | $result['message'] = '请先登录'; |
977 | $result['data'] = Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', '/')), 'default'); | 977 | $result['data'] = Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', '/')), 'default'); |
-
Please register or login to post a comment