tools-min-ns 1.9.10 → 1.9.11

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/README.md CHANGED
@@ -5,6 +5,9 @@ cnpm i tools-min-ns --save
5
5
  ```
6
6
 
7
7
  # updates
8
+ ## v1.9.11
9
+
10
+ > uniRequest withCredentials参数默认false
8
11
  ## v1.9.10
9
12
 
10
13
  > NumberUtil correctNumberInput错误bug修复
@@ -28,6 +28,7 @@ export interface JsonpOptions {
28
28
  export interface RequestOptions {
29
29
  url: string;
30
30
  headers?: AsObject;
31
+ withCredentials?: boolean;
31
32
  method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD';
32
33
  data?: AsObject;
33
34
  timeout?: number;
@@ -2,10 +2,10 @@ import { ERROR_REQUEST_TIMEOUT, ERROR_REQUEST_ABORT } from '../types';
2
2
  import { applyParamToURL, object2json, checkIsApplyDataToURL, isObject, isPlainObject } from '../utils';
3
3
  export default function requestXHR(options) {
4
4
  options.headers = Object.assign({
5
- 'Accept': 'application/json, text/plain, */*'
5
+ Accept: 'application/json, text/plain, */*'
6
6
  }, options.headers);
7
7
  var _a = Object.assign({
8
- withCredentials: true,
8
+ withCredentials: false,
9
9
  method: 'GET',
10
10
  validateStatus: function validateStatus(status) {
11
11
  return status >= 200 && status < 300 || status === 304;
@@ -28,6 +28,7 @@ export interface JsonpOptions {
28
28
  export interface RequestOptions {
29
29
  url: string;
30
30
  headers?: AsObject;
31
+ withCredentials?: boolean;
31
32
  method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD';
32
33
  data?: AsObject;
33
34
  timeout?: number;
@@ -7,10 +7,10 @@ var types_1 = require("../types");
7
7
  var utils_1 = require("../utils");
8
8
  function requestXHR(options) {
9
9
  options.headers = Object.assign({
10
- 'Accept': 'application/json, text/plain, */*'
10
+ Accept: 'application/json, text/plain, */*'
11
11
  }, options.headers);
12
12
  var _a = Object.assign({
13
- withCredentials: true,
13
+ withCredentials: false,
14
14
  method: 'GET',
15
15
  validateStatus: function validateStatus(status) {
16
16
  return status >= 200 && status < 300 || status === 304;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tools-min-ns",
3
3
  "description": "工具包适用于前端以及node",
4
- "version": "1.9.10",
4
+ "version": "1.9.11",
5
5
  "main": "lib/index.js",
6
6
  "license": "MIT",
7
7
  "author": "nanshen",