简要描述:
- 问卷聚合页数据接口
请求域名:
- http://test.yunzshop.com
请求URL:
GET: plugin.questionnaire.api.index.indexInfo
###传输参数:
参数名 | 是否必须 | 类型 | 说明 |
---|---|---|---|
answer:answer | 是 | string | 默认接口标识 |
questionnaire_id | 是 | id | 问卷id |
###返回参数
参数名 | 是否必须 | 类型 | 说明 |
---|---|---|---|
id | 是 | int | 问题id |
questionnaire_id | 是 | int | 问卷id |
type | 是 | int | 选项,1单选,2多选 |
required | 是 | int | 是否必填 |
choice_title | 是 | int | 问题标题 |
###问题选项 answer 答案数组 fraction分数数组 问题答案跟分数下标是一致
参数名 | 是否必须 | 类型 | 说明 |
---|---|---|---|
answer | 是 | int | 问题答案 |
fraction | 是 | int | 分数 |
###视频商品访问问卷 传输参数:
参数名 | 是否必须 | 类型 | 说明 |
---|---|---|---|
goods_id | 是 | int | 商品id |
###视频商品错误返回
{
"result": 0,
"msg": "课程商品暂无匹配问卷调查",
"data": []
}
###成功返回数据
{
"result": 1,
"msg": "",
"data": {
"index": "",
"answer": {
"choice": {
"total": 3,
"per_page": 10,
"current_page": 1,
"last_page": 1,
"next_page_url": null,
"prev_page_url": null,
"from": 1,
"to": 3,
"data": [
{
"id": 12,
"questionnaire_id": 12,
"type": 1,
"sort": 2,
"required": 1,
"choice_title": "3",
"answer": {
"answer": {
"4": "3",
"5": "4",
"6": "5"
},
"fraction": {
"4": "3",
"5": "4",
"6": "5"
}
},
"created_at": "2020-08-05 14:00:30"
},
{
"id": 11,
"questionnaire_id": 12,
"type": 2,
"sort": 1,
"required": 1,
"choice_title": "2",
"answer": {
"answer": {
"2": "2",
"3": "3"
},
"fraction": {
"2": "2",
"3": "3"
}
},
"created_at": "2020-08-05 14:00:30"
},
{
"id": 10,
"questionnaire_id": 12,
"type": 1,
"sort": 1,
"required": 1,
"choice_title": "1",
"answer": {
"answer": [
"1",
"2"
],
"fraction": [
"1",
"2"
]
},
"created_at": "2020-08-05 14:00:30"
}
]
}
},
"answerScore": ""
}
}