简要描述:
- 门店消费卡列表,会员持有消费卡数据接口,返回列表数据
请求域名:
- http://xx.com
请求URL:
POST/route=plugin.store-card.Frontend.Modules.Card.Controllers.records.index
参数:
参数名 | 是否必须 | 类型 | 说明 |
---|---|---|---|
state | 否 | int | 消费卡状态:1未使用,2已使用 |
page | 否 | int | 分页页面值,默认1 |
返回示例:
正确时返回:
{
result: 1,
msg: "ok",
data:{
total: 5,
per_page: 15,
current_page: 1,
last_page: 1,
next_page_url: null,
prev_page_url: null,
from: 1,
to: 5,
data:[{
id: 1,
state: 0,
amount: "100.00",
created_at: "2021-02-19 14:13:47",
card_use: {
created_at: "2021-02-19 14:13:47",
store_name:“门店名称”
},
name: "门店消费卡"
}]
}
}
错误时返回:
{
result: 0,
msg: "错误消息",
data:[]
}
返回参数data.data说明:
参数名 | 类型 | 说明 |
---|---|---|
id | int | 消费卡主键ID |
name | string | 消费卡名称 |
state | tinyint | 消费卡状态:0未使用,1已使用 |
amount | float | 消费卡额度 |
created_at | string | 创建时间 |
card_use | array | 消费卡使用信息集合,state等于1时使用 |
返回参数data.data.card_use说明:
参数名 | 类型 | 说明 |
---|---|---|
created_at | string | 使用时间 |
store_name | string | 门店名称 |
备注:
- 更多返回错误代码请看首页的错误代码描述