>登錄用戶領取優惠卷
~~~[api]
get:/index.php/coupon/Apicoupon/member_coupon_submit
*int:couponid=10#領取的優惠卷id
<<<
success
{
"err": 0,
"data": {
"id": 10,
"title": "優惠卷標題",
"starttime": 12345678910,
"endtime": 12345678910,
"type": 1,
"discount": 100,
}
}
<<<
error
{
"err": 1,
"code": 1000,
"content": "錯誤信息"
}
~~~
| 參數名稱 | 類型 |描述|值|
| --- | --- |---|---|
| id | int |用戶領取的優惠卷id|0|
| title | string |優惠卷的標題|滿30減5|
| starttime | int |優惠卷有效時間的開始時間戳|1564588800|
| endtime | int |優惠卷有效時間的開始結束戳1565059377|
| type | int |優惠卷類型|1:固定額度,2:百分比 3:隨機金額|
| discount | int |用戶領取優惠卷后,獲得優惠卷的金額| type為1,該數值為固定的金額,type為2,該數值為除以100后的值,如0.3,type為3,該數值在用戶領取后生成的一個隨機數值
>獲取優惠卷列表,主要用于顯示出的優惠卷可以被用戶領取
~~~[api]
get:/index.php/coupon/Apicoupon/member_getList
int:pagesize=10#每頁顯示優惠卷個數
int:page=1#顯示優惠卷頁碼數
string:between_price= #滿減區間 如100-200
int:use_type= #使用類型,1:全場通用,2:某個專欄或者某個課程使用
int:type= 1#優惠卷類型,1:固定金額,2:百分百金額,3:隨機的
string:sort= id #排序字段
string:sort_type= asc#排序類型
<<<
success
{
"err": 0,
"page": 1,
"pageTotal": 10,
"pageSize": 10,
"count": 1,
"data": [
{
"id": 10,
"title": "618狂歡",
"type": 1,
"discount": 7.2,
"full_reduction": 100,
"interval": 10,
"interval_type": "day",
"total": 100,
"user_grant": 1,
"use_scope": 1,
"starttime": 123456678910,
"endtime": 123456789,
"describe": "",
}
]
}
<<<
error
{
"err": 1,
"code": 1000,
"content": "錯誤信息"
}
~~~
>獲取當前登錄用戶領取的優惠卷列表,主要用戶在會員中心顯示用戶已經領取的優惠卷
~~~[api]
get:/index.php/coupon/Apicoupon/member_user_coupon_list
int:pagesize=10#每頁顯示優惠卷個數
int:page=1#顯示優惠卷頁碼數
int:status=1#領取優惠卷狀態碼,0:全部,1:可使用,2:過期,3:已使用
string:sort= id #排序字段
string:sort_type= asc#排序類型
<<<
success
{
"err": 0,
"page": 1,
"pageTotal": 10,
"pageSize": 10,
"count": 1,
"data": [
{
"id": 10,
"title": "618狂歡",
"type": 1,
"discount": 7.2,
"full_reduction": 100,
"interval": 10,
"interval_type": "day",
"total": 100,
"user_grant": 1,
"use_scope": 1,
"starttime": 123456678910,
"endtime": 123456789,
"status": 1,
"describe": "",
}
]
}
<<<
error
{
"err": 1,
"code": 1000,
"content": "錯誤信息"
}
~~~
>獲取當前登錄用戶可使用的優惠卷,主要在支付時顯示可以使用優惠卷列表供用戶選擇
~~~[api]
get:/index.php/coupon/Apicoupon/member_use_coupon_list
int:pagesize=10#每頁顯示優惠卷個數
int:page=1#顯示優惠卷頁碼數
int:use_conditions=curriculum|sign|id|price#顯示列表的條件 模塊名|標識|id|訂單價格
string:sort= id #排序字段
string:sort_type= asc#排序類型
int:price= 10#訂單價格
<<<
success
{
"err": 0,
"page": 1,
"pageTotal": 10,
"pageSize": 10,
"count": 1,
"data": [
{
"id": 10,
"title": "618狂歡",
"type": 1,
"discount": 7.2,
"full_reduction": 100
}
]
}
<<<
error
{
"err": 1,
"code": 1000,
"content": "錯誤信息"
}
~~~