Commit 3cd736cb by zhangjingdong

修改postman导出脚本的版本

parent dd9f3656
No preview for this file type
No preview for this file type
{ {
...@@ -16,13 +16,7 @@ ...@@ -16,13 +16,7 @@
}, },
{ {
"key": "access-Token", "key": "access-Token",
"value": "3858fd852d0c4c5594cda2bdaeb81fa2", "value": "be4c6160f25c4085b6c4c61fa7803a7a",
"enabled": true,
"type": "text"
},
{
"key": "refreshToken",
"value": "ae13c8566980480eb465b50de490cbb9",
"enabled": true, "enabled": true,
"type": "text" "type": "text"
}, },
...@@ -34,6 +28,6 @@ ...@@ -34,6 +28,6 @@
} }
], ],
"_postman_variable_scope": "environment", "_postman_variable_scope": "environment",
"_postman_exported_at": "2018-11-21T01:46:31.227Z", "_postman_exported_at": "2018-11-27T03:29:41.309Z",
"_postman_exported_using": "Postman/6.1.4" "_postman_exported_using": "Postman/6.1.4"
} }
\ No newline at end of file
{ {
{ {
"id": "a02d4b69-e0ad-4bd2-b06b-0d83e9ea1035", "info": {
"name": "活动", "_postman_id": "a02d4b69-e0ad-4bd2-b06b-0d83e9ea1035",
"description": null, "name": "活动",
"auth": null, "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
"events": null, },
"variables": null, "item": [
"order": [
"62246627-c76c-4e83-99c5-eae45302f950",
"f59a8d39-c737-4eff-88ab-d6e620cfd980",
"e182c84d-8ec1-417e-af6b-486d78786781",
"430603ba-54a4-4c7b-9a11-a9af5156dfc3",
"9e0a4a32-f71a-4265-8665-59eb1600627b",
"a8d0d72d-6481-4571-a4f0-0e81faa20b1a",
"580a1db9-448e-452b-8588-fdae50dcc960",
"dd4da32a-1895-4c26-9b33-1a1d3d8bc54e",
"851d8cc6-4609-490a-b7ba-e3400244b043"
],
"folders_order": [],
"folders": [],
"requests": [
{ {
"id": "430603ba-54a4-4c7b-9a11-a9af5156dfc3", "name": "用户登录",
"name": "app用户活动报名", "event": [
"url": "{{gateway-user}}/app/new/activity/enroll\n",
"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", "listen": "test",
"script": { "script": {
"id": "f008e296-82a3-4d20-a473-7c2827a257eb", "id": "a9c52209-1773-48db-86df-106c6ee71da4",
"type": "text/javascript", "type": "text/javascript",
"exec": [ "exec": [
"// console.log(\"----------------responseBody--------------\"+responseBody);",
"var jsonData = JSON.parse(responseBody);", "var jsonData = JSON.parse(responseBody);",
"if(jsonData.code === \"0\")", "// console.log(\"----------------jsonData.data.accessToken--------------\"+jsonData.data.accessToken);",
"",
"if(jsonData.data !== null || jsonData.data !==\"\")",
"{", "{",
" tests[\"code\"] = true;", " tests[\"accessToken\"] = true;",
" postman.setEnvironmentVariable(\"access-Token\",jsonData.data.accessToken);",
" ",
"}", "}",
"else{", "else",
"{",
" console.log(\"接口返回错误:\"+jsonData.msg);", " console.log(\"接口返回错误:\"+jsonData.msg);",
" tests[\"code\"]=false;", " tests[\"accessToken\"]=false;",
"}", "}",
"" ""
] ]
} }
},
{
"listen": "prerequest",
"script": {
"id": "b4215bcf-fbff-4e3d-9f19-538d7af903ee",
"type": "text/javascript",
"exec": [
""
]
}
} }
], ],
"folder": null, "request": {
"rawModeData": "{\n \"activityId\":196,\n \"enrollStatus\": \"CONFIRM\",\n\n \"townId\": 1\n}", "method": "POST",
"headers": "access-Token: {{access-Token}}\nContent-Type: application/json\n", "header": [
"pathVariables": {} {
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"userPhone\": {{user_phone}},\n \"userPassword\": \"123456\",\n \"equipment\": \"c5d93c486a95d658\",\n \"channelId\": 1\n}"
},
"url": "{{gateway-user}}/app/login"
},
"response": []
}, },
{ {
"id": "580a1db9-448e-452b-8588-fdae50dcc960", "name": "app根据小镇获取活动列表",
"name": "app端获取活动详情", "event": [
"url": "{{gateway-user}}/app/new/activity/get/comment/info/{{activityId}}",
"description": "",
"data": null,
"dataMode": "params",
"headerData": [
{
"key": "access-Token",
"value": "{{access-Token}}",
"description": "",
"enabled": true
}
],
"method": "GET",
"pathVariableData": [],
"queryParams": [],
"auth": null,
"events": [
{ {
"listen": "test", "listen": "test",
"script": { "script": {
"id": "2fd3ff6b-1da2-4b16-bf00-480169689fe1", "id": "3c9905dc-9e88-48dc-81d6-52361e995629",
"type": "text/javascript", "type": "text/javascript",
"exec": [ "exec": [
"var jsonData = JSON.parse(responseBody);", "var jsonData = JSON.parse(responseBody);",
...@@ -108,93 +83,96 @@ ...@@ -108,93 +83,96 @@
} }
} }
], ],
"folder": null, "request": {
"headers": "access-Token: {{access-Token}}\n", "method": "POST",
"pathVariables": {} "header": [
{
"key": "access-token",
"value": "{{access-Token}}"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"blockType\": \"ENTERPRISE\",\n \"townId\": 1\n}"
},
"url": "{{gateway-user}}/app/activity/town/user"
},
"response": []
}, },
{ {
"id": "62246627-c76c-4e83-99c5-eae45302f950", "name": "app获取某用户报名活动列表",
"name": "用户登录", "event": [
"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", "listen": "test",
"script": { "script": {
"id": "a9c52209-1773-48db-86df-106c6ee71da4", "id": "74323a15-c4af-40e0-8e6e-1bd188b95239",
"type": "text/javascript", "type": "text/javascript",
"exec": [ "exec": [
"// console.log(\"----------------responseBody--------------\"+responseBody);",
"var jsonData = JSON.parse(responseBody);", "var jsonData = JSON.parse(responseBody);",
"// console.log(\"----------------jsonData.data.accessToken--------------\"+jsonData.data.accessToken);", "if(jsonData.code === \"0\")",
"",
"if(jsonData.data !== null || jsonData.data !==\"\")",
"{", "{",
" tests[\"accessToken\"] = true;", " tests[\"code\"] = true;",
" postman.setEnvironmentVariable(\"access-Token\",jsonData.data.accessToken);",
" ",
"}", "}",
"else", "else{",
"{",
" console.log(\"接口返回错误:\"+jsonData.msg);", " console.log(\"接口返回错误:\"+jsonData.msg);",
" tests[\"accessToken\"]=false;", " tests[\"code\"]=false;",
"}", "}",
"" ""
] ]
} }
},
{
"listen": "prerequest",
"script": {
"id": "b4215bcf-fbff-4e3d-9f19-538d7af903ee",
"type": "text/javascript",
"exec": [
""
]
}
} }
], ],
"folder": null, "request": {
"rawModeData": "{\n \"userPhone\": {{user_phone}},\n \"userPassword\": \"123456\",\n \"equipment\": \"c5d93c486a95d658\",\n \"channelId\": 1\n}", "method": "POST",
"headers": "Content-Type: application/json\n", "header": [
"pathVariables": {} {
"key": "access-token",
"value": "{{access-Token}}"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"blockType\": \"ENTERPRISE\"\n}"
},
"url": {
"raw": "{{gateway-user}}/app/activity/user?p=1&c=2",
"host": [
"{{gateway-user}}"
],
"path": [
"app",
"activity",
"user"
],
"query": [
{
"key": "p",
"value": "1"
},
{
"key": "c",
"value": "2"
}
]
}
},
"response": []
}, },
{ {
"id": "851d8cc6-4609-490a-b7ba-e3400244b043", "name": "app用户活动报名",
"name": "获取置顶活动", "event": [
"url": "{{gateway-user}}/app/new/activity/get/top/one/1/ENTERPRISE",
"description": "",
"data": null,
"dataMode": "params",
"headerData": [
{
"key": "access-Token",
"value": "{{access-Token}}",
"description": "",
"enabled": true
}
],
"method": "GET",
"pathVariableData": [],
"queryParams": [],
"auth": null,
"events": [
{ {
"listen": "test", "listen": "test",
"script": { "script": {
"id": "bb090dcf-2104-4a22-8b39-b8220af62c9a", "id": "f008e296-82a3-4d20-a473-7c2827a257eb",
"type": "text/javascript", "type": "text/javascript",
"exec": [ "exec": [
"var jsonData = JSON.parse(responseBody);", "var jsonData = JSON.parse(responseBody);",
...@@ -211,34 +189,29 @@ ...@@ -211,34 +189,29 @@
} }
} }
], ],
"folder": null, "request": {
"headers": "access-Token: {{access-Token}}\n", "method": "POST",
"pathVariables": {} "header": [
{
"key": "access-Token",
"value": "{{access-Token}}"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"activityId\":196,\n \"enrollStatus\": \"CONFIRM\",\n\n \"townId\": 1\n}"
},
"url": "{{gateway-user}}/app/new/activity/enroll"
},
"response": []
}, },
{ {
"id": "9e0a4a32-f71a-4265-8665-59eb1600627b",
"name": "app活动评论", "name": "app活动评论",
"url": "{{gateway-user}}/app/new/activity/comment", "event": [
"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", "listen": "test",
"script": { "script": {
...@@ -259,24 +232,29 @@ ...@@ -259,24 +232,29 @@
} }
} }
], ],
"folder": null, "request": {
"rawModeData": "{\n \"activityId\": {{activityId}},\n \"commentType\": \"ACTIVITY\",\n \"commentStatus\": \"COMMENT\",\n \"comment\": \"hahhaahhahahahahahahh\",\n \"commentImg\": [\n \"string\"\n ]\n}", "method": "POST",
"headers": "access-Token: {{access-Token}}\nContent-Type: application/json\n", "header": [
"pathVariables": {} {
"key": "access-Token",
"value": "{{access-Token}}"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"activityId\": {{activityId}},\n \"commentType\": \"ACTIVITY\",\n \"commentStatus\": \"COMMENT\",\n \"comment\": \"hahhaahhahahahahahahh\",\n \"commentImg\": [\n \"string\"\n ]\n}"
},
"url": "{{gateway-user}}/app/new/activity/comment"
},
"response": []
}, },
{ {
"id": "a8d0d72d-6481-4571-a4f0-0e81faa20b1a",
"name": "app二维码获取活动详情", "name": "app二维码获取活动详情",
"url": "{{gateway-user}}/app/new/activity/get/code/info/{{activityId}}", "event": [
"description": "",
"data": null,
"dataMode": "params",
"headerData": [],
"method": "GET",
"pathVariableData": [],
"queryParams": [],
"auth": null,
"events": [
{ {
"listen": "test", "listen": "test",
"script": { "script": {
...@@ -297,34 +275,21 @@ ...@@ -297,34 +275,21 @@
} }
} }
], ],
"folder": null, "request": {
"headers": "", "method": "GET",
"pathVariables": {} "header": [],
"body": {},
"url": "{{gateway-user}}/app/new/activity/get/code/info/{{activityId}}"
},
"response": []
}, },
{ {
"id": "dd4da32a-1895-4c26-9b33-1a1d3d8bc54e", "name": "app端获取活动详情",
"name": "app获取某一个活动详情", "event": [
"url": "{{gateway-user}}/app/activity/{{activityId}}",
"description": "",
"data": null,
"dataMode": "params",
"headerData": [
{
"key": "access-token",
"value": "{{access-Token}}",
"description": "",
"enabled": true
}
],
"method": "GET",
"pathVariableData": [],
"queryParams": [],
"auth": null,
"events": [
{ {
"listen": "test", "listen": "test",
"script": { "script": {
"id": "93f6cff3-ef65-40e9-ba2b-716185de2860", "id": "2fd3ff6b-1da2-4b16-bf00-480169689fe1",
"type": "text/javascript", "type": "text/javascript",
"exec": [ "exec": [
"var jsonData = JSON.parse(responseBody);", "var jsonData = JSON.parse(responseBody);",
...@@ -341,53 +306,26 @@ ...@@ -341,53 +306,26 @@
} }
} }
], ],
"folder": null, "request": {
"headers": "access-token: {{access-Token}}\n", "method": "GET",
"pathVariables": {} "header": [
{
"key": "access-Token",
"value": "{{access-Token}}"
}
],
"body": {},
"url": "{{gateway-user}}/app/new/activity/get/comment/info/{{activityId}}"
},
"response": []
}, },
{ {
"id": "e182c84d-8ec1-417e-af6b-486d78786781", "name": "app获取某一个活动详情",
"name": "app获取某用户报名活动列表", "event": [
"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"
}
],
"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": [
{ {
"listen": "test", "listen": "test",
"script": { "script": {
"id": "74323a15-c4af-40e0-8e6e-1bd188b95239", "id": "93f6cff3-ef65-40e9-ba2b-716185de2860",
"type": "text/javascript", "type": "text/javascript",
"exec": [ "exec": [
"var jsonData = JSON.parse(responseBody);", "var jsonData = JSON.parse(responseBody);",
...@@ -404,39 +342,26 @@ ...@@ -404,39 +342,26 @@
} }
} }
], ],
"folder": null, "request": {
"rawModeData": "{\n \"blockType\": \"ENTERPRISE\"\n}", "method": "GET",
"headers": "access-token: {{access-Token}}\nContent-Type: application/json\n", "header": [
"pathVariables": {} {
"key": "access-token",
"value": "{{access-Token}}"
}
],
"body": {},
"url": "{{gateway-user}}/app/activity/{{activityId}}"
},
"response": []
}, },
{ {
"id": "f59a8d39-c737-4eff-88ab-d6e620cfd980", "name": "获取置顶活动",
"name": "app根据小镇获取活动列表", "event": [
"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", "listen": "test",
"script": { "script": {
"id": "3c9905dc-9e88-48dc-81d6-52361e995629", "id": "bb090dcf-2104-4a22-8b39-b8220af62c9a",
"type": "text/javascript", "type": "text/javascript",
"exec": [ "exec": [
"var jsonData = JSON.parse(responseBody);", "var jsonData = JSON.parse(responseBody);",
...@@ -453,10 +378,18 @@ ...@@ -453,10 +378,18 @@
} }
} }
], ],
"folder": null, "request": {
"rawModeData": "{\n \"blockType\": \"ENTERPRISE\",\n \"townId\": 1\n}", "method": "GET",
"headers": "access-token: {{access-Token}}\nContent-Type: application/json\n", "header": [
"pathVariables": {} {
"key": "access-Token",
"value": "{{access-Token}}"
}
],
"body": {},
"url": "{{gateway-user}}/app/new/activity/get/top/one/1/ENTERPRISE"
},
"response": []
} }
] ]
} }
\ 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