diff --git a/doc/api.md b/doc/api.md index 7c1a20e..813b795 100644 --- a/doc/api.md +++ b/doc/api.md @@ -589,10 +589,10 @@ }] ``` -### 16. 挑战详情 +### 16. 挑战奖励详情 1. Method: POST -2. URI: /api/:accountid/exam_info +2. URI: /api/:accountid/exam_rewards | 字段 | 说明 | | -------- | -------------------------------------- | @@ -609,24 +609,17 @@ 3. Response: JSON ```js -{ - "id": "609e13eeccc78154ac683583", //id - "name": "第一期测试", // 测验 - "desc": "简介", - "icon": "", // 相关icon - "banner": "", // 介绍大图 - "rewards": [ // 奖励列表 - { - coupon: '优惠券的id', - name: '优惠券名', - count: 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: 已获得 - } - ] -} +[ // 奖励列表 + { + coupon: '优惠券的id', + name: '优惠券名', + count: 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: 已获得 + } +] ``` \ No newline at end of file diff --git a/src/api/controllers/exam.controller.ts b/src/api/controllers/exam.controller.ts index 2d66c7f..7cb2c41 100644 --- a/src/api/controllers/exam.controller.ts +++ b/src/api/controllers/exam.controller.ts @@ -207,7 +207,7 @@ class ExamController extends BaseController { } @role('anon') - @router('post /api/:accountId/exam_info') + @router('post /api/:accountId/exam_rewards') async examInfo(req: any) { const { accountId, sid, eid } = req.params if (!sid || !eid) {