Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wxh_internal_api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
杨培培
wxh_internal_api
Commits
4739e110
Commit
4739e110
authored
Oct 25, 2019
by
wangjj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠券接口
parent
d4ab12ac
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
1 deletion
+46
-1
shop_coupon.php
example/shop_coupon.php
+22
-0
client_config_dev.php
src/client_config_dev.php
+1
-1
Coupon.php
src/shop/Coupon.php
+23
-0
No files found.
example/shop_coupon.php
0 → 100644
View file @
4739e110
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2019/5/27
* Time: 17:40
*/
use
internalApi\shop\Coupon
;
require
__DIR__
.
'/_init.php'
;
Coupon
::
setDebug
();
$arr
=
Coupon
::
getAllCoupon
();
//$arr = Shop::fetchList(null, 1, 50);
//Shop::saveShop([
// 'id' => 15,
// 'status' => 0
//]);
src/client_config_dev.php
View file @
4739e110
...
@@ -43,7 +43,7 @@ return [
...
@@ -43,7 +43,7 @@ return [
'clientSecret'
=>
'qlOCFMUfxWjOhK2bdL88e3w2DjdhUDIA'
'clientSecret'
=>
'qlOCFMUfxWjOhK2bdL88e3w2DjdhUDIA'
],
],
'_async_server'
=>
[
'_async_server'
=>
[
'host'
=>
'1
72.16.0
.181'
,
'host'
=>
'1
92.168.99
.181'
,
'port'
=>
11300
,
'port'
=>
11300
,
'tube'
=>
'internal-api'
'tube'
=>
'internal-api'
]
]
...
...
src/shop/Coupon.php
View file @
4739e110
...
@@ -25,4 +25,27 @@ class Coupon extends Client
...
@@ -25,4 +25,27 @@ class Coupon extends Client
{
{
return
self
::
call
(
'coupon.sendByBuyVip'
,
compact
(
'uid'
));
return
self
::
call
(
'coupon.sendByBuyVip'
,
compact
(
'uid'
));
}
}
/**
* 获取可用优惠券列表
* @return mixed
* @throws \internalApi\base\ApiException
* @throws \internalApi\base\ClientException
*/
public
static
function
getAllCoupon
()
{
return
self
::
call
(
'coupon.getAllCoupon'
);
}
/**
* 发送优惠券
* @return mixed
* @throws \internalApi\base\ApiException
* @throws \internalApi\base\ClientException
*/
public
static
function
addOneCouponByApi
(
$uid
)
{
return
self
::
call
(
'coupon.addOneCouponByApi'
,
compact
(
'uid'
));
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment