加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
商城后台.postman_collection.json 11.29 KB
一键复制 编辑 原始数据 按行查看 历史
潘宇 提交于 2022-07-07 18:44 . 19-完成了订单模块
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631
{
"info": {
"_postman_id": "4d91fa03-9e95-4d3d-bd1e-494ad7538a55",
"name": "商城后台",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "21417092"
},
"item": [
{
"name": "用户模块",
"item": [
{
"name": "register",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "user_name",
"value": "xiaobai",
"type": "text"
},
{
"key": "password",
"value": "123456",
"type": "text"
}
]
},
"url": {
"raw": "{{baseURL}}/user/register",
"host": [
"{{baseURL}}"
],
"path": [
"user",
"register"
]
}
},
"response": []
},
{
"name": "login",
"event": [
{
"listen": "test",
"script": {
"exec": [
"\r",
"pm.test(\"Status code is 200\", function () {\r",
" var jsonData = pm.response.json();\r",
" \r",
" pm.collectionVariables.set(\"token\", jsonData.result.token);\r",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "user_name",
"value": "xiaojun",
"type": "text"
},
{
"key": "password",
"value": "99999",
"type": "text"
}
]
},
"url": {
"raw": "{{baseURL}}/user/login",
"host": [
"{{baseURL}}"
],
"path": [
"user",
"login"
]
}
},
"response": []
},
{
"name": "changePassword",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6NywidXNlcl9uYW1lIjoieGlhb2p1biIsImlzX2FkbWluIjpmYWxzZSwiaWF0IjoxNjU2OTg4NDk2LCJleHAiOjE2NTcwNzQ4OTZ9.GlsOEuw_KFW8npzH1tQW9c0oImt-hrl_he2x0gV-7r",
"type": "string"
}
]
},
"method": "PATCH",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": []
},
"url": {
"raw": "{{baseURL}}/user/",
"host": [
"{{baseURL}}"
],
"path": [
"user",
""
]
}
},
"response": []
}
]
},
{
"name": "商品模块",
"item": [
{
"name": "上传图片",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "file",
"type": "file",
"src": []
}
]
},
"url": {
"raw": "{{baseURL}}/goods/upload",
"host": [
"{{baseURL}}"
],
"path": [
"goods",
"upload"
]
}
},
"response": []
},
{
"name": "发布商品",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n goods_name:'耳机’,\r\n goods_number:10,\r\n goods_price:99,\r\n goods_img:'2f3d00aedc8b12454ebf91b00.jpeg'\r\n}"
},
"url": {
"raw": "{{baseURL}}/goods/publish",
"host": [
"{{baseURL}}"
],
"path": [
"goods",
"publish"
]
}
},
"response": []
},
{
"name": "更新商品",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "PUT",
"header": []
},
"response": []
},
{
"name": "下架商品",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"url": {
"raw": "{{baseURL}}/goods/1/off",
"host": [
"{{baseURL}}"
],
"path": [
"goods",
"1",
"off"
],
"query": [
{
"key": "",
"value": "",
"disabled": true
}
]
}
},
"response": []
},
{
"name": "上架商品",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"url": {
"raw": "{{baseURL}}/goods/1/on",
"host": [
"{{baseURL}}"
],
"path": [
"goods",
"1",
"on"
]
}
},
"response": []
},
{
"name": "获取商品列表",
"request": {
"method": "GET",
"header": []
},
"response": []
}
]
},
{
"name": "购物车模块",
"item": [
{
"name": "添加购物车",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"goods_id\":2,\r\n \"goods_number\":11\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseURL}}/carts",
"host": [
"{{baseURL}}"
],
"path": [
"carts"
]
}
},
"response": []
},
{
"name": "获取购物车信息",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "{{baseURL}}/carts/?pageNum=1&pageSize=0",
"host": [
"{{baseURL}}"
],
"path": [
"carts",
""
],
"query": [
{
"key": "pageNum",
"value": "1"
},
{
"key": "pageSize",
"value": "0"
}
]
}
},
"response": []
},
{
"name": "更新购物车",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "PATCH",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"goods_id\":2,\r\n \"goods_number\":100,\r\n \"selected\":false\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseURL}}/carts",
"host": [
"{{baseURL}}"
],
"path": [
"carts"
]
}
},
"response": []
},
{
"name": "删除购物车",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "DELETE",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"idList\":[1,2]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseURL}}/carts",
"host": [
"{{baseURL}}"
],
"path": [
"carts"
]
}
},
"response": []
},
{
"name": "全选或取消全选",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"selected\":false\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseURL}}/carts",
"host": [
"{{baseURL}}"
],
"path": [
"carts"
]
}
},
"response": []
}
]
},
{
"name": "地址模块",
"item": [
{
"name": "添加收货地址",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"consignee\":\"小熙\",\r\n \"phone\":\"12300000000\",\r\n \"address\":\"地球\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseURL}}/address",
"host": [
"{{baseURL}}"
],
"path": [
"address"
]
}
},
"response": []
},
{
"name": "获取收货地址",
"request": {
"method": "GET",
"header": []
},
"response": []
},
{
"name": "修改收货地址",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"consignee\":\"小明\",\r\n \"phone\":\"12300000001\",\r\n \"address\":\"水星\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseURL}}/address/5",
"host": [
"{{baseURL}}"
],
"path": [
"address",
"5"
]
}
},
"response": []
},
{
"name": "删除地址",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "DELETE",
"header": [],
"url": {
"raw": "{{baseURL}}/address/1",
"host": [
"{{baseURL}}"
],
"path": [
"address",
"1"
]
}
},
"response": []
},
{
"name": "修改默认地址",
"request": {
"method": "GET",
"header": []
},
"response": []
}
]
},
{
"name": "订单模块",
"item": [
{
"name": "创建订单",
"request": {
"method": "GET",
"header": []
},
"response": []
},
{
"name": "获取订单",
"request": {
"method": "GET",
"header": []
},
"response": []
}
]
}
],
"variable": [
{
"key": "token",
"value": ""
}
]
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化