Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
hf
9 years ago
Commit
eefba98da12c6b63e09b5df98b708d520e16d683
1 parent
ac45cb89
do merge ActivityData.php
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
6 deletions
library/LibModels/Wap/Cuxiao/ActivityData.php
library/LibModels/Wap/Cuxiao/ActivityData.php
View file @
eefba98
...
...
@@ -15,10 +15,11 @@ use Api\Yohobuy;
*/
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'
;
/**
* 用户获取某个活动指定的单个优惠券
*
...
...
@@ -36,7 +37,7 @@ class ActivityData
return
Yohobuy
::
get
(
Yohobuy
::
SERVICE_URL
.
self
::
URI_GET_NAMED_COUPON
,
$param
);
}
/**
* 用户获取某个活动所有的优惠券操作
*
...
...
@@ -49,10 +50,10 @@ class ActivityData
$param
=
array
();
$param
[
'uid'
]
=
$uid
;
$param
[
'activity_id'
]
=
$activityId
;
return
Yohobuy
::
get
(
Yohobuy
::
SERVICE_URL
.
self
::
URI_GET_ALL_COUPON
,
$param
);
}
/**
* 获取活动信息
*
...
...
@@ -62,8 +63,22 @@ class ActivityData
public
static
function
getActivityInfo
(
$activityId
)
{
$param
=
array
(
'activity_id'
=>
$activityId
);
return
Yohobuy
::
get
(
Yohobuy
::
SERVICE_URL
.
self
::
URI_GET_ACTIVITY_INFO
,
$param
,
3600
);
// 有缓存1小时
}
/**
* 发送站内信
*
* @param int $activityId 活动ID
* @return array
*/
public
static
function
message
(
$uid
,
$title
,
$content
,
$type
=
1
,
$verify_key
=
''
,
$send_uid
=
0
,
$call_back
=
''
)
{
//调用接口发送站内信
return
Yohobuy
::
yarClient
(
Yohobuy
::
SERVICE_URL
.
self
::
URI_SEND_MESSAGE
,
'setSingleMessage'
,
array
(
$uid
,
$title
,
$content
,
$type
,
$verify_key
,
$send_uid
,
$call_back
));
}
}
...
...
Please
register
or
login
to post a comment