Commit 64bd4e68 by 陈海枫

Upload New File

parent c1748b79
{
"info": {
"_postman_id": "7fdef111-a0a1-4edf-9895-ae26da664830",
"name": "xinhuabast",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "新华优选",
"item": [
{
"name": "商城登录",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
},
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"//响应状态码200断言\r",
"\r",
"pm.test(\"Body matches string\", function () {\r",
" pm.expect(pm.response.text()).to.include(\"true\");\r",
"});\r",
"//断言响应字符串是否包含true\r",
"\r",
"pm.test(\"Body matches string\", function () {\r",
" pm.expect(pm.response.text()).to.include(\"ok\");\r",
"});\r",
"//断言响应字符串是否包含ok\r",
"\r",
"pm.test(\"Content-Type is present\", function () {\r",
" pm.response.to.have.header(\"Content-Type\");\r",
"});\r",
"//断言响应是否包含Content-Type\r",
"\r",
"\r",
"var jsondata =JSON.parse(responseBody);\r",
"//提取响应作为JSON\r",
"pm.globals.set(\"SESSION_ID\", jsondata.data.SESSION_ID)\r",
"//提取jsonData中的token做为全局变量Mayi-Token\r",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json, text/plain, */*",
"type": "text"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8",
"type": "text"
},
{
"key": "Shop-Mixid",
"value": "TZYLX",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"account\": \"13037555524\",\r\n \"password\": \"123456\",\r\n \"loginType\": 0\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://shop.mayi888.com/innerApi/shopApiService/login",
"protocol": "https",
"host": [
"shop",
"mayi888",
"com"
],
"path": [
"innerApi",
"shopApiService",
"login"
]
}
},
"response": []
},
{
"name": "商城搜索商品-全网搜",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
},
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"//响应状态码200断言\r",
"\r",
"pm.test(\"Body matches string\", function () {\r",
" pm.expect(pm.response.text()).to.include(\"true\");\r",
"});\r",
"//断言响应字符串是否包含true\r",
"\r",
"pm.test(\"Body matches string\", function () {\r",
" pm.expect(pm.response.text()).to.include(\"ok\");\r",
"});\r",
"//断言响应字符串是否包含ok\r",
"\r",
"pm.test(\"Content-Type is present\", function () {\r",
" pm.response.to.have.header(\"Content-Type\");\r",
"});\r",
"//断言响应是否包含Content-Type\r",
"\r",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json, text/plain, */*",
"type": "text"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8",
"type": "text"
},
{
"key": "Shop-Mixid",
"value": "xhyxshop",
"type": "text"
},
{
"key": "Authorization",
"value": "{{SESSION_ID}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"searchWord\": \"做对选择\",\r\n \"categoryName\": \"\",\r\n \"categoryBigImg\": null,\r\n \"categoryId\": \"\",\r\n \"sortColumn\": 9,\r\n \"sortType\": \"1\",\r\n \"colorList\": [],\r\n \"sizeList\": [],\r\n \"page\": 1,\r\n \"couponId\": \"\",\r\n \"rows\": 6,\r\n \"goodsSpecificationIds\": [],\r\n \"categoryIncludeChild\": true,\r\n \"whetherFindDistributionCommission\": 1,\r\n \"whetherShowGoodsDefaultTagFlag\": 1,\r\n \"whetherFindMultiShopFlag\": 0,\r\n \"whetherQueryGoodsAttributeFlag\": 1,\r\n \"whetherQueryCollectCount\": true,\r\n \"whetherUseVirtualSalesQty\": true,\r\n \"whetherUseVirtualCollectCount\": true,\r\n \"whetherToEnableQuickPurchase\": \"0\",\r\n \"searchScopeFlag\": 1\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://m.xinhuabest.com/xhyx_prod/innerApi/shopApiService/product/select_product_info_on_es",
"protocol": "https",
"host": [
"m",
"xinhuabest",
"com"
],
"path": [
"xhyx_prod",
"innerApi",
"shopApiService",
"product",
"select_product_info_on_es"
]
}
},
"response": []
},
{
"name": "商城搜索商品-门店搜",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
},
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"//响应状态码200断言\r",
"\r",
"pm.test(\"Body matches string\", function () {\r",
" pm.expect(pm.response.text()).to.include(\"true\");\r",
"});\r",
"//断言响应字符串是否包含true\r",
"\r",
"pm.test(\"Body matches string\", function () {\r",
" pm.expect(pm.response.text()).to.include(\"ok\");\r",
"});\r",
"//断言响应字符串是否包含ok\r",
"\r",
"pm.test(\"Content-Type is present\", function () {\r",
" pm.response.to.have.header(\"Content-Type\");\r",
"});\r",
"//断言响应是否包含Content-Type\r",
"\r",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json, text/plain, */*",
"type": "text"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8",
"type": "text"
},
{
"key": "Shop-Mixid",
"value": "xhyxshop",
"type": "text"
},
{
"key": "Authorization",
"value": "{{SESSION_ID}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"searchWord\": \"做对选择\",\r\n \"categoryName\": \"\",\r\n \"categoryBigImg\": null,\r\n \"categoryId\": \"\",\r\n \"sortColumn\": 9,\r\n \"sortType\": \"1\",\r\n \"colorList\": [],\r\n \"sizeList\": [],\r\n \"page\": 1,\r\n \"couponId\": \"\",\r\n \"rows\": 6,\r\n \"goodsSpecificationIds\": [],\r\n \"categoryIncludeChild\": true,\r\n \"whetherFindDistributionCommission\": 1,\r\n \"whetherShowGoodsDefaultTagFlag\": 1,\r\n \"whetherFindMultiShopFlag\": 0,\r\n \"whetherQueryGoodsAttributeFlag\": 1,\r\n \"whetherQueryCollectCount\": true,\r\n \"whetherUseVirtualSalesQty\": true,\r\n \"whetherUseVirtualCollectCount\": true,\r\n \"whetherToEnableQuickPurchase\": \"0\",\r\n \"searchScopeFlag\": 1\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://m.xinhuabest.com/xhyx_prod/innerApi/shopApiService/product/select_product_info_on_es",
"protocol": "https",
"host": [
"m",
"xinhuabest",
"com"
],
"path": [
"xhyx_prod",
"innerApi",
"shopApiService",
"product",
"select_product_info_on_es"
]
}
},
"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 to comment