feima-shortcuts 1.0.6 → 1.0.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feima-shortcuts",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "快捷指令",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -141,8 +141,10 @@ export const request = <T>(
141
141
  config: OpenAPIConfig,
142
142
  options: ApiRequestOptions
143
143
  ): CancelablePromise<T> => {
144
+ const { query, ...rest } = options;
145
+
144
146
  return new CancelablePromise((resolve, reject, onCancel) => {
145
- const url = \`\${config.BASE}\${options.path}\`;
147
+ const url = \`\${config.BASE}\${rest.url}\`;
146
148
 
147
149
  const source = axios.CancelToken.source();
148
150
 
@@ -150,9 +152,10 @@ export const request = <T>(
150
152
 
151
153
  service
152
154
  .request({
153
- ...options,
155
+ ...rest,
156
+ params: query,
154
157
  url,
155
- data: options.body,
158
+ data: rest?.body,
156
159
  cancelToken: source.token,
157
160
  })
158
161
  .then((data: any) => {