Commit f75ecfff by 朱亚东

add 账号相关

parent 42cadb82
{
{
"info": {
"_postman_id": "edf71446-25f6-4b9d-b2d3-93e8ca24339b",
"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",
"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;",
"}",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"userPhone\": {{user_phone}},\n \"userPassword\": {{userPassword}},\n \"equipment\": \"c5d93c486a95d658\",\n \"channelId\": 1\n}"
},
"url": "{{gateway-user}}/app/login"
},
"response": []
},
{
"name": "修改当前账户所在的小镇id",
"event": [
{
"listen": "test",
"script": {
"id": "587ed404-61d0-469c-af27-f160ecde9086",
"exec": [
"var jsonData = JSON.parse(responseBody);",
"if(jsonData.code === \"0\")",
"{",
" tests[\"code\"] = true;",
"}",
"else{",
" console.log(\"接口返回错误:\"+jsonData.msg);",
" tests[\"code\"+jsonData.msg]=false;",
"}",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "access-token",
"type": "text",
"value": "{{access-Token}}"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": "{{gateway-user}}/app/account/{{townId}}"
},
"response": []
},
{
"name": "根据手机号查询用户详细信息",
"event": [
{
"listen": "test",
"script": {
"id": "587ed404-61d0-469c-af27-f160ecde9086",
"exec": [
"var jsonData = JSON.parse(responseBody);",
"if(jsonData.code === \"0\")",
"{",
" tests[\"code\"] = true;",
"}",
"else{",
" console.log(\"接口返回错误:\"+jsonData.msg);",
" tests[\"code\"+jsonData.msg]=false;",
"}",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "access-token",
"type": "text",
"value": "{{access-Token}}"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": "{{gateway-user}}/user/userinfo/phone/{{userPhone}}"
},
"response": []
}
]
}
\ No newline at end of file
{
{
"id": "1f866ad9-3c4e-4af7-a493-291720cfda2e",
"name": "账号相关_manage",
"values": [
{
"key": "gateway-user",
"value": "https://usergwtest.bgycc.com",
"enabled": true
},
{
"key": "user_phone",
"value": "13093585508",
"enabled": true
},
{
"key": "access-Token",
"value": "5b9943974e89417b91e07dd6f2fa7034",
"enabled": true
},
{
"key": "townId",
"value": "58",
"enabled": true
},
{
"key": "userPassword",
"value": "\"dong123\"",
"description": {
"content": "",
"type": "text/plain"
},
"enabled": true
},
{
"key": "userPhone",
"value": "13093585508",
"type": "text",
"description": "",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2019-01-08T07:08:29.181Z",
"_postman_exported_using": "Postman/6.6.1"
}
\ 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