Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
hf
9 years ago
Commit
c78fee2b19c27c3732afa8bd931f876c52e0529c
1 parent
7b0c73a0
do modify huodong christmas coupon share content
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
9 deletions
library/LibModels/Wap/Cuxiao/ActivityData.php
yohobuy/huodong.m.yohobuy.com/application/modules/Cuxiao/controllers/Christmas.php
library/LibModels/Wap/Cuxiao/ActivityData.php
View file @
c78fee2
...
...
@@ -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
));
}
...
...
yohobuy/huodong.m.yohobuy.com/application/modules/Cuxiao/controllers/Christmas.php
View file @
c78fee2
...
...
@@ -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,9 +51,9 @@ 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!'
,
'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/05/02a7ec01785c8579ed10bdb65a16d60a44.png'
,
'showPopupFlag'
=>
$showPopupFlag
,
...
...
@@ -70,7 +68,7 @@ class ChristmasController extends HuodongAction
*
* @return int
*/
p
ublic
function
getLoggedUid
()
p
rivate
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
...
...
Please
register
or
login
to post a comment