增加数据库

This commit is contained in:
2021-06-10 10:29:16 +08:00
parent 32f6391d1f
commit 23caf3a0c1
8 changed files with 231 additions and 34 deletions

View File

@@ -5,6 +5,26 @@ namespace XuanChen\WashCar\Action;
class CouponAction extends Init
{
/**
* Notes: 跳转到下单url
* @Author: 玄尘
* @Date : 2021/6/4 14:11
*/
public function getOrderUrl()
{
$url = $this->config['baseUri'] . '/v2/h5/redirect/autoLogin/returnUrl';
$this->params = array_merge($this->params, [
'urlKey' => $this->config['urlKey'],
]);
$params = $this->getParams();
$this->http($url, $params);
return $this->getResponse();
}
/**
* Notes: 发券
* @Author: 玄尘
@@ -14,12 +34,14 @@ class CouponAction extends Init
{
$url = $this->config['baseUri'] . '/v2/rights/coupon/getCoupon';
$res = $this->http($url, $this->params);
dd($res);
$params = $this->getParams();
$this->http($url, $params);
return $this->getResponse();
}
/**
* Notes: 查询
* Notes: 查询优惠券状态
* @Author: 玄尘
* @Date : 2021/6/4 14:28
*/
@@ -27,12 +49,31 @@ class CouponAction extends Init
{
$url = $this->config['baseUri'] . '/v2/rights/coupon/getCouponStatus';
$this->http($url, $this->params);
$params = $this->getParams();
$this->http($url, $params);
return $this->getResponse();
}
/**
* Notes: 查询优惠券信息
* @Author: 玄尘
* @Date : 2021/6/9 15:22
* @return array
*/
public function info()
{
$url = $this->config['baseUri'] . '/v2/rights/coupon/getCouponInfo';
$params = $this->getParams();
$this->http($url, $params);
return $this->getResponse();
}
/**
* Notes: 取消优惠券
* @Author: 玄尘
@@ -42,7 +83,9 @@ class CouponAction extends Init
{
$url = $this->config['baseUri'] . '/v2/rights/coupon/recedeCoupon';
$this->http($url, $this->params);
$params = $this->getParams();
$this->http($url, $params);
return $this->getResponse();