Authored by hf

do modify huodong christmas coupon share content

... ... @@ -19,6 +19,7 @@ class ActivityData
const URI_GET_ACTIVITY_INFO = 'event/api/v1/activity/get';
const URI_GET_NAMED_COUPON = 'event/api/v1/activity/getCoupon';
const URI_GET_ALL_COUPON = 'event/api/v1/activity/getCoupon';
const URI_SEND_MESSAGE = 'inbox/service/v1/inbox';
/**
* 用户获取某个活动指定的单个优惠券
... ... @@ -50,7 +51,7 @@ class ActivityData
$param = array();
$param['uid'] = $uid;
$param['activity_id'] = $activityId;
return Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_GET_ALL_COUPON, $param);
}
... ... @@ -77,7 +78,7 @@ class ActivityData
{
//调用接口发送站内信
return Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URI_SEND_MESSAGE, 'setSingleMessage', array(
$uid, $title, $content, $type, $verify_key, $send_uid, $call_back
$uid, $title, $content, $type, $verify_key, $send_uid, $call_back
));
}
... ...
... ... @@ -36,9 +36,7 @@ class ChristmasController extends HuodongAction
switch (intval($result['code'])) {
case 200: // 领取成功, 发送站内信消息
$showPopupFlag = '0';
$title = '【优惠券】您有6张潮集圣诞优惠券';
$content = '尊敬的客户:恭喜您成功获得6张潮集圣诞优惠券 !您可以在个人中心的交易管理中查看‘我的优惠券’。';
ActivityData::message($uid, $title, $content);
$this->sendMessage($uid);
break;
case 201: // 已领取过, 提示重复领券
$showPopupFlag = '1';
... ... @@ -53,10 +51,10 @@ class ChristmasController extends HuodongAction
'staticTitle' => '潮集圣诞',
'weixinShare' => $this->_isApp ? false : true, // 是否需要微信分享
'shareLink' => 'http://feature.yoho.cn/1211APPTEST3/index.html',
'shareTitle' => 'YOHO!BUY有货【潮集圣诞】第一弹疯狂来袭!500元优惠券引爆圣诞!',
'shareDesc' => '800+潮牌限时4折起,折上满减,最高直减¥100!',
'shareImg' => 'http://img12.static.yhbimg.com/couponImg/2015/12/10/05/02a7ec01785c8579ed10bdb65a16d60a44.png',
'shareLink' => 'http://feature.yohobuy.com/0/0/675/index.html',
'shareTitle' => 'YOHO!BUY有货【潮集圣诞】第一弹来袭!500元优惠券引爆圣诞!',
'shareDesc' => '万件潮品限时58折封顶,再享折上满减,还有惊喜圣诞礼物等你来挑哦!',
'shareImg' => 'http://img12.static.yhbimg.com/couponImg/2015/12/10/09/029fd41969b67002126ff7a71fe5396b6e.png',
'showPopupFlag' => $showPopupFlag,
'myCouponUrl' => $myCouponUrl,
... ... @@ -70,7 +68,7 @@ class ChristmasController extends HuodongAction
*
* @return int
*/
public function getLoggedUid()
private function getLoggedUid()
{
// 判断是否是应用访问, 拼接APP需要的URL参数
$this->_isApp = null !== $this->get('app_version');
... ... @@ -83,6 +81,21 @@ class ChristmasController extends HuodongAction
return $uid;
}
/**
* 发送站内信
*
* @param int $uid 用户ID
*/
private function sendMessage($uid)
{
try {
ActivityData::message($uid, '【优惠券】您有6张潮集圣诞优惠券', '尊敬的客户:恭喜您成功获得6张潮集圣诞优惠券 !您可以在个人中心的交易管理中查看‘我的优惠券’。');
}
catch (Exception $e) {
// do nothing
}
}
/**
* 根据环境来获取活动ID
... ...