diff --git a/网培.apifox.json b/网培.apifox.json new file mode 100644 index 0000000..f1ab534 --- /dev/null +++ b/网培.apifox.json @@ -0,0 +1,1920 @@ +{ + "apifoxProject": "1.0.0", + "info": { + "name": "网培", + "description": "", + "mockRule": { "rules": [], "enableSystemRule": true } + }, + "responseCollection": [], + "apiCollection": [ + { + "name": "根目录", + "parentId": 0, + "serverId": "", + "description": "", + "preProcessors": [ + { "id": "inheritProcessors", "type": "inheritProcessors", "data": {} } + ], + "postProcessors": [ + { "id": "inheritProcessors", "type": "inheritProcessors", "data": {} } + ], + "inheritPostProcessors": {}, + "inheritPreProcessors": {}, + "auth": {}, + "identityPattern": { + "httpApi": { "type": "methodAndPath", "bodyType": "", "fields": [] } + }, + "items": [ + { + "name": "会员财务", + "parentId": 0, + "serverId": "", + "description": "", + "preProcessors": [ + { + "id": "inheritProcessors", + "type": "inheritProcessors", + "data": {} + } + ], + "postProcessors": [ + { + "id": "inheritProcessors", + "type": "inheritProcessors", + "data": {} + } + ], + "inheritPostProcessors": {}, + "inheritPreProcessors": {}, + "auth": {}, + "identityPattern": { + "httpApi": { "type": "inherit", "bodyType": "", "fields": [] } + }, + "items": [ + { + "name": "充值积分", + "api": { + "id": "62108379", + "method": "post", + "path": "/app/index.php", + "parameters": { + "query": [ + { + "name": "i", + "required": true, + "description": "平台ID (公众号或小程序的id)", + "id": "uhKkRyB9J0", + "type": "string", + "example": "1" + }, + { + "name": "c", + "required": true, + "description": "", + "id": "7J8qp2lK2b", + "type": "string", + "example": "entry" + }, + { + "name": "m", + "required": true, + "description": "", + "id": "1g7nXZS24n", + "type": "string", + "example": "ewei_shopv2" + }, + { + "name": "do", + "required": true, + "description": "", + "id": "RDrDHyTudv", + "type": "string", + "example": "mobile" + }, + { + "name": "r", + "required": true, + "description": "充值积分", + "id": "C4slHdI75N", + "type": "string", + "example": "open_api.member.finance.SendCredit" + } + ] + }, + "auth": {}, + "commonParameters": { + "query": [], + "body": [], + "cookie": [], + "header": [] + }, + "responses": [ + { + "id": "158359015", + "name": "成功", + "code": 200, + "contentType": "json", + "jsonSchema": { + "type": "object", + "properties": { "error": { "type": "integer" } }, + "required": ["error"], + "x-apifox-orders": ["error"] + } + } + ], + "responseExamples": [], + "requestBody": { + "type": "multipart/form-data", + "parameters": [ + { + "required": true, + "description": "会员ID", + "type": "string", + "name": "member_id", + "id": "Fs0R8T1YAm", + "example": "1" + }, + { + "required": true, + "description": "充值积分数量", + "type": "string", + "name": "num", + "id": "zRibTufiYJ", + "example": "2" + }, + { + "required": true, + "description": "充值备注", + "type": "string", + "name": "remark", + "id": "Az6q7FjwT2", + "example": "接口充值" + }, + { + "required": true, + "description": "api key", + "type": "string", + "name": "api_key", + "id": "o4WoYDemaA", + "example": "V3mPjVV9VNPN9e4nd0IL31EVgiVO44Jo" + } + ] + }, + "description": "", + "tags": [], + "status": "released", + "serverId": "", + "operationId": "", + "sourceUrl": "", + "ordering": 10, + "cases": [], + "mocks": [], + "customApiFields": "{}", + "advancedSettings": {}, + "mockScript": {}, + "codeSamples": [], + "preProcessors": [], + "postProcessors": [], + "inheritPostProcessors": {}, + "inheritPreProcessors": {} + } + }, + { + "name": "充值余额", + "api": { + "id": "62108413", + "method": "post", + "path": "/app/index.php", + "parameters": { + "query": [ + { + "name": "i", + "required": true, + "description": "平台ID (公众号或小程序的id)", + "id": "uhKkRyB9J0", + "type": "string", + "example": "1" + }, + { + "name": "c", + "required": true, + "description": "", + "id": "7J8qp2lK2b", + "type": "string", + "example": "entry" + }, + { + "name": "m", + "required": true, + "description": "", + "id": "1g7nXZS24n", + "type": "string", + "example": "ewei_shopv2" + }, + { + "name": "do", + "required": true, + "description": "", + "id": "RDrDHyTudv", + "type": "string", + "example": "mobile" + }, + { + "name": "r", + "required": true, + "description": "充值余额", + "id": "C4slHdI75N", + "type": "string", + "example": "open_api.member.finance.sendBalance" + } + ] + }, + "auth": {}, + "commonParameters": { + "query": [], + "body": [], + "cookie": [], + "header": [] + }, + "responses": [ + { + "id": "158359079", + "name": "成功", + "code": 200, + "contentType": "json", + "jsonSchema": { + "type": "object", + "properties": { "error": { "type": "integer" } }, + "required": ["error"], + "x-apifox-orders": ["error"] + } + } + ], + "responseExamples": [], + "requestBody": { + "type": "multipart/form-data", + "parameters": [ + { + "required": true, + "description": "会员ID", + "type": "string", + "name": "member_id", + "id": "Fs0R8T1YAm", + "example": "1" + }, + { + "required": true, + "description": "充值金额", + "type": "string", + "name": "num", + "id": "zRibTufiYJ", + "example": "2" + }, + { + "required": true, + "description": "充值备注", + "type": "string", + "name": "remark", + "id": "Az6q7FjwT2", + "example": "接口充值" + }, + { + "required": true, + "description": "api key", + "type": "string", + "name": "api_key", + "id": "o4WoYDemaA", + "example": "V3mPjVV9VNPN9e4nd0IL31EVgiVO44Jo" + } + ] + }, + "description": "", + "tags": [], + "status": "released", + "serverId": "", + "operationId": "", + "sourceUrl": "", + "ordering": 16, + "cases": [], + "mocks": [], + "customApiFields": "{}", + "advancedSettings": {}, + "mockScript": {}, + "codeSamples": [], + "preProcessors": [], + "postProcessors": [], + "inheritPostProcessors": {}, + "inheritPreProcessors": {} + } + }, + { + "name": "open_id获取用户id", + "api": { + "id": "62108417", + "method": "post", + "path": "/app/index.php", + "parameters": { + "query": [ + { + "name": "i", + "required": true, + "description": "平台ID (公众号或小程序的id)", + "id": "uhKkRyB9J0", + "type": "string", + "example": "1" + }, + { + "name": "c", + "required": true, + "description": "", + "id": "7J8qp2lK2b", + "type": "string", + "example": "entry" + }, + { + "name": "m", + "required": true, + "description": "", + "id": "1g7nXZS24n", + "type": "string", + "example": "ewei_shopv2" + }, + { + "name": "do", + "required": true, + "description": "", + "id": "RDrDHyTudv", + "type": "string", + "example": "mobile" + }, + { + "name": "r", + "required": true, + "description": "", + "id": "C4slHdI75N", + "type": "string", + "example": "open_api.member.detail" + } + ] + }, + "auth": {}, + "commonParameters": { + "query": [], + "body": [], + "cookie": [], + "header": [] + }, + "responses": [ + { + "id": "158359083", + "name": "成功", + "code": 200, + "contentType": "json", + "jsonSchema": { + "type": "object", + "properties": { "error": { "type": "integer" } }, + "required": ["error"], + "x-apifox-orders": ["error"] + } + } + ], + "responseExamples": [], + "requestBody": { + "type": "multipart/form-data", + "parameters": [ + { + "required": true, + "description": "会员ID", + "type": "string", + "name": "openid", + "id": "Fs0R8T1YAm", + "example": "sns_wa_oDC-U5IstQFmFy-EFfA_3n7Fh3KY" + }, + { + "required": true, + "description": "api key", + "type": "string", + "name": "api_key", + "id": "o4WoYDemaA", + "example": "V3mPjVV9VNPN9e4nd0IL31EVgiVO44Jo" + } + ] + }, + "description": "", + "tags": [], + "status": "released", + "serverId": "", + "operationId": "", + "sourceUrl": "", + "ordering": 22, + "cases": [], + "mocks": [], + "customApiFields": "{}", + "advancedSettings": {}, + "mockScript": {}, + "codeSamples": [], + "preProcessors": [], + "postProcessors": [], + "inheritPostProcessors": {}, + "inheritPreProcessors": {} + } + }, + { + "name": "创建会员", + "api": { + "id": "62108419", + "method": "post", + "path": "/app/index.php", + "parameters": { + "query": [ + { + "name": "i", + "required": true, + "description": "平台ID (公众号或小程序的id)", + "id": "uhKkRyB9J0", + "type": "string", + "example": "1" + }, + { + "name": "c", + "required": true, + "description": "", + "id": "7J8qp2lK2b", + "type": "string", + "example": "entry" + }, + { + "name": "m", + "required": true, + "description": "", + "id": "1g7nXZS24n", + "type": "string", + "example": "ewei_shopv2" + }, + { + "name": "do", + "required": true, + "description": "", + "id": "RDrDHyTudv", + "type": "string", + "example": "mobile" + }, + { + "name": "r", + "required": true, + "description": "", + "id": "C4slHdI75N", + "type": "string", + "example": "open_api.member.detail.checkByOpenid" + } + ] + }, + "auth": {}, + "commonParameters": { + "query": [], + "body": [], + "cookie": [], + "header": [] + }, + "responses": [ + { + "id": "158359086", + "name": "成功", + "code": 200, + "contentType": "json", + "jsonSchema": { + "type": "object", + "properties": { "error": { "type": "integer" } }, + "required": ["error"], + "x-apifox-orders": ["error"] + } + } + ], + "responseExamples": [], + "requestBody": { + "type": "multipart/form-data", + "parameters": [ + { + "required": true, + "description": "会员ID", + "type": "string", + "name": "openid", + "id": "Fs0R8T1YAm", + "example": "sns_wa_oDC-U5IstQFmFy-EFfA_3n7Fh3KY" + }, + { + "required": true, + "description": "头像图片的url", + "type": "string", + "name": "avatar", + "id": "SkuQ5pS4xf", + "example": "https://we.cnp5.cn/attachment/images/1/2023/02/sgpPC2G4dEj6YvsMyMQ6T2eVysTDVm.jpeg" + }, + { + "required": true, + "description": "", + "type": "string", + "name": "nickname", + "id": "QGAsaOB0Lc", + "example": "昵称" + }, + { + "required": false, + "description": "统一id 具体查看微信文档", + "type": "string", + "name": "unionid", + "id": "Y6tmW7RDAZ", + "example": "" + }, + { + "required": false, + "description": "", + "type": "string", + "name": "province", + "id": "6UJslkMZ8n", + "example": "山东省" + }, + { + "required": false, + "description": "", + "type": "string", + "name": "city", + "id": "8GIYiQpp4A", + "example": "临沂市" + }, + { + "required": true, + "description": "api key", + "type": "string", + "name": "api_key", + "id": "o4WoYDemaA", + "example": "V3mPjVV9VNPN9e4nd0IL31EVgiVO44Jo" + } + ] + }, + "description": "重复的openid会返回用户的id并不会再次添加用户", + "tags": [], + "status": "released", + "serverId": "", + "operationId": "", + "sourceUrl": "", + "ordering": 28, + "cases": [], + "mocks": [], + "customApiFields": "{}", + "advancedSettings": {}, + "mockScript": {}, + "codeSamples": [], + "preProcessors": [], + "postProcessors": [], + "inheritPostProcessors": {}, + "inheritPreProcessors": {} + } + }, + { + "name": "发送优惠券", + "api": { + "id": "62371315", + "method": "post", + "path": "/app/index.php", + "parameters": { + "query": [ + { + "name": "i", + "required": true, + "description": "平台ID (公众号或小程序的id)", + "id": "uhKkRyB9J0", + "type": "string", + "example": "1" + }, + { + "name": "c", + "required": true, + "description": "", + "id": "7J8qp2lK2b", + "type": "string", + "example": "entry" + }, + { + "name": "m", + "required": true, + "description": "", + "id": "1g7nXZS24n", + "type": "string", + "example": "ewei_shopv2" + }, + { + "name": "do", + "required": true, + "description": "", + "id": "RDrDHyTudv", + "type": "string", + "example": "mobile" + }, + { + "name": "r", + "required": true, + "description": "", + "id": "C4slHdI75N", + "type": "string", + "example": "open_api.member.coupon.send" + } + ] + }, + "auth": {}, + "commonParameters": { + "query": [], + "body": [], + "cookie": [], + "header": [] + }, + "responses": [ + { + "id": "159035087", + "name": "成功", + "code": 200, + "contentType": "json", + "jsonSchema": { + "type": "object", + "properties": { "error": { "type": "integer" } }, + "required": ["error"], + "x-apifox-orders": ["error"] + } + } + ], + "responseExamples": [], + "requestBody": { + "type": "multipart/form-data", + "parameters": [ + { + "required": true, + "description": "会员ID", + "type": "string", + "name": "member_id", + "id": "Fs0R8T1YAm", + "example": "1" + }, + { + "required": true, + "description": "优惠券ID 多个用英文逗号分割", + "type": "string", + "name": "coupon_id", + "id": "SkuQ5pS4xf", + "example": "1,2" + }, + { + "required": true, + "description": "api key", + "type": "string", + "name": "api_key", + "id": "o4WoYDemaA", + "example": "V3mPjVV9VNPN9e4nd0IL31EVgiVO44Jo" + } + ] + }, + "description": "先指定的用户发送优惠券", + "tags": [], + "status": "released", + "serverId": "", + "operationId": "", + "sourceUrl": "", + "ordering": 34, + "cases": [], + "mocks": [], + "customApiFields": "{}", + "advancedSettings": {}, + "mockScript": {}, + "codeSamples": [], + "preProcessors": [], + "postProcessors": [], + "inheritPostProcessors": {}, + "inheritPreProcessors": {} + } + } + ] + }, + { + "name": "优惠券", + "parentId": 0, + "serverId": "", + "description": "", + "preProcessors": [ + { + "id": "inheritProcessors", + "type": "inheritProcessors", + "data": {} + } + ], + "postProcessors": [ + { + "id": "inheritProcessors", + "type": "inheritProcessors", + "data": {} + } + ], + "inheritPostProcessors": {}, + "inheritPreProcessors": {}, + "auth": {}, + "identityPattern": { + "httpApi": { "type": "inherit", "bodyType": "", "fields": [] } + }, + "items": [ + { + "name": "优惠券详情", + "api": { + "id": "62373869", + "method": "post", + "path": "/app/index.php", + "parameters": { + "query": [ + { + "name": "i", + "required": true, + "description": "平台ID (公众号或小程序的id)", + "id": "uhKkRyB9J0", + "type": "string", + "example": "1" + }, + { + "name": "c", + "required": true, + "description": "", + "id": "7J8qp2lK2b", + "type": "string", + "example": "entry" + }, + { + "name": "m", + "required": true, + "description": "", + "id": "1g7nXZS24n", + "type": "string", + "example": "ewei_shopv2" + }, + { + "name": "do", + "required": true, + "description": "", + "id": "RDrDHyTudv", + "type": "string", + "example": "mobile" + }, + { + "name": "r", + "required": true, + "description": "", + "id": "C4slHdI75N", + "type": "string", + "example": "open_api.coupon.detail.get" + } + ] + }, + "auth": {}, + "commonParameters": { + "query": [], + "body": [], + "cookie": [], + "header": [] + }, + "responses": [ + { + "id": "159042783", + "name": "成功", + "code": 200, + "contentType": "json", + "jsonSchema": { + "type": "object", + "properties": { "error": { "type": "integer" } }, + "required": ["error"], + "x-apifox-orders": ["error"] + } + } + ], + "responseExamples": [], + "requestBody": { + "type": "multipart/form-data", + "parameters": [ + { + "required": true, + "description": "优惠券ID", + "type": "string", + "name": "coupon_id", + "id": "SkuQ5pS4xf", + "example": "1" + }, + { + "required": true, + "description": "api key", + "type": "string", + "name": "api_key", + "id": "o4WoYDemaA", + "example": "V3mPjVV9VNPN9e4nd0IL31EVgiVO44Jo" + } + ] + }, + "description": "先指定的用户发送优惠券", + "tags": [], + "status": "released", + "serverId": "", + "operationId": "", + "sourceUrl": "", + "ordering": 40, + "cases": [], + "mocks": [], + "customApiFields": "{}", + "advancedSettings": {}, + "mockScript": {}, + "codeSamples": [], + "preProcessors": [], + "postProcessors": [], + "inheritPostProcessors": {}, + "inheritPreProcessors": {} + } + }, + { + "name": "优惠券列表", + "api": { + "id": "62374125", + "method": "post", + "path": "/app/index.php", + "parameters": { + "query": [ + { + "name": "i", + "required": true, + "description": "平台ID (公众号或小程序的id)", + "id": "uhKkRyB9J0", + "type": "string", + "example": "1" + }, + { + "name": "c", + "required": true, + "description": "", + "id": "7J8qp2lK2b", + "type": "string", + "example": "entry" + }, + { + "name": "m", + "required": true, + "description": "", + "id": "1g7nXZS24n", + "type": "string", + "example": "ewei_shopv2" + }, + { + "name": "do", + "required": true, + "description": "", + "id": "RDrDHyTudv", + "type": "string", + "example": "mobile" + }, + { + "name": "r", + "required": true, + "description": "", + "id": "C4slHdI75N", + "type": "string", + "example": "open_api.coupon.list" + } + ] + }, + "auth": {}, + "commonParameters": { + "query": [], + "body": [], + "cookie": [], + "header": [] + }, + "responses": [ + { + "id": "159043283", + "name": "成功", + "code": 200, + "contentType": "json", + "jsonSchema": { + "type": "object", + "properties": { "error": { "type": "integer" } }, + "required": ["error"], + "x-apifox-orders": ["error"] + } + } + ], + "responseExamples": [], + "requestBody": { + "type": "multipart/form-data", + "parameters": [ + { + "required": true, + "description": "", + "type": "string", + "name": "page", + "id": "SkuQ5pS4xf", + "example": "1" + }, + { + "required": true, + "description": "", + "type": "string", + "name": "page_size", + "id": "EcdC3Kld11", + "example": "10" + }, + { + "required": true, + "description": "优惠券名称关键词", + "type": "string", + "name": "keywords", + "id": "bTf9BxD8LS", + "example": "测试" + }, + { + "required": true, + "description": "api key", + "type": "string", + "name": "api_key", + "id": "o4WoYDemaA", + "example": "V3mPjVV9VNPN9e4nd0IL31EVgiVO44Jo" + } + ] + }, + "description": "先指定的用户发送优惠券", + "tags": [], + "status": "released", + "serverId": "", + "operationId": "", + "sourceUrl": "", + "ordering": 46, + "cases": [], + "mocks": [], + "customApiFields": "{}", + "advancedSettings": {}, + "mockScript": {}, + "codeSamples": [], + "preProcessors": [], + "postProcessors": [], + "inheritPostProcessors": {}, + "inheritPreProcessors": {} + } + } + ] + }, + { + "name": "订单", + "parentId": 0, + "serverId": "", + "description": "", + "preProcessors": [ + { + "id": "inheritProcessors", + "type": "inheritProcessors", + "data": {} + } + ], + "postProcessors": [ + { + "id": "inheritProcessors", + "type": "inheritProcessors", + "data": {} + } + ], + "inheritPostProcessors": {}, + "inheritPreProcessors": {}, + "auth": {}, + "identityPattern": { + "httpApi": { "type": "inherit", "bodyType": "", "fields": [] } + }, + "items": [ + { + "name": "订单列表", + "api": { + "id": "62378836", + "method": "post", + "path": "/app/index.php", + "parameters": { + "query": [ + { + "name": "i", + "required": true, + "description": "平台ID (公众号或小程序的id)", + "id": "uhKkRyB9J0", + "type": "string", + "example": "1" + }, + { + "name": "c", + "required": true, + "description": "", + "id": "7J8qp2lK2b", + "type": "string", + "example": "entry" + }, + { + "name": "m", + "required": true, + "description": "", + "id": "1g7nXZS24n", + "type": "string", + "example": "ewei_shopv2" + }, + { + "name": "do", + "required": true, + "description": "", + "id": "RDrDHyTudv", + "type": "string", + "example": "mobile" + }, + { + "name": "r", + "required": true, + "description": "", + "id": "C4slHdI75N", + "type": "string", + "example": "open_api.order.detail.get_list" + } + ] + }, + "auth": {}, + "commonParameters": { + "query": [], + "body": [], + "cookie": [], + "header": [] + }, + "responses": [ + { + "id": "159050006", + "name": "成功", + "code": 200, + "contentType": "json", + "jsonSchema": { + "type": "object", + "properties": { "error": { "type": "integer" } }, + "required": ["error"], + "x-apifox-orders": ["error"] + } + } + ], + "responseExamples": [], + "requestBody": { + "type": "multipart/form-data", + "parameters": [ + { + "required": false, + "description": "", + "type": "string", + "name": "page", + "id": "SkuQ5pS4xf", + "example": "1" + }, + { + "required": false, + "description": "", + "type": "string", + "name": "page_size", + "id": "EcdC3Kld11", + "example": "10" + }, + { + "required": true, + "description": "只获取某状态订单 0=待付款 1=待发货 2=待收货 3=已完成 -1=已关闭 为空=全部", + "type": "string", + "name": "status", + "id": "SbEMIn0fA1", + "example": "0" + }, + { + "required": false, + "description": "用户openid", + "type": "string", + "name": "openid", + "id": "bTf9BxD8LS", + "example": "sns_wa_oDC-U5IstQFmFy-EFfA_3n7Fh3KY" + }, + { + "required": false, + "description": "用户id 和openid提供一个即可", + "type": "string", + "name": "member_id", + "id": "GsYgg4WAhj", + "example": "1" + }, + { + "required": true, + "description": "api key", + "type": "string", + "name": "api_key", + "id": "o4WoYDemaA", + "example": "V3mPjVV9VNPN9e4nd0IL31EVgiVO44Jo" + } + ] + }, + "description": "", + "tags": [], + "status": "released", + "serverId": "", + "operationId": "", + "sourceUrl": "", + "ordering": 52, + "cases": [], + "mocks": [], + "customApiFields": "{}", + "advancedSettings": {}, + "mockScript": {}, + "codeSamples": [], + "preProcessors": [], + "postProcessors": [], + "inheritPostProcessors": {}, + "inheritPreProcessors": {} + } + }, + { + "name": "订单详情", + "api": { + "id": "62390246", + "method": "post", + "path": "/app/index.php", + "parameters": { + "query": [ + { + "name": "i", + "required": true, + "description": "平台ID (公众号或小程序的id)", + "id": "uhKkRyB9J0", + "type": "string", + "example": "1" + }, + { + "name": "c", + "required": true, + "description": "", + "id": "7J8qp2lK2b", + "type": "string", + "example": "entry" + }, + { + "name": "m", + "required": true, + "description": "", + "id": "1g7nXZS24n", + "type": "string", + "example": "ewei_shopv2" + }, + { + "name": "do", + "required": true, + "description": "", + "id": "RDrDHyTudv", + "type": "string", + "example": "mobile" + }, + { + "name": "r", + "required": true, + "description": "", + "id": "C4slHdI75N", + "type": "string", + "example": "open_api.order.detail.detail" + } + ] + }, + "auth": {}, + "commonParameters": { + "query": [], + "body": [], + "cookie": [], + "header": [] + }, + "responses": [ + { + "id": "159077261", + "name": "成功", + "code": 200, + "contentType": "json", + "jsonSchema": { + "type": "object", + "properties": { "error": { "type": "integer" } }, + "required": ["error"], + "x-apifox-orders": ["error"] + } + } + ], + "responseExamples": [], + "requestBody": { + "type": "multipart/form-data", + "parameters": [ + { + "required": false, + "description": "订单号order_sn和order_id提供一个即可", + "type": "string", + "name": "order_sn", + "id": "KC73bBGHTO", + "example": "SH20230212234420138846" + }, + { + "required": false, + "description": "", + "type": "string", + "name": "order_id", + "id": "nrd8MCwgiH", + "example": "3" + }, + { + "required": true, + "description": "api key", + "type": "string", + "name": "api_key", + "id": "o4WoYDemaA", + "example": "V3mPjVV9VNPN9e4nd0IL31EVgiVO44Jo" + } + ] + }, + "description": "", + "tags": [], + "status": "released", + "serverId": "", + "operationId": "", + "sourceUrl": "", + "ordering": 58, + "cases": [], + "mocks": [], + "customApiFields": "{}", + "advancedSettings": {}, + "mockScript": {}, + "codeSamples": [], + "preProcessors": [], + "postProcessors": [], + "inheritPostProcessors": {}, + "inheritPreProcessors": {} + } + }, + { + "name": "删除订单", + "api": { + "id": "62390485", + "method": "post", + "path": "/app/index.php", + "parameters": { + "query": [ + { + "name": "i", + "required": true, + "description": "平台ID (公众号或小程序的id)", + "id": "uhKkRyB9J0", + "type": "string", + "example": "1" + }, + { + "name": "c", + "required": true, + "description": "", + "id": "7J8qp2lK2b", + "type": "string", + "example": "entry" + }, + { + "name": "m", + "required": true, + "description": "", + "id": "1g7nXZS24n", + "type": "string", + "example": "ewei_shopv2" + }, + { + "name": "do", + "required": true, + "description": "", + "id": "RDrDHyTudv", + "type": "string", + "example": "mobile" + }, + { + "name": "r", + "required": true, + "description": "", + "id": "C4slHdI75N", + "type": "string", + "example": "open_api.order.detail.delete" + } + ] + }, + "auth": {}, + "commonParameters": { + "query": [], + "body": [], + "cookie": [], + "header": [] + }, + "responses": [ + { + "id": "159077552", + "name": "成功", + "code": 200, + "contentType": "json", + "jsonSchema": { + "type": "object", + "properties": { "error": { "type": "integer" } }, + "required": ["error"], + "x-apifox-orders": ["error"] + } + } + ], + "responseExamples": [], + "requestBody": { + "type": "multipart/form-data", + "parameters": [ + { + "required": false, + "description": "订单号order_sn和order_id提供一个即可", + "type": "string", + "name": "order_sn", + "id": "KC73bBGHTO", + "example": "SH20230212234420138846" + }, + { + "required": false, + "description": "", + "type": "string", + "name": "order_id", + "id": "GW9P7iIGcY", + "example": "3" + }, + { + "required": true, + "description": "api key", + "type": "string", + "name": "api_key", + "id": "o4WoYDemaA", + "example": "V3mPjVV9VNPN9e4nd0IL31EVgiVO44Jo" + } + ] + }, + "description": "", + "tags": [], + "status": "released", + "serverId": "", + "operationId": "", + "sourceUrl": "", + "ordering": 64, + "cases": [], + "mocks": [], + "customApiFields": "{}", + "advancedSettings": {}, + "mockScript": {}, + "codeSamples": [], + "preProcessors": [], + "postProcessors": [], + "inheritPostProcessors": {}, + "inheritPreProcessors": {} + } + }, + { + "name": "订单后台付款", + "api": { + "id": "62390605", + "method": "post", + "path": "/app/index.php", + "parameters": { + "query": [ + { + "name": "i", + "required": true, + "description": "平台ID (公众号或小程序的id)", + "id": "uhKkRyB9J0", + "type": "string", + "example": "1" + }, + { + "name": "c", + "required": true, + "description": "", + "id": "7J8qp2lK2b", + "type": "string", + "example": "entry" + }, + { + "name": "m", + "required": true, + "description": "", + "id": "1g7nXZS24n", + "type": "string", + "example": "ewei_shopv2" + }, + { + "name": "do", + "required": true, + "description": "", + "id": "RDrDHyTudv", + "type": "string", + "example": "mobile" + }, + { + "name": "r", + "required": true, + "description": "", + "id": "C4slHdI75N", + "type": "string", + "example": "open_api.order.detail.pay" + } + ] + }, + "auth": {}, + "commonParameters": { + "query": [], + "body": [], + "cookie": [], + "header": [] + }, + "responses": [ + { + "id": "159077702", + "name": "成功", + "code": 200, + "contentType": "json", + "jsonSchema": { + "type": "object", + "properties": { "error": { "type": "integer" } }, + "required": ["error"], + "x-apifox-orders": ["error"] + } + } + ], + "responseExamples": [], + "requestBody": { + "type": "multipart/form-data", + "parameters": [ + { + "required": false, + "description": "订单号order_sn和order_id提供一个即可", + "type": "string", + "name": "order_sn", + "id": "KC73bBGHTO", + "example": "SH20230212234420138846" + }, + { + "required": false, + "description": "", + "type": "string", + "name": "order_id", + "id": "GW9P7iIGcY", + "example": "3" + }, + { + "required": true, + "description": "api key", + "type": "string", + "name": "api_key", + "id": "o4WoYDemaA", + "example": "V3mPjVV9VNPN9e4nd0IL31EVgiVO44Jo" + } + ] + }, + "description": "", + "tags": [], + "status": "released", + "serverId": "", + "operationId": "", + "sourceUrl": "", + "ordering": 70, + "cases": [], + "mocks": [], + "customApiFields": "{}", + "advancedSettings": {}, + "mockScript": {}, + "codeSamples": [], + "preProcessors": [], + "postProcessors": [], + "inheritPostProcessors": {}, + "inheritPreProcessors": {} + } + }, + { + "name": "关闭订单", + "api": { + "id": "62391134", + "method": "post", + "path": "/app/index.php", + "parameters": { + "query": [ + { + "name": "i", + "required": true, + "description": "平台ID (公众号或小程序的id)", + "id": "uhKkRyB9J0", + "type": "string", + "example": "1" + }, + { + "name": "c", + "required": true, + "description": "", + "id": "7J8qp2lK2b", + "type": "string", + "example": "entry" + }, + { + "name": "m", + "required": true, + "description": "", + "id": "1g7nXZS24n", + "type": "string", + "example": "ewei_shopv2" + }, + { + "name": "do", + "required": true, + "description": "", + "id": "RDrDHyTudv", + "type": "string", + "example": "mobile" + }, + { + "name": "r", + "required": true, + "description": "", + "id": "C4slHdI75N", + "type": "string", + "example": "open_api.order.detail.close" + } + ] + }, + "auth": {}, + "commonParameters": { + "query": [], + "body": [], + "cookie": [], + "header": [] + }, + "responses": [ + { + "id": "159079706", + "name": "成功", + "code": 200, + "contentType": "json", + "jsonSchema": { + "type": "object", + "properties": { "error": { "type": "integer" } }, + "required": ["error"], + "x-apifox-orders": ["error"] + } + } + ], + "responseExamples": [], + "requestBody": { + "type": "multipart/form-data", + "parameters": [ + { + "required": true, + "description": "订单号order_sn和order_id提供一个即可", + "type": "string", + "name": "order_sn", + "id": "KC73bBGHTO", + "example": "SH20230212234420138846" + }, + { + "required": false, + "description": "", + "type": "string", + "name": "order_id", + "id": "GW9P7iIGcY", + "example": "3" + }, + { + "required": true, + "description": "api key", + "type": "string", + "name": "api_key", + "id": "o4WoYDemaA", + "example": "V3mPjVV9VNPN9e4nd0IL31EVgiVO44Jo" + } + ] + }, + "description": "", + "tags": [], + "status": "released", + "serverId": "", + "operationId": "", + "sourceUrl": "", + "ordering": 76, + "cases": [], + "mocks": [], + "customApiFields": "{}", + "advancedSettings": {}, + "mockScript": {}, + "codeSamples": [], + "preProcessors": [], + "postProcessors": [], + "inheritPostProcessors": {}, + "inheritPreProcessors": {} + } + }, + { + "name": "订单取消付款", + "api": { + "id": "62391159", + "method": "post", + "path": "/app/index.php", + "parameters": { + "query": [ + { + "name": "i", + "required": true, + "description": "平台ID (公众号或小程序的id)", + "id": "uhKkRyB9J0", + "type": "string", + "example": "1" + }, + { + "name": "c", + "required": true, + "description": "", + "id": "7J8qp2lK2b", + "type": "string", + "example": "entry" + }, + { + "name": "m", + "required": true, + "description": "", + "id": "1g7nXZS24n", + "type": "string", + "example": "ewei_shopv2" + }, + { + "name": "do", + "required": true, + "description": "", + "id": "RDrDHyTudv", + "type": "string", + "example": "mobile" + }, + { + "name": "r", + "required": true, + "description": "", + "id": "C4slHdI75N", + "type": "string", + "example": "open_api.order.detail.paycancel" + } + ] + }, + "auth": {}, + "commonParameters": { + "query": [], + "body": [], + "cookie": [], + "header": [] + }, + "responses": [ + { + "id": "159079751", + "name": "成功", + "code": 200, + "contentType": "json", + "jsonSchema": { + "type": "object", + "properties": { "error": { "type": "integer" } }, + "required": ["error"], + "x-apifox-orders": ["error"] + } + } + ], + "responseExamples": [], + "requestBody": { + "type": "multipart/form-data", + "parameters": [ + { + "required": true, + "description": "订单号order_sn和order_id提供一个即可", + "type": "string", + "name": "order_sn", + "id": "KC73bBGHTO", + "example": "SH20230212234420138846" + }, + { + "required": false, + "description": "", + "type": "string", + "name": "order_id", + "id": "GW9P7iIGcY", + "example": "3" + }, + { + "required": true, + "description": "api key", + "type": "string", + "name": "api_key", + "id": "o4WoYDemaA", + "example": "V3mPjVV9VNPN9e4nd0IL31EVgiVO44Jo" + } + ] + }, + "description": "# 注意并不是退款 是已支付的订单改成未支付", + "tags": [], + "status": "released", + "serverId": "", + "operationId": "", + "sourceUrl": "", + "ordering": 82, + "cases": [], + "mocks": [], + "customApiFields": "{}", + "advancedSettings": {}, + "mockScript": {}, + "codeSamples": [], + "preProcessors": [], + "postProcessors": [], + "inheritPostProcessors": {}, + "inheritPreProcessors": {} + } + }, + { + "name": "订单发货", + "api": { + "id": "62391289", + "method": "post", + "path": "/app/index.php", + "parameters": { + "query": [ + { + "name": "i", + "required": true, + "description": "平台ID (公众号或小程序的id)", + "id": "uhKkRyB9J0", + "type": "string", + "example": "1" + }, + { + "name": "c", + "required": true, + "description": "", + "id": "7J8qp2lK2b", + "type": "string", + "example": "entry" + }, + { + "name": "m", + "required": true, + "description": "", + "id": "1g7nXZS24n", + "type": "string", + "example": "ewei_shopv2" + }, + { + "name": "do", + "required": true, + "description": "", + "id": "RDrDHyTudv", + "type": "string", + "example": "mobile" + }, + { + "name": "r", + "required": true, + "description": "", + "id": "C4slHdI75N", + "type": "string", + "example": "open_api.order.detail.send" + } + ] + }, + "auth": {}, + "commonParameters": { + "query": [], + "body": [], + "cookie": [], + "header": [] + }, + "responses": [ + { + "id": "159079967", + "name": "成功", + "code": 200, + "contentType": "json", + "jsonSchema": { + "type": "object", + "properties": { "error": { "type": "integer" } }, + "required": ["error"], + "x-apifox-orders": ["error"] + } + } + ], + "responseExamples": [], + "requestBody": { + "type": "multipart/form-data", + "parameters": [ + { + "required": false, + "description": "订单号order_sn和order_id提供一个即可", + "type": "string", + "name": "order_sn", + "id": "KC73bBGHTO", + "example": "SH20230212234420138846" + }, + { + "required": false, + "description": "", + "type": "string", + "name": "order_id", + "id": "GW9P7iIGcY", + "example": "3" + }, + { + "required": true, + "description": "api key", + "type": "string", + "name": "api_key", + "id": "o4WoYDemaA", + "example": "V3mPjVV9VNPN9e4nd0IL31EVgiVO44Jo" + } + ] + }, + "description": "# 注意同城配送订单不可发货", + "tags": [], + "status": "released", + "serverId": "", + "operationId": "", + "sourceUrl": "", + "ordering": 88, + "cases": [], + "mocks": [], + "customApiFields": "{}", + "advancedSettings": {}, + "mockScript": {}, + "codeSamples": [], + "preProcessors": [], + "postProcessors": [], + "inheritPostProcessors": {}, + "inheritPreProcessors": {} + } + } + ] + } + ] + } + ], + "socketCollection": [], + "docCollection": [ + { + "name": "根目录", + "children": [ + { "name": "会员财务", "children": [], "items": [] }, + { "name": "优惠券", "children": [], "items": [] }, + { "name": "订单", "children": [], "items": [] } + ], + "items": [ + { + "id": 2047614, + "name": "接口签名方法", + "content": "## 接口签名方法\n1. 所有post参数按照key升序拼接为queryString\n2. 对(时间戳+api_key+queryString)进行base64编码\n3. 对(queryString+api_key+第2步的base64文本+时间戳)进行md5得到sign\n4. 向请求参数里加入sign(sign=sign)\n\n## 示例\n1. 拼接queryString\n```api_key=V3mPjVV9VNPN9e4nd0IL31EVgiVO44Jo&member_id=1&num=2&remark=充值积分×tamp=1676328795```\n2. ```1676328795V3mPjVV9VNPN9e4nd0IL31EVgiVO44Joapi_key=V3mPjVV9VNPN9e4nd0IL31EVgiVO44Jo&member_id=1&num=2&remark=充值积分×tamp=1676328795```\n拼接后base64编码后得到\n```MTY3NjMyODc5NVYzbVBqVlY5Vk5QTjllNG5kMElMMzFFVmdpVk80NEpvYXBpX2tleT1WM21QalZWOVZOUE45ZTRuZDBJTDMxRVZnaVZPNDRKbyZtZW1iZXJfaWQ9MSZudW09MiZyZW1hcms95YWF5YC856ev5YiGJnRpbWVzdGFtcD0xNjc2MzI4Nzk1```\n3. ```api_key=V3mPjVV9VNPN9e4nd0IL31EVgiVO44Jo&member_id=1&num=2&remark=充值积分×tamp=1676328795V3mPjVV9VNPN9e4nd0IL31EVgiVO44JoMTY3NjMyODc5NVYzbVBqVlY5Vk5QTjllNG5kMElMMzFFVmdpVk80NEpvYXBpX2tleT1WM21QalZWOVZOUE45ZTRuZDBJTDMxRVZnaVZPNDRKbyZtZW1iZXJfaWQ9MSZudW09MiZyZW1hcms95YWF5YC856ev5YiGJnRpbWVzdGFtcD0xNjc2MzI4Nzk11676328795```\nMD5得到\n`57422c93a6fdf96a66eabc0535c44b5e`\n\n## php验签函数\n```\n /**\n * 请求验证签名\n */\n private function checkRequestSign()\n {\n $timestamp = isset($this->requestParams[\"timestamp\"]) ? $this->requestParams[\"timestamp\"] : false;\n $requestSign = isset($this->requestParams[\"sign\"]) ? $this->requestParams[\"sign\"] : false;\n if (empty($timestamp) || empty($requestSign)) {\n return $this->error(\"参数错误 sign不能为空\", -1, true);\n }\n unset($this->requestParams[\"sign\"]);\n ksort($this->requestParams);\n $queryString = \"\";\n foreach ($this->requestParams as $key => $value) {\n $queryString .= \"&\" . $key . \"=\" . $value;\n }\n $queryString = substr($queryString, 1);\n $sign = md5($queryString . $this->apiKey . base64_encode($timestamp . $this->apiKey . $queryString) . $timestamp);\n if ($sign != $requestSign) {\n return $this->error(\"参数错误 sign无效\", -1, true);\n }\n if ($timestamp + $this->requestSignExpireTime <= time()) {\n return $this->error(\"参数错误 sign失效\", -1, true);\n }\n }\n```", + "folderId": 0 + } + ] + } + ], + "schemaCollection": [], + "apiTestCaseCollection": [ + { "name": "默认目录", "children": [], "items": [] } + ], + "apiTestSuiteCollection": [], + "environments": [], + "commonScripts": [], + "databaseConnections": [], + "globalVariables": [ + { + "variables": [ + { "name": "api_key", "value": "V3mPjVV9VNPN9e4nd0IL31EVgiVO44Jo" } + ], + "id": "2296038" + } + ], + "commonParameters": null, + "projectSetting": { + "apiStatuses": ["developing", "testing", "released", "deprecated"], + "servers": [{ "id": "default", "name": "默认服务" }], + "preProcessors": [ + { + "type": "customScript", + "data": "// 获取预先设置为环境变量的 api_key\r\nlet api_key = pm.environment.get('api_key');\r\nconsole.log(api_key);\r\n// 存放所有需要用来签名的参数\r\nlet param = {};\r\n\r\n// 加入 query 参数\r\n//let queryParams = pm.request.url.query;\r\n// 获取10位时间戳\r\nvar times = Math.round(new Date().getTime() / 1000).toString();\r\n// queryParams.each(item => {\r\n// if (item.key == 'timestamp') { // 因为设置的全局参数,获取的时间戳有问题,所以这里重新定义时间戳\r\n// param[item.key] = times;\r\n// } else {\r\n// param[item.key] = item.value;\r\n// }\r\n// });\r\n\r\n// 加入 body 参数\r\nif (pm.request.body) {\r\n let formData;\r\n switch (pm.request.body.mode) {\r\n case 'formdata':\r\n formData = pm.request.body.formdata;\r\n break;\r\n default:\r\n break;\r\n }\r\n if (formData) {\r\n formData.each(item => {\r\n if (!item.disabled && item.value !== '') { // 启用且非空参数值的参数才参与签名\r\n if (item.key != 'r' && item.key != 'c' && item.key != 'i' && item.key != 'm' && item.key != 'do') {\r\n param[item.key] = item.value;\r\n }\r\n }\r\n });\r\n }\r\n}\r\n\r\nparam['timestamp']=times;\r\n// 取 key\r\nlet keys = [];\r\nfor (let okey in param) {\r\n // 注意这里,要剔除掉 sign 参数本身\r\n if (okey !== 'sign') {\r\n keys.push(okey);\r\n }\r\n}\r\n\r\n// 参数名 ASCII 码从小到大排序(字典序)\r\nkeys.sort();\r\n\r\n// 转成键值对\r\nlet paramPair = [];\r\nfor (let i = 0, len = keys.length; i < len; i++) {\r\n let k = keys[i];\r\n if (k != 'r' && k != 'c' && k != 'i' && k != 'm' && k != 'do') {\r\n paramPair.push(k + '=' + param[k]) // urlencode 编码\r\n }\r\n}\r\n\r\n// 最后加上 key\r\n//paramPair.push(key);\r\n\r\n// 拼接\r\nlet stringSignTemp = paramPair.join('&');\r\n//stringSignTemp = stringSignTemp +'×tamp='+times;\r\nconsole.log(stringSignTemp);\r\nlet tt = CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(times + api_key + stringSignTemp));\r\n//let tt = btoa(times + api_key + stringSignTemp+'×tamp='+times);\r\nconsole.log(times + api_key + stringSignTemp);\r\nconsole.log(stringSignTemp + api_key + tt + times);\r\nlet sign = CryptoJS.MD5(stringSignTemp + api_key + tt + times).toString();\r\nconsole.log(sign);\r\npm.request.body.formdata.upsert({\r\n key: 'sign',\r\n value: sign,\r\n});\r\npm.request.body.formdata.upsert({\r\n key: 'timestamp',\r\n value: times,\r\n});\r\n\r\n\r\nconsole.log(pm.request.body.formdata);", + "id": "84FCKIjH6qbFlKTwXI25JxCp6eA3RX0o", + "defaultEnable": true + } + ], + "postProcessors": [], + "auth": {}, + "initialDisabledMockIds": [], + "mockSettings": {}, + "gateway": [], + "advancedSettings": {}, + "language": "zh-CN", + "id": "1794016", + "cloudMock": { + "security": "free", + "enable": false, + "tokenKey": "apifoxToken" + } + } +}