Authored by yangyang

领券换新java

... ... @@ -36,11 +36,14 @@ class ActivityData
public static function getCouponNamed($uid, $activityId, $couponId)
{
$param = array();
$param = Yohobuy::param();
$param['method'] = 'app.activity.getCoupon';
$param['uid'] = $uid;
$param['activity_id'] = $activityId;
$param['coupon_id'] = $couponId;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_GET_NAMED_COUPON, $param);
return Yohobuy::get('http://192.168.102.205:8080/gateway', $param);
}
/**
... ...
... ... @@ -981,6 +981,9 @@ class CouponController extends HuodongAction
/* 领取指定的优惠券操作 */
$result = ActivityData::getCouponNamed($uid, $activityId, $couponId);
if (isset($result['code']) && isset($result['message']) && $result['message'] == '优惠券已经领取') {
$result['code'] = '201';
}
} while (false);
$this->echoJson($result);
... ...