修改挑战奖励接口的地址和文档
This commit is contained in:
parent
5a6bfcd68d
commit
9104a63cbf
37
doc/api.md
37
doc/api.md
@ -589,10 +589,10 @@
|
|||||||
}]
|
}]
|
||||||
```
|
```
|
||||||
|
|
||||||
### 16. 挑战详情
|
### 16. 挑战奖励详情
|
||||||
|
|
||||||
1. Method: POST
|
1. Method: POST
|
||||||
2. <span id="216">URI: /api/:accountid/exam_info</span>
|
2. <span id="216">URI: /api/:accountid/exam_rewards</span>
|
||||||
|
|
||||||
| 字段 | 说明 |
|
| 字段 | 说明 |
|
||||||
| -------- | -------------------------------------- |
|
| -------- | -------------------------------------- |
|
||||||
@ -609,24 +609,17 @@
|
|||||||
3. Response: JSON
|
3. Response: JSON
|
||||||
|
|
||||||
```js
|
```js
|
||||||
{
|
[ // 奖励列表
|
||||||
"id": "609e13eeccc78154ac683583", //id
|
{
|
||||||
"name": "第一期测试", // 测验
|
coupon: '优惠券的id',
|
||||||
"desc": "简介",
|
name: '优惠券名',
|
||||||
"icon": "", // 相关icon
|
count: 1, //数量
|
||||||
"banner": "", // 介绍大图
|
couponUrl: '优惠券详情图的url',
|
||||||
"rewards": [ // 奖励列表
|
type: 0, //类型 0: 单局能获得的奖励 1: 累计榜积分奖励, 2: 累计榜排名奖励
|
||||||
{
|
rewardType: 0, // 0: 优惠券, 1: 抽奖券
|
||||||
coupon: '优惠券的id',
|
score: 100, // 获得条件,type=2的类型, score是排名, 其他类型为积分
|
||||||
name: '优惠券名',
|
scoreEnd: 150, // 只有type=2的时候才需要考虑该值, 表示从第几名到第几名能获得奖励
|
||||||
count: 1, //数量
|
geted: 0, // 是否已获得, 0: 未获得, 1: 已获得
|
||||||
couponUrl: '优惠券详情图的url',
|
}
|
||||||
type: 0, //类型 0: 单局能获得的奖励 1: 累计榜积分奖励, 2: 累计榜排名奖励
|
]
|
||||||
rewardType: 0, // 0: 优惠券, 1: 抽奖券
|
|
||||||
score: 100, // 获得条件,type=2的类型, score是排名, 其他类型为积分
|
|
||||||
scoreEnd: 150, // 只有type=2的时候才需要考虑该值, 表示从第几名到第几名能获得奖励
|
|
||||||
geted: 0, // 是否已获得, 0: 未获得, 1: 已获得
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
```
|
@ -207,7 +207,7 @@ class ExamController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@role('anon')
|
@role('anon')
|
||||||
@router('post /api/:accountId/exam_info')
|
@router('post /api/:accountId/exam_rewards')
|
||||||
async examInfo(req: any) {
|
async examInfo(req: any) {
|
||||||
const { accountId, sid, eid } = req.params
|
const { accountId, sid, eid } = req.params
|
||||||
if (!sid || !eid) {
|
if (!sid || !eid) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user