Commit f070836c by zhangjingdong

提交活动接口脚本

parent 7986b121
No preview for this file type
{
{
"id": "a02d4b69-e0ad-4bd2-b06b-0d83e9ea1035",
"name": "活动",
"description": null,
"auth": null,
"events": null,
"variables": null,
"order": [
"62246627-c76c-4e83-99c5-eae45302f950",
"f59a8d39-c737-4eff-88ab-d6e620cfd980",
"e182c84d-8ec1-417e-af6b-486d78786781",
"dd4da32a-1895-4c26-9b33-1a1d3d8bc54e"
],
"folders_order": [],
"folders": [],
"requests": [
{
"id": "62246627-c76c-4e83-99c5-eae45302f950",
"name": "用户登录",
"url": "{{gateway-user}}/app/login",
"description": null,
"data": [],
"dataMode": "raw",
"headerData": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"method": "POST",
"pathVariableData": [],
"queryParams": [],
"auth": null,
"events": [
{
"listen": "test",
"script": {
"id": "70432a1b-2ab3-4c70-8430-b63be532d565",
"type": "text/javascript",
"exec": [
"// console.log(\"----------------responseBody--------------\"+responseBody);",
"var jsonData = JSON.parse(responseBody);",
"// console.log(\"----------------jsonData.data.accessToken--------------\"+jsonData.data.accessToken);",
"",
"if(jsonData.data !== null || jsonData.data !==\"\")",
"{",
" tests[\"accessToken\"] = true;",
" postman.setEnvironmentVariable(\"access_Token\",jsonData.data.accessToken);",
" ",
"}",
"else",
"{",
" console.log(\"接口返回错误:\"+jsonData.msg);",
" tests[\"accessToken\"]=false;",
"}",
""
]
}
},
{
"listen": "prerequest",
"script": {
"id": "b4215bcf-fbff-4e3d-9f19-538d7af903ee",
"type": "text/javascript",
"exec": [
""
]
}
}
],
"folder": null,
"rawModeData": "{\n \"userPhone\": \"18670340158\",\n \"userPassword\": \"xqw123\",\n \"equipment\": \"c5d93c486a95d658\",\n \"channelId\": 1\n}",
"headers": "Content-Type: application/json\n",
"pathVariables": {}
},
{
"id": "dd4da32a-1895-4c26-9b33-1a1d3d8bc54e",
"name": "app获取某一个活动详情",
"url": "{{gateway-user}}/app/activity/196",
"description": "",
"data": null,
"dataMode": "params",
"headerData": [
{
"key": "access-token",
"value": "{{access_Token}}",
"description": "",
"enabled": true
}
],
"method": "GET",
"pathVariableData": [],
"queryParams": [],
"auth": null,
"events": [],
"folder": null,
"headers": "access-token: {{access_Token}}\n",
"pathVariables": {}
},
{
"id": "e182c84d-8ec1-417e-af6b-486d78786781",
"name": "app获取某用户报名活动列表",
"url": "{{gateway-user}}/app/activity/user?p=1&c=2",
"description": "",
"data": [],
"dataMode": "raw",
"headerData": [
{
"key": "access-token",
"value": "{{access_Token}}",
"description": "",
"enabled": true
},
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "refreshToken",
"value": "{{refreshToken}}",
"description": "",
"enabled": true
}
],
"method": "POST",
"pathVariableData": [],
"queryParams": [
{
"key": "p",
"value": "1",
"equals": true,
"description": "",
"enabled": true
},
{
"key": "c",
"value": "2",
"equals": true,
"description": "",
"enabled": true
}
],
"auth": null,
"events": [],
"folder": null,
"rawModeData": "{\n \"blockType\": \"ENTERPRISE\",\n \"userId\": 0\n}",
"headers": "access-token: {{access_Token}}\nContent-Type: application/json\nrefreshToken: {{refreshToken}}\n",
"pathVariables": {}
},
{
"id": "f59a8d39-c737-4eff-88ab-d6e620cfd980",
"name": "app根据小镇获取活动列表",
"url": "{{gateway-user}}/app/activity/town/user",
"description": "",
"data": [],
"dataMode": "raw",
"headerData": [
{
"key": "access-token",
"value": "{{access_Token}}",
"description": "",
"enabled": true
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"method": "POST",
"pathVariableData": [],
"queryParams": [],
"auth": null,
"events": [
{
"listen": "test",
"script": {
"id": "3ead7a4a-0d8a-4bbc-abfe-77e26a51ad71",
"type": "text/javascript",
"exec": [
"var jsonData = JSON.parse(responseBody);",
"if(jsonData.code === \"0\")",
"{",
" tests[\"code\"] = true;",
"}",
"else{",
" console.log(\"接口返回错误:\"+jsonData.msg);",
" tests[\"code\"]=false;",
"}",
""
]
}
}
],
"folder": null,
"rawModeData": "{\n \"blockType\": \"ENTERPRISE\",\n \"townId\": 1 ,\n \"userId\": 0\n}",
"headers": "access-token: {{access_Token}}\nContent-Type: application/json\n",
"pathVariables": {}
}
]
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment