更新券列表的接口
This commit is contained in:
parent
3d277c5ae4
commit
2f6d511872
30
doc/api.md
30
doc/api.md
@ -423,4 +423,34 @@
|
|||||||
{
|
{
|
||||||
token: '1231231aasa'
|
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: 已过期
|
||||||
|
}
|
||||||
```
|
```
|
@ -48,8 +48,8 @@ class GameUserController extends BaseController {
|
|||||||
@role('anon')
|
@role('anon')
|
||||||
@router('post /api/:accountid/tickets')
|
@router('post /api/:accountid/tickets')
|
||||||
async userTickets(req: any) {
|
async userTickets(req: any) {
|
||||||
const { accountid } = req.params
|
const { accountid, sid } = req.params
|
||||||
return await UserReward.ticketList( accountid )
|
return await UserReward.ticketList( accountid, sid )
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user