Commit f4955ccf by zhangjingdong

添加脚本

parent 0adcb4a9
No preview for this file type
No preview for this file type
No preview for this file type
{
{
"info": {
"_postman_id": "2a3c1f0c-37b1-4c06-9f2f-a378571047d6",
"name": "企业墙",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
"name": "用户登录",
"event": [
{
"listen": "test",
"script": {
"id": "ab616fda-d96b-4f71-a9aa-6c59ce279e71",
"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;",
"}",
""
]
}
}
],
"request": {
"method": "POST",
"header": [
{
"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": []
},
{
"name": "APP根据类型查询企业列表",
"request": {
"method": "POST",
"header": [
{
"key": "access-Token",
"value": "{{access-Token}}"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"townId\": 1,\n \"id\": \"\"\n}"
},
"url": {
"raw": "{{gateway-user}}/enterprise/wall/type?p=1&c=10",
"host": [
"{{gateway-user}}"
],
"path": [
"enterprise",
"wall",
"type"
],
"query": [
{
"key": "p",
"value": "1"
},
{
"key": "c",
"value": "10"
}
]
}
},
"response": []
},
{
"name": "APP 获取企业详情",
"event": [
{
"listen": "test",
"script": {
"id": "abd52a73-7a0b-470d-bd6b-26b308776215",
"type": "text/javascript",
"exec": [
""
]
}
}
],
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "access-Token",
"value": "{{access-Token}}"
}
],
"body": {},
"url": "{{gateway-user}}/enterprise/wall/{{id}}"
},
"response": []
}
]
}
\ No newline at end of file
{
{
"id": "8696c47e-61ac-4e1c-915a-403b5b20c36e",
"name": "企业墙_manage",
"values": [
{
"key": "gateway-user",
"value": "https://usergwtest.bgycc.com",
"enabled": true,
"type": "text"
},
{
"key": "user_phone",
"value": "17610939089",
"enabled": true,
"type": "text"
},
{
"key": "access-Token",
"value": "d0623a906fac4f1bb9c410680eced5ef",
"enabled": true,
"type": "text"
},
{
"key": "townId",
"value": "1",
"enabled": true,
"type": "text"
},
{
"key": "id",
"value": "289",
"enabled": true,
"type": "text"
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2018-12-12T07:51:18.360Z",
"_postman_exported_using": "Postman/6.1.4"
}
\ No newline at end of file
{
{
"id": "a3a5880d-98ad-45e8-84e3-7642fdfa81c2",
"name": "\b活动_manage",
"values": [
{
"key": "gateway-user",
"value": "https://usergwtest.bgycc.com",
"enabled": true,
"type": "text"
},
{
"key": "user_phone",
"value": "18670340158",
"enabled": true,
"type": "text"
},
{
"key": "access-Token",
"value": "be4c6160f25c4085b6c4c61fa7803a7a",
"enabled": true,
"type": "text"
},
{
"key": "activityId",
"value": "196",
"enabled": true,
"type": "text"
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2018-11-27T03:29:41.309Z",
"_postman_exported_using": "Postman/6.1.4"
}
\ 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