跳到主要内容

服务端API

默认返回结构

名称含义类型
code成功:200、失败:500、未登录:403Number
data问卷列表数据Content
msg错误提示信息String

问卷管理端接口

创建问卷

用于创建问卷

POST /api/surveyManage/add

Request

名称含义类型是否必填默认值
questionType问卷类型StringY
title问卷标题StringY
remark问卷描述StringY

请求示例

{
"questionType": "normal",
"title": "问卷",
"remark": "",
"loginLimitType": "unlimited",
"loginType": ""
}

返回示例

{
"success": true,
"data": {
"id": "64c8bde289e41908d8898d13"
}
}

保存问卷

用于保存问卷

POST /api/surveyManage/saveConf

Request

名称含义类型是否必填默认值
surveyId问卷IDStringY
configData问卷数据ObjectY

请求示例

{
"surveyId":"64c8bde289e41908d8898d13",
"configData":{
"bannerConf": {
"titleConfig": {
"mainTitle": "<h3 style=\"text-align: center\">2欢迎填写问卷</h3><p>为了给您提供更好的服务,希望您能抽出几分钟时间,将您的感受和建议告诉我们,<span style=\"color: rgb(204, 0, 0)\">期待您的参与!</span></p>",
"applyTitle": "让我们开始吧",
"subTitle": ""
},
"bannerConfig": {
"bgImage": "",
"videoLink": "",
"postImg": ""
},
"ruleConfig": {
"isShow": "",
"title": "问卷规则 》",
"ruleBottom": "0.5",
"color": "666666",
"content": ""
}
},
"scoreConf": {
"off": "",
"scoreShow": "",
"totalShow": "",
"random": "",
"showResult": "",
"allRight": "",
"ranNumber": "",
"totalScore": 0,
"scoreRange": [{
"start": "",
"end": "",
"text": ""
}]
},
"submitConf": {
"submitTitle": "提交",
"confirmAgain": {
"is_again": true,
"again_text": "确认要提交吗?"
},
"msgContent": {
"msg_200": "提交成功",
"msg_9001": "您来晚了,感谢支持问卷~",
"msg_9002": "请勿多次提交!",
"msg_9003": "您来晚了,已经满额!",
"msg_9004": "提交失败!"
},
"buttonList": [{
"title": "",
"url": ""
}],
"link": ""
},
"bottomConf": {
"bannerImage": "",
"bannerImageWidth": "100%",
"logoChoose": "didi",
"logoImage": "",
"logoImageWidth": "33%"
},
"baseConf": {
"begTime": "2018-05-22 17:17:48",
"endTime": "2028-05-22 17:17:48",
"viewType": "block",
"tLimit": "0",
"qEquipLimit": "0",
"qIpLimit": "0",
"loginLimit": {
"type": "",
"limit": "0"
},
"language": "chinese",
"formdataBackfill": "notallow",
"previousSwitch": "notallow",
"showVoteProcess": "allow",
"publishDate": 1527647912221
},
"skinConf": {
"skinColor": "#4a4c5b",
"inputBgColor": "ffffff"
},
"shareConf": {
"shareConfig": {
"shareTitle": "",
"shareDesc": "",
"shareImg": "",
"shareLink": ""
}
},
"dataConf": {
"dataList": [{
"isRequired": true,
"showIndex": true,
"showType": true,
"showSpliter": true,
"type": "text",
"field": "data458",
"title": "标题1",
"titleRich": "标题1",
"placeholder": "",
"sLimit": 1,
"mobKey": "",
"randomSort": false,
"checked": false,
"exam": false,
"minNum": "",
"maxNum": "",
"options": [{
"text": "选项1",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
"placeholderDesc": "",
"score": 0
},
{
"text": "选项2",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
"placeholderDesc": "",
"score": 0
}
],
"cOption": "",
"cOptions": [],
"score": 0,
"maxPhotos": 5,
"star": 5,
"timeStep": {
"hour": 1,
"min": 10
},
"nps": {
"leftText": "极不满意",
"rightText": "极满意"
},
"exclude": false,
"relTypes": {
"textarea": "多行文本框",
"text": "单行输入框"
},
"placeholderDesc": "",
"carDataType": 1,
"mhLimit": 0,
"matrixRadioOpt": {
"titles": [{
"text": "标题1"
},
{
"text": "标题2"
}
]
},
"importKey": "single",
"importData": "",
"addressType": 3,
"isAuto": false,
"urlKey": "",
"cascadeData": [{
"id": 0,
"name": "级联选项内容配置",
"children": [{
"id": "cascade_0",
"name": "一级选项",
"children": [{
"id": "cascade_0_0",
"name": "二级选项",
"children": [{
"id": "cascade_0_0_0",
"name": "三级选项",
"children": []
}]
}]
}]
}],
"defaultProps": {
"children": "children",
"label": "name",
"id": "id"
},
"relyList": [{
"relyField": "",
"relyOption": [],
"relyType": "selected"
}],
"jumpTo": "",
"startDate": "",
"endDate": "",
"othersKeyMap": {}
},
{
"isRequired": true,
"showIndex": true,
"showType": true,
"showSpliter": true,
"type": "radio-v",
"relTypes": {
"radio-v": "竖向排列",
"radio-h": "横向排列"
},
"placeholderDesc": "",
"carDataType": 1,
"field": "data515",
"sLimit": 1,
"mhLimit": 0,
"mobKey": "",
"title": "标题2",
"titleRich": "标题2",
"placeholder": "",
"randomSort": false,
"checked": false,
"exam": false,
"minNum": "",
"maxNum": "",
"options": [{
"text": "选项1",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
"placeholderDesc": "",
"score": 0
},
{
"text": "选项2",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
"placeholderDesc": "",
"score": 0
}
],
"matrixRadioOpt": {
"titles": [{
"text": "标题1"
},
{
"text": "标题2"
}
]
},
"importKey": "single",
"importData": "",
"cOption": "",
"cOptions": [],
"score": 0,
"timeStep": {
"hour": 1,
"min": 10
},
"maxPhotos": 5,
"nps": {
"leftText": "极不满意",
"rightText": "极满意"
},
"star": 5,
"exclude": false,
"addressType": 3,
"isAuto": false,
"urlKey": "",
"cascadeData": [{
"id": 0,
"name": "级联选项内容配置",
"children": [{
"id": "cascade_0",
"name": "一级选项",
"children": [{
"id": "cascade_0_0",
"name": "二级选项",
"children": [{
"id": "cascade_0_0_0",
"name": "三级选项",
"children": []
}]
}]
}]
}],
"defaultProps": {
"children": "children",
"label": "name",
"id": "id"
},
"relyList": [{
"relyField": "",
"relyOption": [],
"relyType": "selected"
}],
"jumpTo": "",
"startDate": "",
"endDate": "",
"othersKeyMap": {}
}
],
"total": 0,
"activeIndex": 1,
"limitMap": {}
}
}
}

返回示例

{
"success": true,
"msg": ""
}

获取问卷

用于获取问卷配置

GET /api/surveyManage/get

Request

名称含义类型是否必填默认值
surveyId问卷IDstringY

请求示例

/api/surveyManage/get?surveyId=64c8bde289e41908d8898d13

返回示例

{
"success": true,
"data": {
"surveyMetaRes": {
"_id": "64c8bde289e41908d8898d13",
"name": "测试名字",
"questionType": "normal",
"title": "问卷",
"curStatus": {
"status": "new",
"id": "new",
"date": 1690877410380
},
"createDate": 1690877410380
},
"surveyConfRes": {
"_id": "64c8bde289e41908d8898d14",
"pageId": "64c8bde289e41908d8898d13",
"pageType": "normal",
"curStatus": {
"status": "new",
"id": "new",
"date": 1690877410471
},
"code": {
"bannerConf": {
"titleConfig": {
"mainTitle": "<h3 style=\"text-align: center\">欢迎填写问卷</h3><p>为了给您提供更好的服务,希望您能抽出几分钟时间,将您的感受和建议告诉我们,<span style=\"color: rgb(204, 0, 0)\">期待您的参与!</span></p>",
"applyTitle": "让我们开始吧",
"subTitle": ""
},
"bannerConfig": {
"bgImage": "",
"videoLink": "",
"postImg": ""
},
"ruleConfig": {
"isShow": "",
"title": "问卷规则 》",
"ruleBottom": "0.5",
"color": "666666",
"content": ""
}
},
"scoreConf": {
"off": "",
"scoreShow": "",
"totalShow": "",
"random": "",
"showResult": "",
"allRight": "",
"ranNumber": "",
"totalScore": 0,
"scoreRange": [
{
"start": "",
"end": "",
"text": ""
}
]
},
"submitConf": {
"submitTitle": "提交",
"confirmAgain": {
"is_again": true,
"again_text": "确认要提交吗?"
},
"msgContent": {
"msg_200": "提交成功",
"msg_9001": "您来晚了,感谢支持问卷~",
"msg_9002": "请勿多次提交!",
"msg_9003": "您来晚了,已经满额!",
"msg_9004": "提交失败!"
},
"buttonList": [
{
"title": "",
"url": ""
}
],
"link": ""
},
"bottomConf": {
"bannerImage": "",
"bannerImageWidth": "100%",
"logoChoose": "didi",
"logoImage": "",
"logoImageWidth": "33%"
},
"baseConf": {
"begTime": "2018-05-22 17:17:48",
"endTime": "2028-05-22 17:17:48",
"viewType": "block",
"tLimit": "0",
"qEquipLimit": "0",
"qIpLimit": "0",
"loginLimit": {
"type": "",
"limit": "0"
},
"language": "chinese",
"formdataBackfill": "notallow",
"previousSwitch": "notallow",
"showVoteProcess": "allow",
"publishDate": 1527647912221
},
"skinConf": {
"skinColor": "#4a4c5b",
"inputBgColor": "ffffff"
},
"shareConf": {
"shareConfig": {
"shareTitle": "",
"shareDesc": "",
"shareImg": "",
"shareLink": ""
}
},
"dataConf": {
"dataList": [
{
"isRequired": true,
"showIndex": true,
"showType": true,
"showSpliter": true,
"type": "text",
"field": "data458",
"title": "标题1",
"titleRich": "标题1",
"placeholder": "",
"sLimit": 1,
"mobKey": "",
"randomSort": false,
"checked": false,
"exam": false,
"minNum": "",
"maxNum": "",
"options": [
{
"text": "选项1",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
"placeholderDesc": "",
"score": 0
},
{
"text": "选项2",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
"placeholderDesc": "",
"score": 0
}
],
"cOption": "",
"cOptions": [],
"score": 0,
"maxPhotos": 5,
"star": 5,
"timeStep": {
"hour": 1,
"min": 10
},
"nps": {
"leftText": "极不满意",
"rightText": "极满意"
},
"exclude": false,
"relTypes": {
"textarea": "多行文本框",
"text": "单行输入框"
},
"placeholderDesc": "",
"carDataType": 1,
"mhLimit": 0,
"matrixRadioOpt": {
"titles": [
{
"text": "标题1"
},
{
"text": "标题2"
}
]
},
"importKey": "single",
"importData": "",
"addressType": 3,
"isAuto": false,
"urlKey": "",
"cascadeData": [
{
"id": 0,
"name": "级联选项内容配置",
"children": [
{
"id": "cascade_0",
"name": "一级选项",
"children": [
{
"id": "cascade_0_0",
"name": "二级选项",
"children": [
{
"id": "cascade_0_0_0",
"name": "三级选项",
"children": []
}
]
}
]
}
]
}
],
"defaultProps": {
"children": "children",
"label": "name",
"id": "id"
},
"relyList": [
{
"relyField": "",
"relyOption": [],
"relyType": "selected"
}
],
"jumpTo": "",
"startDate": "",
"endDate": "",
"othersKeyMap": {}
},
{
"isRequired": true,
"showIndex": true,
"showType": true,
"showSpliter": true,
"type": "radio-v",
"relTypes": {
"radio-v": "竖向排列",
"radio-h": "横向排列"
},
"placeholderDesc": "",
"carDataType": 1,
"field": "data515",
"sLimit": 1,
"mhLimit": 0,
"mobKey": "",
"title": "标题2",
"titleRich": "标题2",
"placeholder": "",
"randomSort": false,
"checked": false,
"exam": false,
"minNum": "",
"maxNum": "",
"options": [
{
"text": "选项1",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
"placeholderDesc": "",
"score": 0
},
{
"text": "选项2",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
"placeholderDesc": "",
"score": 0
}
],
"matrixRadioOpt": {
"titles": [
{
"text": "标题1"
},
{
"text": "标题2"
}
]
},
"importKey": "single",
"importData": "",
"cOption": "",
"cOptions": [],
"score": 0,
"timeStep": {
"hour": 1,
"min": 10
},
"maxPhotos": 5,
"nps": {
"leftText": "极不满意",
"rightText": "极满意"
},
"star": 5,
"exclude": false,
"addressType": 3,
"isAuto": false,
"urlKey": "",
"cascadeData": [
{
"id": 0,
"name": "级联选项内容配置",
"children": [
{
"id": "cascade_0",
"name": "一级选项",
"children": [
{
"id": "cascade_0_0",
"name": "二级选项",
"children": [
{
"id": "cascade_0_0_0",
"name": "三级选项",
"children": []
}
]
}
]
}
]
}
],
"defaultProps": {
"children": "children",
"label": "name",
"id": "id"
},
"relyList": [
{
"relyField": "",
"relyOption": [],
"relyType": "selected"
}
],
"jumpTo": "",
"startDate": "",
"endDate": "",
"othersKeyMap": {}
}
],
"total": 0,
"activeIndex": 1,
"limitMap": {}
}
}
}
}
}

获取Banner配置

用于获取问卷配置

GET /api/surveyManage/getBannerData

Request

名称含义类型是否必填默认值

请求示例

/api/surveyManage/getBannerData

返回示例

{
"code": 200,
"data": {
"temp": {
"key": "default",
"name": "默认分类",
"list": [
{
"src": "/imgs/skin/nUc1h8MM0y1582635399432.png",
"title": "1"
},
{
"src": "/imgs/skin/EqcneDJ8xI1582635403367.png",
"title": "2"
}
]
},
"activity": {
"key": "activity",
"name": "节日",
"list": [
{
"src": "/imgs/skin/Ixx8hqiwwk1660979120801.jpg",
"title": "1"
},
{
"src": "/imgs/skin/q2eDZjSLnB1660978085149.jpg",
"title": "2"
},
{
"src": "/imgs/skin/bTemK3oa0z1660978085209.jpg",
"title": "3"
},
{
"src": "/imgs/skin/ObQBPJqViY1660978085693.jpg",
"title": "4"
}
]
},
"creative": {
"key": "creative",
"name": "创意",
"list": [
{
"src": "/imgs/skin/PLwNH1rAie1558430219772.jpg",
"title": "1"
},
{
"src": "/imgs/skin/NnXsAOhBNm1558430219312.jpg",
"title": "2"
},
{
"src": "/imgs/skin/ujpUoWqhw31558430220124.jpg",
"title": "3"
},
{
"src": "/imgs/skin/5OCvbjqJQm1558430220362.jpg",
"title": "4"
},
{
"src": "/imgs/skin/0k7Jg7In8I1558430221154.jpg",
"title": "5"
},
{
"src": "/imgs/skin/UH0A8DbTai1558430221033.jpg",
"title": "6"
},
{
"src": "/imgs/skin/FRIzPC6ZtN1558430221344.jpg",
"title": "7"
}
]
},
"scenery": {
"key": "scenery",
"name": "风景",
"list": [
{
"src": "/imgs/skin/SyiLRcukyE1558430525760.jpg",
"title": "1"
},
{
"src": "/imgs/skin/sqYig4AcWr1558430525663.jpg",
"title": "2"
},
{
"src": "/imgs/skin/ElNeqJT2I21558430526165.jpg",
"title": "3"
},
{
"src": "/imgs/skin/CxQkSU6AY21558430526163.jpg",
"title": "4"
},
{
"src": "/imgs/skin/VTUwbp6vY61558430527320.jpg",
"title": "5"
},
{
"src": "/imgs/skin/SHs0K703Yn1558430527218.jpg",
"title": "6"
},
{
"src": "/imgs/skin/oVTedX9V4s1558430527671.jpg",
"title": "7"
}
]
},
"transportation": {
"key": "transportation",
"name": "交通",
"list": [
{
"src": "/imgs/skin/XYKqJZuMig1558430904735.jpg",
"title": "1"
},
{
"src": "/imgs/skin/GnPatsr48Z1558430904680.jpg",
"title": "2"
},
{
"src": "/imgs/skin/UqIvVvEXAK1558430905204.jpg",
"title": "3"
},
{
"src": "/imgs/skin/PUssufh5uI1558430905104.jpg",
"title": "4"
},
{
"src": "/imgs/skin/O409pRTDlW1558430905738.jpg",
"title": "5"
},
{
"src": "/imgs/skin/A9FzlbYXqI1558430905739.jpg",
"title": "6"
},
{
"src": "/imgs/skin/HN9YGctDeF1558430906686.jpg",
"title": "7"
}
]
},
"delicacy": {
"key": "delicacy",
"name": "美食",
"list": [
{
"src": "/imgs/skin/lE6PSclCcU1558434536703.jpg",
"title": "1"
},
{
"src": "/imgs/skin/OnSdbm7u6n1558434536641.jpg",
"title": "2"
},
{
"src": "/imgs/skin/N9Z2ZuyO731558434537314.jpg",
"title": "3"
},
{
"src": "/imgs/skin/YP9PoW8pX51558434537301.jpg",
"title": "4"
},
{
"src": "/imgs/skin/zUtDv378bg1558434538351.jpg",
"title": "5"
},
{
"src": "/imgs/skin/gY1JljCow21558434538303.jpg",
"title": "6"
},
{
"src": "/imgs/skin/oOjHPbABdd1558434538864.jpg",
"title": "7"
}
]
},
"business": {
"key": "business",
"name": "商务",
"list": [
{
"src": "/imgs/skin/3ABKqvDaVn1558514860472.jpg",
"title": "1"
},
{
"src": "/imgs/skin/OewuaQmWoq1558514860285.jpg",
"title": "2"
},
{
"src": "/imgs/skin/HuVqqtbFjs1558514860570.jpg",
"title": "3"
},
{
"src": "/imgs/skin/icSlqsr0uZ1558514860875.jpg",
"title": "4"
},
{
"src": "/imgs/skin/Qu9rg33wmq1558514861015.jpg",
"title": "5"
},
{
"src": "/imgs/skin/145gBCRtNP1558514861211.jpg",
"title": "6"
},
{
"src": "/imgs/skin/ykWLFV0QWj1558514861444.jpg",
"title": "7"
}
]
},
"campus": {
"key": "campus",
"name": "校园",
"list": [
{
"src": "/imgs/skin/4aWi5JxG471558514268698.jpg",
"title": "1"
},
{
"src": "/imgs/skin/j8C2OBP7WK1558514268563.jpg",
"title": "2"
},
{
"src": "/imgs/skin/q3uJoQhYsR1558514268877.jpg",
"title": "3"
},
{
"src": "/imgs/skin/W5PPlNsmsr1558514269088.jpg",
"title": "4"
},
{
"src": "/imgs/skin/6xQk1IAmKt1558514269874.jpg",
"title": "5"
},
{
"src": "/imgs/skin/XQE2iyF0rj1558514269935.jpg",
"title": "6"
},
{
"src": "/imgs/skin/POHlQiSwPR1558514270379.jpg",
"title": "7"
}
]
}
}
}

获取历史数据

用于获取问卷配置

GET /api/surveyManage/getHistoryList

Request

名称含义类型是否必填默认值
surveyId问卷IDstringY
historyType历史数据类别stringYdailyHis日常保存历史; publishHis发布历史

请求示例

/api/surveyManage/getHistoryList?surveyId=64c8bde289e41908d8898d13&historyType=dailyHis

返回示例

{
"success": true,
"data": [
{
"_id": "64c8c001e593703b0f458074",
"curStatus": {
"status": "new",
"id": "new",
"date": 1690877953435
},
"pageId": "64c8bde289e41908d8898d13",
"type": "dailyHis",
"code": {
"data": {
"bannerConf": {
"titleConfig": {
"mainTitle": "<h3 style=\"text-align: center\">2欢迎填写问卷</h3><p>为了给您提供更好的服务,希望您能抽出几分钟时间,将您的感受和建议告诉我们,<span style=\"color: rgb(204, 0, 0)\">期待您的参与!</span></p>",
"applyTitle": "让我们开始吧",
"subTitle": ""
},
"bannerConfig": {
"bgImage": "",
"videoLink": "",
"postImg": ""
},
"ruleConfig": {
"isShow": "",
"title": "问卷规则 》",
"ruleBottom": "0.5",
"color": "666666",
"content": ""
}
},
"scoreConf": {
"off": "",
"scoreShow": "",
"totalShow": "",
"random": "",
"showResult": "",
"allRight": "",
"ranNumber": "",
"totalScore": 0,
"scoreRange": [
{
"start": "",
"end": "",
"text": ""
}
]
},
"submitConf": {
"submitTitle": "提交",
"confirmAgain": {
"is_again": true,
"again_text": "确认要提交吗?"
},
"msgContent": {
"msg_200": "提交成功",
"msg_9001": "您来晚了,感谢支持问卷~",
"msg_9002": "请勿多次提交!",
"msg_9003": "您来晚了,已经满额!",
"msg_9004": "提交失败!"
},
"buttonList": [
{
"title": "",
"url": ""
}
],
"link": ""
},
"bottomConf": {
"bannerImage": "",
"bannerImageWidth": "100%",
"logoChoose": "didi",
"logoImage": "",
"logoImageWidth": "33%"
},
"baseConf": {
"begTime": "2018-05-22 17:17:48",
"endTime": "2028-05-22 17:17:48",
"viewType": "block",
"tLimit": "0",
"qEquipLimit": "0",
"qIpLimit": "0",
"loginLimit": {
"type": "",
"limit": "0"
},
"language": "chinese",
"formdataBackfill": "notallow",
"previousSwitch": "notallow",
"showVoteProcess": "allow",
"publishDate": 1527647912221
},
"skinConf": {
"skinColor": "#4a4c5b",
"inputBgColor": "ffffff"
},
"shareConf": {
"shareConfig": {
"shareTitle": "",
"shareDesc": "",
"shareImg": "",
"shareLink": ""
}
},
"dataConf": {
"dataList": [
{
"isRequired": true,
"showIndex": true,
"showType": true,
"showSpliter": true,
"type": "text",
"field": "data458",
"title": "标题1",
"titleRich": "标题1",
"placeholder": "",
"sLimit": 1,
"mobKey": "",
"randomSort": false,
"checked": false,
"exam": false,
"minNum": "",
"maxNum": "",
"options": [
{
"text": "选项1",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
"placeholderDesc": "",
"score": 0
},
{
"text": "选项2",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
"placeholderDesc": "",
"score": 0
}
],
"cOption": "",
"cOptions": [],
"score": 0,
"maxPhotos": 5,
"star": 5,
"timeStep": {
"hour": 1,
"min": 10
},
"nps": {
"leftText": "极不满意",
"rightText": "极满意"
},
"exclude": false,
"relTypes": {
"textarea": "多行文本框",
"text": "单行输入框"
},
"placeholderDesc": "",
"carDataType": 1,
"mhLimit": 0,
"matrixRadioOpt": {
"titles": [
{
"text": "标题1"
},
{
"text": "标题2"
}
]
},
"importKey": "single",
"importData": "",
"addressType": 3,
"isAuto": false,
"urlKey": "",
"cascadeData": [
{
"id": 0,
"name": "级联选项内容配置",
"children": [
{
"id": "cascade_0",
"name": "一级选项",
"children": [
{
"id": "cascade_0_0",
"name": "二级选项",
"children": [
{
"id": "cascade_0_0_0",
"name": "三级选项",
"children": []
}
]
}
]
}
]
}
],
"defaultProps": {
"children": "children",
"label": "name",
"id": "id"
},
"relyList": [
{
"relyField": "",
"relyOption": [],
"relyType": "selected"
}
],
"jumpTo": "",
"startDate": "",
"endDate": "",
"othersKeyMap": {}
},
{
"isRequired": true,
"showIndex": true,
"showType": true,
"showSpliter": true,
"type": "radio-v",
"relTypes": {
"radio-v": "竖向排列",
"radio-h": "横向排列"
},
"placeholderDesc": "",
"carDataType": 1,
"field": "data515",
"sLimit": 1,
"mhLimit": 0,
"mobKey": "",
"title": "标题2",
"titleRich": "标题2",
"placeholder": "",
"randomSort": false,
"checked": false,
"exam": false,
"minNum": "",
"maxNum": "",
"options": [
{
"text": "选项1",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
"placeholderDesc": "",
"score": 0
},
{
"text": "选项2",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
"placeholderDesc": "",
"score": 0
}
],
"matrixRadioOpt": {
"titles": [
{
"text": "标题1"
},
{
"text": "标题2"
}
]
},
"importKey": "single",
"importData": "",
"cOption": "",
"cOptions": [],
"score": 0,
"timeStep": {
"hour": 1,
"min": 10
},
"maxPhotos": 5,
"nps": {
"leftText": "极不满意",
"rightText": "极满意"
},
"star": 5,
"exclude": false,
"addressType": 3,
"isAuto": false,
"urlKey": "",
"cascadeData": [
{
"id": 0,
"name": "级联选项内容配置",
"children": [
{
"id": "cascade_0",
"name": "一级选项",
"children": [
{
"id": "cascade_0_0",
"name": "二级选项",
"children": [
{
"id": "cascade_0_0_0",
"name": "三级选项",
"children": []
}
]
}
]
}
]
}
],
"defaultProps": {
"children": "children",
"label": "name",
"id": "id"
},
"relyList": [
{
"relyField": "",
"relyOption": [],
"relyType": "selected"
}
],
"jumpTo": "",
"startDate": "",
"endDate": "",
"othersKeyMap": {}
}
],
"total": 0,
"activeIndex": 1,
"limitMap": {}
}
}
},
"createDate": 1690877953435
},
{
"_id": "64c8bfeee593703b0f458073",
"curStatus": {
"status": "new",
"id": "new",
"date": 1690877934313
},
"pageId": "64c8bde289e41908d8898d13",
"type": "dailyHis",
"code": {
"data": {
"bannerConf": {
"titleConfig": {
"mainTitle": "<h3 style=\"text-align: center\">欢迎填写问卷</h3><p>为了给您提供更好的服务,希望您能抽出几分钟时间,将您的感受和建议告诉我们,<span style=\"color: rgb(204, 0, 0)\">期待您的参与!</span></p>",
"applyTitle": "让我们开始吧",
"subTitle": ""
},
"bannerConfig": {
"bgImage": "",
"videoLink": "",
"postImg": ""
},
"ruleConfig": {
"isShow": "",
"title": "问卷规则 》",
"ruleBottom": "0.5",
"color": "666666",
"content": ""
}
},
"scoreConf": {
"off": "",
"scoreShow": "",
"totalShow": "",
"random": "",
"showResult": "",
"allRight": "",
"ranNumber": "",
"totalScore": 0,
"scoreRange": [
{
"start": "",
"end": "",
"text": ""
}
]
},
"submitConf": {
"submitTitle": "提交",
"confirmAgain": {
"is_again": true,
"again_text": "确认要提交吗?"
},
"msgContent": {
"msg_200": "提交成功",
"msg_9001": "您来晚了,感谢支持问卷~",
"msg_9002": "请勿多次提交!",
"msg_9003": "您来晚了,已经满额!",
"msg_9004": "提交失败!"
},
"buttonList": [
{
"title": "",
"url": ""
}
],
"link": ""
},
"bottomConf": {
"bannerImage": "",
"bannerImageWidth": "100%",
"logoChoose": "didi",
"logoImage": "",
"logoImageWidth": "33%"
},
"baseConf": {
"begTime": "2018-05-22 17:17:48",
"endTime": "2028-05-22 17:17:48",
"viewType": "block",
"tLimit": "0",
"qEquipLimit": "0",
"qIpLimit": "0",
"loginLimit": {
"type": "",
"limit": "0"
},
"language": "chinese",
"formdataBackfill": "notallow",
"previousSwitch": "notallow",
"showVoteProcess": "allow",
"publishDate": 1527647912221
},
"skinConf": {
"skinColor": "#4a4c5b",
"inputBgColor": "ffffff"
},
"shareConf": {
"shareConfig": {
"shareTitle": "",
"shareDesc": "",
"shareImg": "",
"shareLink": ""
}
},
"dataConf": {
"dataList": [
{
"isRequired": true,
"showIndex": true,
"showType": true,
"showSpliter": true,
"type": "text",
"field": "data458",
"title": "标题1",
"titleRich": "标题1",
"placeholder": "",
"sLimit": 1,
"mobKey": "",
"randomSort": false,
"checked": false,
"exam": false,
"minNum": "",
"maxNum": "",
"options": [
{
"text": "选项1",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
"placeholderDesc": "",
"score": 0
},
{
"text": "选项2",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
"placeholderDesc": "",
"score": 0
}
],
"cOption": "",
"cOptions": [],
"score": 0,
"maxPhotos": 5,
"star": 5,
"timeStep": {
"hour": 1,
"min": 10
},
"nps": {
"leftText": "极不满意",
"rightText": "极满意"
},
"exclude": false,
"relTypes": {
"textarea": "多行文本框",
"text": "单行输入框"
},
"placeholderDesc": "",
"carDataType": 1,
"mhLimit": 0,
"matrixRadioOpt": {
"titles": [
{
"text": "标题1"
},
{
"text": "标题2"
}
]
},
"importKey": "single",
"importData": "",
"addressType": 3,
"isAuto": false,
"urlKey": "",
"cascadeData": [
{
"id": 0,
"name": "级联选项内容配置",
"children": [
{
"id": "cascade_0",
"name": "一级选项",
"children": [
{
"id": "cascade_0_0",
"name": "二级选项",
"children": [
{
"id": "cascade_0_0_0",
"name": "三级选项",
"children": []
}
]
}
]
}
]
}
],
"defaultProps": {
"children": "children",
"label": "name",
"id": "id"
},
"relyList": [
{
"relyField": "",
"relyOption": [],
"relyType": "selected"
}
],
"jumpTo": "",
"startDate": "",
"endDate": "",
"othersKeyMap": {}
},
{
"isRequired": true,
"showIndex": true,
"showType": true,
"showSpliter": true,
"type": "radio-v",
"relTypes": {
"radio-v": "竖向排列",
"radio-h": "横向排列"
},
"placeholderDesc": "",
"carDataType": 1,
"field": "data515",
"sLimit": 1,
"mhLimit": 0,
"mobKey": "",
"title": "标题2",
"titleRich": "标题2",
"placeholder": "",
"randomSort": false,
"checked": false,
"exam": false,
"minNum": "",
"maxNum": "",
"options": [
{
"text": "选项1",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
"placeholderDesc": "",
"score": 0
},
{
"text": "选项2",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
"placeholderDesc": "",
"score": 0
}
],
"matrixRadioOpt": {
"titles": [
{
"text": "标题1"
},
{
"text": "标题2"
}
]
},
"importKey": "single",
"importData": "",
"cOption": "",
"cOptions": [],
"score": 0,
"timeStep": {
"hour": 1,
"min": 10
},
"maxPhotos": 5,
"nps": {
"leftText": "极不满意",
"rightText": "极满意"
},
"star": 5,
"exclude": false,
"addressType": 3,
"isAuto": false,
"urlKey": "",
"cascadeData": [
{
"id": 0,
"name": "级联选项内容配置",
"children": [
{
"id": "cascade_0",
"name": "一级选项",
"children": [
{
"id": "cascade_0_0",
"name": "二级选项",
"children": [
{
"id": "cascade_0_0_0",
"name": "三级选项",
"children": []
}
]
}
]
}
]
}
],
"defaultProps": {
"children": "children",
"label": "name",
"id": "id"
},
"relyList": [
{
"relyField": "",
"relyOption": [],
"relyType": "selected"
}
],
"jumpTo": "",
"startDate": "",
"endDate": "",
"othersKeyMap": {}
}
],
"total": 0,
"activeIndex": 1,
"limitMap": {}
}
}
},
"createDate": 1690877934313,
"operator": {
"_id": "64c8ccd1eb145f835dce08fa",
"username": "test"
}
}
]
}

发布问卷

用于发布问卷

POST /api/surveyManage/publish

Request

名称含义类型是否必填默认值
surveyId问卷IDstringY

请求示例

{
"surveyId":"64c8bde289e41908d8898d13"
}

返回示例

{
"success": true,
"data": {
"updateMetaRes": {
"acknowledged": true,
"modifiedCount": 1,
"upsertedId": null,
"upsertedCount": 0,
"matchedCount": 1
},
"insertPublishRes": {
"acknowledged": true,
"insertedId": {}
},
"historyRes": {
"acknowledged": true,
"insertedId": {}
}
}
}

获取回收数据

获取回收数据

GET /api/surveyManage/data?page=1&pageSize=10

Request

名称含义类型是否必填默认值
surveyId问卷IDstringY
page页码numberN1
isShowSecret[是否展示脱敏的数据]{.mark}booleanNfalse
pageSize页面尺寸numberN10

请求示例

/api/data/recycle?page=1&pageSize=10

返回示例

{
"success": true,
"data": {
"total": 1,
"listHead": [
{
"field": "data458",
"title": "标题1",
"type": "text"
},
{
"field": "data515",
"title": "标题2",
"type": "radio-v"
}
],
"listBody": [
{
"_id": "64ca0a8ee71efa1ace9eb574",
"surveyId": "64c8bde289e41908d8898d13",
"data": {
"data458": "11111",
"data515": "E0GZGNDY",
"scores": {},
"optionsWithId": {
"data515": [
{
"id": "E0GZGNDY",
"value": "选项1"
}
]
},
"channel": "",
"p": "",
"difTime": 14.138,
"secret": ""
},
"sign": "",
"backParams": {},
"cityId": "",
"cityName": "",
"omgh5fp": "a4edc724-b201-4e53-877b-d9b4f134909f",
"isForceSubmit": false,
"memberKey": "",
"businessParams": {},
"clientTime": 1690183745048,
"userInfo": {},
"appName": "Others",
"pageId": "64c8bde289e41908d8898d13",
"curStatus": {
"status": "new",
"id": "new",
"date": 1690962574622
},
"createDate": 1690962574622
}
]
}
}

获取问卷列表

用于发布问卷

GET /api/surveyManage/list

Request

名称含义类型是否必填默认值
pageSize10numberY
curPage1numberY

请求示例

/api/list/search?pageSize=10&curPage=1

返回示例

{
"success": true,
"data": {
"data": [
{
"_id": "64c8bde289e41908d8898d13",
"name": "测试名字",
"questionType": "normal",
"title": "问卷",
"curStatus": {
"status": "new",
"id": "new",
"date": 1690878454080
},
"createDate": 1690877410380,
"creator": "test",
"owner": "test"
},
{
"_id": "64c21f84c553d5f8ca9f364f",
"name": "",
"questionType": "normal",
"title": "问卷",
"curStatus": {
"status": "new",
"id": "new",
"date": 1690443652253
},
"createDate": 1690443652253,
"creator": "test",
"owner": "test"
}
],
"count": 2
}
}

修改问卷

用于修改问卷

POST /api/surveyManage/update

Request

名称含义类型是否必填默认值
surveyId问卷IDstringY
title问卷标题stringY
remark问卷描述stringY

请求示例

{
"surveyId":"64c8bde289e41908d8898d13",
"title":"问卷标题",
"remark":"问卷描述"
}

删除问卷

用于删除问卷

POST /api/surveyManage/delete

Request

名称含义类型是否必填默认值
surveyId问卷IDstringY

请求示例

{
"surveyId":"64c8bde289e41908d8898d13"
}

返回示例

{
"success": true,
"data": {
"surveyMetaDeleteRes": {
"acknowledged": true,
"deletedCount": 0
}
}
}

问卷投放端接口

获取发布问卷数据

用于获取发布问卷数据

GET /api/surveyPublish/getSurveyPublish

Request

名称含义类型是否必填默认值
surveyPath问卷短IDStringY

请求示例

/api/surveyPublish/getSurveyPublish?surveyPath=9VBpGNQi

返回示例

{
"success": true,
"data": {
"surveyMetaRes": {
"_id": "64c8bde289e41908d8898d13",
"name": "测试名字",
"questionType": "normal",
"title": "问卷",
"curStatus": {
"status": "new",
"id": "new",
"date": 1690878454080
},
"createDate": 1690877410380
},
"surveyPublishRes": {
"_id": "64c8bde289e41908d8898d14",
"pageId": "64c8bde289e41908d8898d13",
"pageType": "normal",
"curStatus": {
"status": "new",
"id": "new",
"date": 1690877410471
},
"code": {
"bannerConf": {
"titleConfig": {
"mainTitle": "<h3 style=\"text-align: center\">2欢迎填写问卷</h3><p>为了给您提供更好的服务,希望您能抽出几分钟时间,将您的感受和建议告诉我们,<span style=\"color: rgb(204, 0, 0)\">期待您的参与!</span></p>",
"applyTitle": "让我们开始吧",
"subTitle": ""
},
"bannerConfig": {
"bgImage": "",
"videoLink": "",
"postImg": ""
},
"ruleConfig": {
"isShow": "",
"title": "问卷规则 》",
"ruleBottom": "0.5",
"color": "666666",
"content": ""
}
},
"scoreConf": {
"off": "",
"scoreShow": "",
"totalShow": "",
"random": "",
"showResult": "",
"allRight": "",
"ranNumber": "",
"totalScore": 0,
"scoreRange": [
{
"start": "",
"end": "",
"text": ""
}
]
},
"submitConf": {
"submitTitle": "提交",
"confirmAgain": {
"is_again": true,
"again_text": "确认要提交吗?"
},
"msgContent": {
"msg_200": "提交成功",
"msg_9001": "您来晚了,感谢支持问卷~",
"msg_9002": "请勿多次提交!",
"msg_9003": "您来晚了,已经满额!",
"msg_9004": "提交失败!"
},
"buttonList": [
{
"title": "",
"url": ""
}
],
"link": ""
},
"bottomConf": {
"bannerImage": "",
"bannerImageWidth": "100%",
"logoChoose": "didi",
"logoImage": "",
"logoImageWidth": "33%"
},
"baseConf": {
"begTime": "2018-05-22 17:17:48",
"endTime": "2028-05-22 17:17:48",
"viewType": "block",
"tLimit": "0",
"qEquipLimit": "0",
"qIpLimit": "0",
"loginLimit": {
"type": "",
"limit": "0"
},
"language": "chinese",
"formdataBackfill": "notallow",
"previousSwitch": "notallow",
"showVoteProcess": "allow",
"publishDate": 1527647912221
},
"skinConf": {
"skinColor": "#4a4c5b",
"inputBgColor": "ffffff"
},
"shareConf": {
"shareConfig": {
"shareTitle": "",
"shareDesc": "",
"shareImg": "",
"shareLink": ""
}
},
"dataConf": {
"dataList": [
{
"isRequired": true,
"showIndex": true,
"showType": true,
"showSpliter": true,
"type": "text",
"field": "data458",
"title": "标题1",
"titleRich": "标题1",
"placeholder": "",
"sLimit": 1,
"mobKey": "",
"randomSort": false,
"checked": false,
"exam": false,
"minNum": "",
"maxNum": "",
"options": [
{
"text": "选项1",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
"placeholderDesc": "",
"score": 0
},
{
"text": "选项2",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
"placeholderDesc": "",
"score": 0
}
],
"cOption": "",
"cOptions": [],
"score": 0,
"maxPhotos": 5,
"star": 5,
"timeStep": {
"hour": 1,
"min": 10
},
"nps": {
"leftText": "极不满意",
"rightText": "极满意"
},
"exclude": false,
"relTypes": {
"textarea": "多行文本框",
"text": "单行输入框"
},
"placeholderDesc": "",
"carDataType": 1,
"mhLimit": 0,
"matrixRadioOpt": {
"titles": [
{
"text": "标题1"
},
{
"text": "标题2"
}
]
},
"importKey": "single",
"importData": "",
"addressType": 3,
"isAuto": false,
"urlKey": "",
"cascadeData": [
{
"id": 0,
"name": "级联选项内容配置",
"children": [
{
"id": "cascade_0",
"name": "一级选项",
"children": [
{
"id": "cascade_0_0",
"name": "二级选项",
"children": [
{
"id": "cascade_0_0_0",
"name": "三级选项",
"children": []
}
]
}
]
}
]
}
],
"defaultProps": {
"children": "children",
"label": "name",
"id": "id"
},
"relyList": [
{
"relyField": "",
"relyOption": [],
"relyType": "selected"
}
],
"jumpTo": "",
"startDate": "",
"endDate": "",
"othersKeyMap": {}
},
{
"isRequired": true,
"showIndex": true,
"showType": true,
"showSpliter": true,
"type": "radio-v",
"relTypes": {
"radio-v": "竖向排列",
"radio-h": "横向排列"
},
"placeholderDesc": "",
"carDataType": 1,
"field": "data515",
"sLimit": 1,
"mhLimit": 0,
"mobKey": "",
"title": "标题2",
"titleRich": "标题2",
"placeholder": "",
"randomSort": false,
"checked": false,
"exam": false,
"minNum": "",
"maxNum": "",
"options": [
{
"text": "选项1",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
"placeholderDesc": "",
"score": 0
},
{
"text": "选项2",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
"placeholderDesc": "",
"score": 0
}
],
"matrixRadioOpt": {
"titles": [
{
"text": "标题1"
},
{
"text": "标题2"
}
]
},
"importKey": "single",
"importData": "",
"cOption": "",
"cOptions": [],
"score": 0,
"timeStep": {
"hour": 1,
"min": 10
},
"maxPhotos": 5,
"nps": {
"leftText": "极不满意",
"rightText": "极满意"
},
"star": 5,
"exclude": false,
"addressType": 3,
"isAuto": false,
"urlKey": "",
"cascadeData": [
{
"id": 0,
"name": "级联选项内容配置",
"children": [
{
"id": "cascade_0",
"name": "一级选项",
"children": [
{
"id": "cascade_0_0",
"name": "二级选项",
"children": [
{
"id": "cascade_0_0_0",
"name": "三级选项",
"children": []
}
]
}
]
}
]
}
],
"defaultProps": {
"children": "children",
"label": "name",
"id": "id"
},
"relyList": [
{
"relyField": "",
"relyOption": [],
"relyType": "selected"
}
],
"jumpTo": "",
"startDate": "",
"endDate": "",
"othersKeyMap": {}
}
],
"total": 0,
"activeIndex": 1,
"limitMap": {}
}
}
}
}
}

获取投票实时数据

用于获取投票数据

GET /api/surveyPublish/queryVote

Request

名称含义类型是否必填默认值
surveyPath问卷短IDStringY
voteKeyList题目ID,逗号隔开StringY

请求示例

/api/surveyPublish/queryVote?voteKeyList=data458,data459&surveyPath=9VBpGNQi

返回示例

{
"code": 200,
"data": {
"data458": {
"9584": 2,
"9585": 1,
"total": 5
}
}
}

提交问卷

用于发布问卷

POST /api/surveyPublish/submit

Request

名称含义类型是否必填默认值
surveyPath问卷短IDStringY
data活动数据,如果encryptType为base64则data数据JSON化后传base64字符串StringY
encryptType加密方式StringN
sign签名StringY

请求示例

{
"surveyId":"64c8bde289e41908d8898d13",
"data": {
"data458": "11111",
"data515": "E0GZGNDY",
"scores": {},
"optionsWithId": {
"data515": [{
"id": "E0GZGNDY",
"value": "选项1"
}]
},
"channel": "",
"p": "",
"difTime": 14.138,
"secret": ""
},
"sign": "",
"backParams": {},
"cityId": "",
"cityName": "",
"omgh5fp": "a4edc724-b201-4e53-877b-d9b4f134909f",
"isForceSubmit": false,
"memberKey": "",
"businessParams": {},
"clientTime": 1690183745048,
"userInfo": {},
"appName": "Others"
}

返回示例

{
"code": 200,
"success": true,
"msg": "报名成功"
}

用户模块接口

注册

用于发布问卷

POST /api/user/register

Request

名称含义类型是否必填默认值
username用户名StringY
password密码StringY

请求示例

{
"username":"test",
"password":"123456"
}

返回示例

{
"success": true,
"data": {
"acknowledged": true,
"insertedId": {}
}
}

登录

用于发布问卷

POST /api/user/login

Request

名称含义类型是否必填默认值
username用户名StringY
password密码StringY

请求示例

{
"username":"test",
"password":"123456"
}

返回示例

{
"success": true,
"data": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2NGM4Y2NkMWViMTQ1ZjgzNWRjZTA4ZmEiLCJ1c2VybmFtZSI6InRlc3QiLCJpYXQiOjE2OTA4ODE1NzAsImV4cCI6MTY5MDkxMDM3MH0.wnJ_CGLKU5ljSUnocNwk4FkR6cS_5Pe_uMM2yeMYu9I"
}
}

默认token有效8小时,使用方式放到请求头的headers中的Authorization,如:

Authorization:Bearer
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2NGM4Y2NkMWViMTQ1ZjgzNWRjZTA4ZmEiLCJ1c2VybmFtZSI6InRlc3QiLCJpYXQiOjE2OTA4ODE1NzAsImV4cCI6MTY5MDkxMDM3MH0.wnJ_CGLKU5ljSUnocNwk4FkR6cS_5Pe_uMM2yeMYu9I