runner-runtime 1.0.89 → 1.0.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/events/api.js +1 -12
- package/index.js +0 -1
- package/package.json +1 -1
- package/tmp/request.js +153 -186
package/events/api.js
CHANGED
|
@@ -2332,19 +2332,8 @@ module.exports = (event, option, callback, eventRuntimeData, eventResultList) =>
|
|
|
2332
2332
|
})
|
|
2333
2333
|
}
|
|
2334
2334
|
},
|
|
2335
|
-
|
|
2336
|
-
// responseStart: (err, cursor, response, request, item, cookies, history) => {
|
|
2337
|
-
// if (_.includes(['get_parsed_request'], scene)) {
|
|
2338
|
-
// callback(generateHarFromRequest(request));
|
|
2339
|
-
// try {
|
|
2340
|
-
// run.abort();
|
|
2341
|
-
// } catch (e) { }
|
|
2342
|
-
// resolve();
|
|
2343
|
-
// }
|
|
2344
|
-
// },
|
|
2345
|
-
|
|
2346
2335
|
response: async (err, cursor, response, request, item, cookies, history) => {
|
|
2347
|
-
if (
|
|
2336
|
+
if (_.includes(['get_parsed_request'], scene)) {
|
|
2348
2337
|
callback(generateHarFromRequest(request));
|
|
2349
2338
|
try {
|
|
2350
2339
|
run.abort();
|
package/index.js
CHANGED
|
@@ -169,7 +169,6 @@ const request2HAR = (events, option) => {
|
|
|
169
169
|
if (_.isObject(event) && _.has(event, 'type')) {
|
|
170
170
|
try {
|
|
171
171
|
await executeEvent(event, _.assign(eventOptions, { scene: 'get_parsed_request' }), (data) => {
|
|
172
|
-
console.log(data,11111)
|
|
173
172
|
resolve(data)
|
|
174
173
|
}, eventRuntimeData, eventResultList);
|
|
175
174
|
} catch (e) {
|
package/package.json
CHANGED
package/tmp/request.js
CHANGED
|
@@ -70,31 +70,21 @@ module.exports = {
|
|
|
70
70
|
"sort": 1000,
|
|
71
71
|
"uri": ""
|
|
72
72
|
},
|
|
73
|
-
"
|
|
74
|
-
"server_id": "
|
|
75
|
-
"name": "
|
|
76
|
-
"sort":
|
|
77
|
-
"uri": ""
|
|
73
|
+
"48a5d65f5001000": {
|
|
74
|
+
"server_id": "48a5d65f5001000",
|
|
75
|
+
"name": "11111",
|
|
76
|
+
"sort": 2000,
|
|
77
|
+
"uri": "333333"
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
80
|
"environment": {
|
|
81
|
-
"
|
|
81
|
+
"body": "{\\n\\t\\t\\\"Accept\\\": \\\"*/*\\\",\\n\\t\\t\\\"Accept-Encoding\\\": \\\"gzip, deflate, br\\\",\\n\\t\\t\\\"Cache-Control\\\": \\\"no-cache\\\",\\n\\t\\t\\\"Connection\\\": \\\"Upgrade\\\",\\n\\t\\t\\\"User-Agent\\\": \\\"PostmanRuntime-ApipostRuntime/1.1.0\\\",\\n\\t\\t\\\"X-Real-Ip\\\": \\\"114.242.33.198\\\"\\n\\t}",
|
|
82
|
+
"key": "d5g4HFi3pllp7+Y8fhqFCQc0oKLaPUnLcJ25VKyNXoUccnEqIWzghedOVPEMJq+v2Vsm+iBAgpN4FiFVZd6vlzYCFa8j5UYScQxchJVj51LoNAvMWtHmnto2Dee4gdt+nJq4zLmV0pnQSzCRfbOsVMkMUev/7WLQSsmRHdXrRYg="
|
|
82
83
|
}
|
|
83
84
|
},
|
|
84
85
|
"cookies": {
|
|
85
86
|
"switch": 1,
|
|
86
87
|
"data": [
|
|
87
|
-
{
|
|
88
|
-
"key": "aliyungf_tc",
|
|
89
|
-
"value": "85bd313c10390304cae7a78e4abd631e8390c0eea16ce61202c2bea63ae72a2e",
|
|
90
|
-
"path": "/",
|
|
91
|
-
"httpOnly": true,
|
|
92
|
-
"creation": "2025-05-27T12:48:16.342Z",
|
|
93
|
-
"name": "aliyungf_tc",
|
|
94
|
-
"cookie_id": "3899fe6bfff00b",
|
|
95
|
-
"domain": "v.juhe.cn",
|
|
96
|
-
"project_id": "478597272401000"
|
|
97
|
-
},
|
|
98
88
|
{
|
|
99
89
|
"key": "liveCookie",
|
|
100
90
|
"value": "gin",
|
|
@@ -103,11 +93,11 @@ module.exports = {
|
|
|
103
93
|
"path": "/",
|
|
104
94
|
"secure": true,
|
|
105
95
|
"httpOnly": true,
|
|
106
|
-
"creation": "2025-06-12T13:
|
|
96
|
+
"creation": "2025-06-12T13:38:25.257Z",
|
|
107
97
|
"name": "liveCookie",
|
|
108
|
-
"cookie_id": "
|
|
109
|
-
"expires": "Thu, 12 Jun 2025 13:
|
|
110
|
-
"project_id": "
|
|
98
|
+
"cookie_id": "4eb892135403c",
|
|
99
|
+
"expires": "Thu, 12 Jun 2025 13:40:26 GMT",
|
|
100
|
+
"project_id": "484df1ca7801000"
|
|
111
101
|
},
|
|
112
102
|
{
|
|
113
103
|
"key": "loseCookie",
|
|
@@ -117,11 +107,98 @@ module.exports = {
|
|
|
117
107
|
"path": "/",
|
|
118
108
|
"secure": true,
|
|
119
109
|
"httpOnly": true,
|
|
120
|
-
"creation": "2025-06-12T13:
|
|
110
|
+
"creation": "2025-06-12T13:38:25.257Z",
|
|
121
111
|
"name": "loseCookie",
|
|
122
|
-
"cookie_id": "
|
|
123
|
-
"expires": "Thu, 12 Jun 2025 13:
|
|
124
|
-
"project_id": "
|
|
112
|
+
"cookie_id": "4eb892135403d",
|
|
113
|
+
"expires": "Thu, 12 Jun 2025 13:38:26 GMT",
|
|
114
|
+
"project_id": "484df1ca7801000"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"key": "BAIDUID",
|
|
118
|
+
"value": "EBA164FBD038F4C2154CD42FACAE147F:FG=1",
|
|
119
|
+
"expires": "Thu, 11 Jun 2026 07:35:19 GMT",
|
|
120
|
+
"maxAge": 31536000,
|
|
121
|
+
"domain": "baidu.com",
|
|
122
|
+
"path": "/",
|
|
123
|
+
"extensions": [
|
|
124
|
+
"version=1",
|
|
125
|
+
"comment=bd"
|
|
126
|
+
],
|
|
127
|
+
"creation": "2025-06-11T07:35:18.677Z",
|
|
128
|
+
"name": "BAIDUID",
|
|
129
|
+
"cookie_id": "52bb55df5400c",
|
|
130
|
+
"project_id": "484df1ca7801000"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"key": "BIDUPSID",
|
|
134
|
+
"value": "DDC8528023336C3EF1102309A658AD9C",
|
|
135
|
+
"expires": "Wed, 24 Jun 2093 10:20:48 GMT",
|
|
136
|
+
"maxAge": 2147483647,
|
|
137
|
+
"domain": "baidu.com",
|
|
138
|
+
"path": "/",
|
|
139
|
+
"creation": "2025-06-06T07:06:40.023Z",
|
|
140
|
+
"name": "BIDUPSID",
|
|
141
|
+
"cookie_id": "52bb55df5400d",
|
|
142
|
+
"project_id": "484df1ca7801000"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"key": "PSTM",
|
|
146
|
+
"value": "1749193599",
|
|
147
|
+
"expires": "Wed, 24 Jun 2093 10:20:48 GMT",
|
|
148
|
+
"maxAge": 2147483647,
|
|
149
|
+
"domain": "baidu.com",
|
|
150
|
+
"path": "/",
|
|
151
|
+
"creation": "2025-06-06T07:06:40.024Z",
|
|
152
|
+
"name": "PSTM",
|
|
153
|
+
"cookie_id": "52bb55e35400e",
|
|
154
|
+
"project_id": "484df1ca7801000"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"key": "BAIDUID",
|
|
158
|
+
"value": "DDC8528023336C3E9F9FA35DC6506B00:FG=1",
|
|
159
|
+
"expires": "Sat, 06 Jun 2026 07:06:41 GMT",
|
|
160
|
+
"maxAge": 31536000,
|
|
161
|
+
"domain": "baidu.com",
|
|
162
|
+
"path": "/",
|
|
163
|
+
"extensions": [
|
|
164
|
+
"version=1",
|
|
165
|
+
"comment=bd"
|
|
166
|
+
],
|
|
167
|
+
"creation": "2025-06-06T07:06:40.024Z",
|
|
168
|
+
"name": "BAIDUID",
|
|
169
|
+
"cookie_id": "52bb55e35400f",
|
|
170
|
+
"project_id": "484df1ca7801000"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"key": "H_PS_PSSID",
|
|
174
|
+
"value": "60272_62327_63243_63327_63353_63390_63404_63440_63458_63508_63499_63531_63547_63568_63563_63584_63579",
|
|
175
|
+
"expires": "2026-06-11T07:35:18.000Z",
|
|
176
|
+
"domain": "baidu.com",
|
|
177
|
+
"path": "/",
|
|
178
|
+
"creation": "2025-06-11T07:35:18.677Z",
|
|
179
|
+
"name": "H_PS_PSSID",
|
|
180
|
+
"cookie_id": "52be5e0754006",
|
|
181
|
+
"project_id": "484df1ca7801000"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"key": "BDSVRTM",
|
|
185
|
+
"value": "6",
|
|
186
|
+
"path": "/",
|
|
187
|
+
"creation": "2025-06-11T07:35:18.677Z",
|
|
188
|
+
"name": "BDSVRTM",
|
|
189
|
+
"cookie_id": "52bb55e354010",
|
|
190
|
+
"domain": "www.baidu.com",
|
|
191
|
+
"project_id": "484df1ca7801000"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"key": "BD_HOME",
|
|
195
|
+
"value": "1",
|
|
196
|
+
"path": "/",
|
|
197
|
+
"creation": "2025-06-11T07:35:18.678Z",
|
|
198
|
+
"name": "BD_HOME",
|
|
199
|
+
"cookie_id": "52bb55e354011",
|
|
200
|
+
"domain": "www.baidu.com",
|
|
201
|
+
"project_id": "484df1ca7801000"
|
|
125
202
|
}
|
|
126
203
|
]
|
|
127
204
|
},
|
|
@@ -129,21 +206,20 @@ module.exports = {
|
|
|
129
206
|
"send_timeout": 0,
|
|
130
207
|
"auto_redirect": -1,
|
|
131
208
|
"max_redirect_time": 5,
|
|
132
|
-
"auto_gen_mock_url":
|
|
209
|
+
"auto_gen_mock_url": 1,
|
|
133
210
|
"request_param_auto_json": -1,
|
|
134
211
|
"proxy": {
|
|
135
212
|
"type": 2,
|
|
136
213
|
"envfirst": 1,
|
|
137
214
|
"bypass": [],
|
|
138
215
|
"protocols": [
|
|
139
|
-
"http"
|
|
140
|
-
"https"
|
|
216
|
+
"http"
|
|
141
217
|
],
|
|
142
218
|
"auth": {
|
|
143
|
-
"authenticate": 1,
|
|
144
|
-
"host": "
|
|
145
|
-
"username": "
|
|
146
|
-
"password": "
|
|
219
|
+
"authenticate": -1,
|
|
220
|
+
"host": "",
|
|
221
|
+
"username": "",
|
|
222
|
+
"password": ""
|
|
147
223
|
}
|
|
148
224
|
},
|
|
149
225
|
"ca_cert": {
|
|
@@ -151,195 +227,86 @@ module.exports = {
|
|
|
151
227
|
"path": "",
|
|
152
228
|
"base64": ""
|
|
153
229
|
},
|
|
154
|
-
"client_cert": {
|
|
230
|
+
"client_cert": {
|
|
231
|
+
"https://cc.apipost.cc:6003": {
|
|
232
|
+
"crt": {
|
|
233
|
+
"file_base64": "data:application/x-x509-ca-cert;base64,LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURuVENDQW9VQ0ZFcDd4Z3J2VVhteWEzTEdmcEFpenRNUkJvN3ZNQTBHQ1NxR1NJYjNEUUVCQ3dVQU1JR0sKTVFzd0NRWURWUVFHRXdKRFRqRVFNQTRHQTFVRUNBd0hRbVZwYW1sdVp6RVFNQTRHQTFVRUJ3d0hRbVZwYW1sdQpaekVRTUE0R0ExVUVDZ3dIWVhCcGNHOXpkREVNTUFvR0ExVUVDd3dEWVhCME1SWXdGQVlEVlFRRERBMWpZeTVoCmNHbHdiM04wTG1Oak1SOHdIUVlKS29aSWh2Y05BUWtCRmhCaFpHMXBia0JoY0dsd2IzTjBMbU5qTUI0WERUSXoKTVRJeE1UQTVOREl4TmxvWERUTXpNVEl3T0RBNU5ESXhObG93Z1lveEN6QUpCZ05WQkFZVEFrTk9NUkF3RGdZRApWUVFJREFkQ1pXbHFhVzVuTVJBd0RnWURWUVFIREFkQ1pXbHFhVzVuTVE4d0RRWURWUVFLREFaaGNHbHZjM1F4CkREQUtCZ05WQkFzTUEyRndkREVXTUJRR0ExVUVBd3dOWTJNdVlYQnBjRzl6ZEM1all6RWdNQjRHQ1NxR1NJYjMKRFFFSkFSWVJZMnhwWlc1MFFHRndhWEJ2YzNRdVkyTXdnZ0Vp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0tLS0K",
|
|
234
|
+
"file_name": "client (1).crt",
|
|
235
|
+
"file_url": ""
|
|
236
|
+
},
|
|
237
|
+
"key": {
|
|
238
|
+
"file_name": "client (1).key",
|
|
239
|
+
"file_url": "",
|
|
240
|
+
"file_base64": "data:application/x-iwork-keynote-sffkey;base64,LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFcEFJQkFBS0NBUUVBNXdvMHFWblAweWY2c2VuYlFSQ0NjY1l0RE5ESU9kenJraURQb0MxYkpjdmNTRUVqCmNCVjRaUC94dkV2V0xjSW9OTTZYa2lrVjYrdjVyeUQ2L1pYTFFJdzVJT1BBanp5VFYybWVST3oxUTE1dkpqTVcKaW5RTXFuajNUcGVwVzdaQ1ZSTkxhU0ZTMmZFUncvWHZFMW0rQWkrRDB5dmZ1RjFCeUEwREJEQmpKbW9CQkVNTQovcmUwVEMzZWFLajliYms3MXdKNGs1M3ZEYjJtaysrUFk2VjE2TW9GcUJJbHRQRzhPbStqWDZWRU5zVDVTUnBMCkpHNTAydnRqSG82RlpDV1FwZFh2UnpXcnI1RHZXZkQ0M1Y5S0lIdCtQRFlucU80M0FtSVFFWkpvN2lJOFc5VEgKVXNEcis5ZVZTcXRLVUtaOTdFNjVHT1k3K2c4L3U3b1VZcm9PNHdJREFRQUJBb0lCQUNXckQwenhIS1lqcFlidQpSdFlEMkJDdXE5ZWtEcEVJaU12SlY3Q1kxSHlFRVVVaWdhR2Jqb2FCQ0N1WC9iSjJMbEgxd05hT3BrbFJydUt6CnNOZzVYT3NJTWFSQUhidjh0MVVRSGtMRWszUkphRHZGSm82cVB3cG9NSUg2emh6cXlVUFBvb0xnY1A2aGhERDcKM3QrN3lQUFlSVmpmbFZrY3MwWG5nUzlrcURXeDBXZStWOGFJMVJCOXVIbUdDcmo4djFZaHFSRWl2dXl4eUVXQwpZSkowVFRqSVhtMC92OVNJRE5FTjJKVExkYmlIdDBvQm9PZk1CWk5MSmhjSWI4cHkvTW5SYW9IN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lHaDhDZ1lCbHJBaVdIOGU4aEhkWjdxTjNOTk51cVkvQjdJWFNPdzFIMEVKbjd3Ui9tZElzalFRYkJGL3gKa05YNndvZDVFeHBzRkVER2lJQ0RiQm1FbW5oaU1TWFBXREhoalZKSkFSUG5sL2Fxc0tNemt0dXdic29DbGQ2OApkT1hkbHNtbGhYZVdrcGp5ZUdCREZ5Y3hPdW80M3F6VzdOOUNpQ285dXBuNGZrSEg3Si95Znc9PQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo="
|
|
241
|
+
},
|
|
242
|
+
"password": "",
|
|
243
|
+
"pfx": {
|
|
244
|
+
"file_base64": "",
|
|
245
|
+
"file_name": "",
|
|
246
|
+
"file_url": ""
|
|
247
|
+
},
|
|
248
|
+
"HOST": "https://cc.apipost.cc:6003"
|
|
249
|
+
}
|
|
250
|
+
}
|
|
155
251
|
},
|
|
156
252
|
"custom_functions": {
|
|
157
|
-
"
|
|
158
|
-
"
|
|
159
|
-
"fn_createGH": "\n// This function is generated by Apipost AI.\ntry {\n // 随机生成后8位数字\n let lastEightDigits = '';\n for (let i = 0; i < 8; i++) {\n lastEightDigits += Math.floor(Math.random() * 10);\n }\n return '0371' + lastEightDigits;\n} catch (error) {\n return text;\n}",
|
|
160
|
-
"fn_getgh": "\n// This function is generated by Apipost AI.\ntry {\n // 随机生成后8位数字\n let lastEightDigits = '';\n for (let i = 0; i < 8; i++) {\n lastEightDigits += Math.floor(Math.random() * 10);\n }\n return '0371' + lastEightDigits;\n} catch (error) {\n return text;\n}",
|
|
161
|
-
"fn_getemail": "// This function is generated by Apipost AI.\ntry {\n const randomChars = 'abcdefghijklmnopqrstuvwxyz0123456789';\n let randomStr = '';\n for (let i = 0; i < 8; i++) {\n randomStr += randomChars.charAt(Math.floor(Math.random() * randomChars.length));\n }\n const domains = ['gmail.com', 'yahoo.com', 'hotmail.com', 'outlook.com'];\n const randomDomainIndex = Math.floor(Math.random() * domains.length);\n return randomStr + '@' + domains[randomDomainIndex];\n} catch (error) {\n return text;\n}",
|
|
162
|
-
"fn_getmail": "// This function is generated by Apipost AI.\ntry {\n const randomChars = 'abcdefghijklmnopqrstuvwxyz0123456789';\n let randomStr = '';\n for (let i = 0; i < 8; i++) {\n randomStr += randomChars.charAt(Math.floor(Math.random() * randomChars.length));\n }\n const domains = ['gmail.com', 'yahoo.com', 'hotmail.com', 'outlook.com'];\n const randomDomainIndex = Math.floor(Math.random() * domains.length);\n return randomStr + '@' + domains[randomDomainIndex];\n} catch (error) {\n return text;\n}"
|
|
253
|
+
"fn_email": "// This function is generated by Apipost AI.\n// 正则表达式匹配邮箱格式\nconst emailReg = /^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$/;\ntry {\n if (emailReg.test(text)) {\n return 'yes';\n } else {\n return 'no';\n }\n} catch (error) {\n return text;\n}",
|
|
254
|
+
"fn_genemail": "\n// This function is generated by Apipost AI.\ntry {\n // 简单生成邮箱,这里假设以时间戳和固定域名生成\n const timestamp = new Date().getTime();\n const email = `user${timestamp}@example.com`;\n return email;\n} catch (error) {\n return text;\n}"
|
|
163
255
|
},
|
|
164
256
|
"collection": [
|
|
165
257
|
{
|
|
166
|
-
"target_id": "
|
|
258
|
+
"target_id": "53ff48cb540b4",
|
|
167
259
|
"target_type": "api",
|
|
168
260
|
"parent_id": "0",
|
|
169
|
-
"name": "
|
|
261
|
+
"name": "12127 已解决 自定义函数 判断邮箱格式",
|
|
170
262
|
"request": {
|
|
171
263
|
"auth": {
|
|
172
264
|
"type": "inherit"
|
|
173
265
|
},
|
|
174
266
|
"body": {
|
|
175
|
-
"binary": null,
|
|
176
267
|
"mode": "json",
|
|
177
268
|
"parameter": [],
|
|
178
|
-
"raw": "
|
|
269
|
+
"raw": "{{$function.fn_email(1234@qq.com)}}",
|
|
179
270
|
"raw_parameter": [],
|
|
180
271
|
"raw_schema": {
|
|
181
272
|
"type": "object"
|
|
182
|
-
}
|
|
273
|
+
},
|
|
274
|
+
"binary": null
|
|
183
275
|
},
|
|
184
|
-
"
|
|
276
|
+
"pre_tasks": [],
|
|
277
|
+
"post_tasks": [],
|
|
278
|
+
"header": {
|
|
185
279
|
"parameter": []
|
|
186
280
|
},
|
|
187
|
-
"
|
|
281
|
+
"query": {
|
|
282
|
+
"query_add_equal": 1,
|
|
188
283
|
"parameter": [
|
|
189
284
|
{
|
|
190
|
-
"
|
|
191
|
-
"key": "Accept",
|
|
192
|
-
"value": "*/*",
|
|
193
|
-
"not_null": 1,
|
|
194
|
-
"description": "",
|
|
195
|
-
"field_type": "String",
|
|
196
|
-
"param_id": "d3dfd847d00f0"
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
"is_checked": 1,
|
|
200
|
-
"key": "Accept-Encoding",
|
|
201
|
-
"value": "gzip, deflate, br",
|
|
202
|
-
"not_null": 1,
|
|
203
|
-
"description": "",
|
|
204
|
-
"field_type": "String",
|
|
205
|
-
"param_id": "d3dfd847d00f1"
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
"is_checked": 1,
|
|
209
|
-
"key": "Bwtoken",
|
|
210
|
-
"value": "aca61450ee6c9c1d18554051d4e0204d",
|
|
211
|
-
"not_null": 1,
|
|
212
|
-
"description": "",
|
|
213
|
-
"field_type": "String",
|
|
214
|
-
"param_id": "d3dfd847d00f2"
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
"is_checked": 1,
|
|
218
|
-
"key": "Cache-Control",
|
|
219
|
-
"value": "no-cache",
|
|
220
|
-
"not_null": 1,
|
|
221
|
-
"description": "",
|
|
222
|
-
"field_type": "String",
|
|
223
|
-
"param_id": "d3dfd847d00f3"
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
"is_checked": 1,
|
|
227
|
-
"key": "Connection",
|
|
228
|
-
"value": "keep-alive",
|
|
229
|
-
"not_null": 1,
|
|
230
|
-
"description": "",
|
|
231
|
-
"field_type": "String",
|
|
232
|
-
"param_id": "d3dfd847d00f4"
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
"is_checked": 1,
|
|
236
|
-
"key": "Content-Type",
|
|
237
|
-
"value": "application/json",
|
|
238
|
-
"not_null": 1,
|
|
239
|
-
"description": "",
|
|
240
|
-
"field_type": "String",
|
|
241
|
-
"param_id": "d3dfd847d00f5"
|
|
242
|
-
},
|
|
243
|
-
{
|
|
244
|
-
"is_checked": 1,
|
|
245
|
-
"key": "Host",
|
|
246
|
-
"value": "lqpt.chinatax.gov.cn:8443",
|
|
247
|
-
"not_null": 1,
|
|
285
|
+
"param_id": "53ff4ce39b0b5",
|
|
248
286
|
"description": "",
|
|
249
|
-
"field_type": "
|
|
250
|
-
"param_id": "d3dfd847d00f6"
|
|
251
|
-
},
|
|
252
|
-
{
|
|
287
|
+
"field_type": "string",
|
|
253
288
|
"is_checked": 1,
|
|
254
|
-
"key": "
|
|
255
|
-
"value": "PostmanRuntime-ApipostRuntime/1.1.0",
|
|
289
|
+
"key": "",
|
|
256
290
|
"not_null": 1,
|
|
257
|
-
"description": "",
|
|
258
|
-
"field_type": "String",
|
|
259
|
-
"param_id": "d3dfd847d00f7"
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
"is_checked": 1,
|
|
263
|
-
"key": "access_signature",
|
|
264
291
|
"value": "",
|
|
265
|
-
"
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
"param_id": "d3dfd847d00f8"
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
"is_checked": 1,
|
|
272
|
-
"key": "fwbm",
|
|
273
|
-
"value": "CXNCPSGQYFXLX",
|
|
274
|
-
"not_null": 1,
|
|
275
|
-
"description": "",
|
|
276
|
-
"field_type": "String",
|
|
277
|
-
"param_id": "d3dfd847d00f9"
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
"is_checked": 1,
|
|
281
|
-
"key": "jrdwptbh",
|
|
282
|
-
"value": "174ba8fa83cf8cd6d905",
|
|
283
|
-
"not_null": 1,
|
|
284
|
-
"description": "",
|
|
285
|
-
"field_type": "String",
|
|
286
|
-
"param_id": "d3dfd847d00fa"
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
"is_checked": 1,
|
|
290
|
-
"key": "nlbm",
|
|
291
|
-
"value": "202019",
|
|
292
|
-
"not_null": 1,
|
|
293
|
-
"description": "",
|
|
294
|
-
"field_type": "String",
|
|
295
|
-
"param_id": "d3dfd847d00fb"
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
"is_checked": 1,
|
|
299
|
-
"key": "sydwptbh",
|
|
300
|
-
"value": "174ba8fa83cf8cd6d905",
|
|
301
|
-
"not_null": 1,
|
|
302
|
-
"description": "",
|
|
303
|
-
"field_type": "String",
|
|
304
|
-
"param_id": "d3dfd847d00fc"
|
|
305
|
-
},
|
|
306
|
-
{
|
|
307
|
-
"is_checked": 1,
|
|
308
|
-
"key": "ylbm",
|
|
309
|
-
"value": "202019",
|
|
310
|
-
"not_null": 1,
|
|
311
|
-
"description": "",
|
|
312
|
-
"field_type": "String",
|
|
313
|
-
"param_id": "d3dfd847d00fd"
|
|
292
|
+
"schema": {
|
|
293
|
+
"type": "string"
|
|
294
|
+
}
|
|
314
295
|
}
|
|
315
296
|
]
|
|
316
297
|
},
|
|
317
|
-
"
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
"parameter": [
|
|
321
|
-
{
|
|
322
|
-
"is_checked": 1,
|
|
323
|
-
"key": "id",
|
|
324
|
-
"value": "{{$mockjs.idcard()}}",
|
|
325
|
-
"not_null": 1,
|
|
326
|
-
"description": "",
|
|
327
|
-
"field_type": "String",
|
|
328
|
-
"param_id": "d3dfd847d00fd"
|
|
329
|
-
}
|
|
330
|
-
],
|
|
331
|
-
"query_add_equal": 1
|
|
298
|
+
"cookie": {
|
|
299
|
+
"cookie_encode": 1,
|
|
300
|
+
"parameter": []
|
|
332
301
|
},
|
|
333
302
|
"restful": {
|
|
334
303
|
"parameter": []
|
|
335
304
|
}
|
|
336
305
|
},
|
|
337
306
|
"parents": [],
|
|
338
|
-
"server_id": "0",
|
|
339
307
|
"method": "POST",
|
|
340
308
|
"protocol": "http/1.1",
|
|
341
|
-
|
|
342
|
-
"url": "lqpt.chinatax.gov.cn:8443/access/newsandbox/v2/invoke/202019/CXNCPSGQYFXLX?id={{$timestamp}}",
|
|
309
|
+
"url": "cc.apipost.cc:6002/post",
|
|
343
310
|
"pre_url": ""
|
|
344
311
|
}
|
|
345
312
|
],
|
|
@@ -349,8 +316,8 @@ module.exports = {
|
|
|
349
316
|
{
|
|
350
317
|
"type": "api",
|
|
351
318
|
"data": {
|
|
352
|
-
"target_id": "
|
|
353
|
-
"project_id": "
|
|
319
|
+
"target_id": "53ff48cb540b4",
|
|
320
|
+
"project_id": "484df1ca7801000",
|
|
354
321
|
"parent_id": "0",
|
|
355
322
|
"target_type": "api"
|
|
356
323
|
}
|