更新券列表的接口

This commit is contained in:
zhl 2021-05-21 10:43:06 +08:00
parent 3d277c5ae4
commit 2f6d511872
2 changed files with 32 additions and 2 deletions

View File

@ -423,4 +423,34 @@
{
token: '1231231aasa'
}
```
### 11. 用户券列表
1. Method: POST
2. URI: /api/:accountid/tickets
| 字段 | 说明 |
| -------- | -------------------------------------- |
| accountid | 帐号id |
> POST参数
| 字段 | 说明 |
| -------- | -------------------------------------- |
| sid | 店铺id, 不传的话, 获取所有 |
3. Response: JSON
```js
{
id: '记录id',
shop: '店铺id',
shopName: '店铺名',
coupon: '券id',
couponName: '券名',
couponUrl: '券图片url',
status: '状态' //0: 未使用 , 1: 已使用 9: 已过期
}
```

View File

@ -48,8 +48,8 @@ class GameUserController extends BaseController {
@role('anon')
@router('post /api/:accountid/tickets')
async userTickets(req: any) {
const { accountid } = req.params
return await UserReward.ticketList( accountid )
const { accountid, sid } = req.params
return await UserReward.ticketList( accountid, sid )
}
}