接口:创建/编辑(礼物/打赏)
- 创建/编辑(礼物/打赏)
请求URL:
POST/v2/reward/create-or-edit
参数:
参数名 | 是否必须 | 说明 |
---|---|---|
id | 是 | 编辑的时候传礼物/打赏ID |
activity_id | 是 | 用户维度下传0.活动维度下传活动ID |
price | 是 | 金额 |
online_status | 是 | 上下架状态(0:下架,1:上架) |
full_screen_status | 是 | 全屏特效开关(0:关闭 1:开启) |
image_url | 是 | 礼物图片 type=gift时必传 |
full_screen_image_url | 是 | 礼物全屏特效地址 |
type | 是 | 传reward:打赏,传gift:礼物 |
name | 是 | 礼物名称 type=gift时必传 |
返回参数说明:
公共相应参数,详细内容请参考[返回结果]
返回数据如下:
参数名 | 类型 | 说明 |
---|---|---|
code | string | 状态码 |
msg | string | 状态信息 |
data | object | 数据 |
data[id] | string | 礼物/打赏ID |
data[name] | string | 礼物名称 |
data[online_status] | string | 上下架状态(0:下架,1:上架) |
data[price] | string | 金额 |
data[status] | string | 0:系统默认打赏 1:普通打赏 |
data[activity_id] | string | 活动ID(通用打赏返回0) |
data[full_screen_status] | string | 全屏特效开关(0:关闭 1:开启) |
data[image_url] | string | 礼物图片 |
data[full_screen_image_url] | string | 礼物全屏特效地址 |
data[created_at] | string | 创建时间 |
data[updated_at] | string | 最后更新时间 |
请求结果示例:
正确时返回:
{
"code":200,
"msg":null,
"data":{
"id":134265,
"name":"test",
"price":"1314.00",
"status":"1",
"activity_id":"0",
"online_status":1,
"full_screen_status":0,
"image_url":"mp-test\/62\/4b\/624bb0783449ef9a6a1dfed406109208.jpg",
"full_screen_image_url":"",
"created_at":"2021-05-27 11:17:53",
"updated_at":""
}
}
失败时返回:
{
"code": 500,
"msg": "最多设置20个,超过数量限制",
"data": null
}
备注:
- 更多返回错误代码请看首页的错误代码描述