eoss-mobiles 0.2.31 → 0.2.32

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/lib/picker.js CHANGED
@@ -1740,6 +1740,8 @@ var axios_ajax = function ajax(url) {
1740
1740
  var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1741
1741
  var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
1742
1742
  var type = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'get';
1743
+ var isData = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
1744
+ var isParams = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : true;
1743
1745
 
1744
1746
  var http = external_axios_default.a.create({
1745
1747
  baseURL: apiUrl,
@@ -1803,6 +1805,13 @@ var axios_ajax = function ajax(url) {
1803
1805
  if (config.url.search('mecp/overtime') !== -1 || config.url.search('mecp/leave') !== -1 || config.url.search('contractext') !== -1 || config.url.search('getSysParam') !== -1) {
1804
1806
  delete config.headers.deviceId;
1805
1807
  }
1808
+ if (!isData) {
1809
+ delete config.data;
1810
+ }
1811
+ if (!isParams) {
1812
+ delete config.params;
1813
+ }
1814
+
1806
1815
  return config;
1807
1816
  }, function (error) {
1808
1817
  return Promise.error(error);
@@ -1886,6 +1895,8 @@ var base = {
1886
1895
  var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1887
1896
  var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1888
1897
  var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
1898
+ var isData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
1899
+ var isParams = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
1889
1900
 
1890
1901
  if (params.params && url.search('registerNew') === -1) {
1891
1902
  params.params.userId = params.params.userId ? params.params.userId : util["a" /* default */].getStorage('userId');
@@ -1904,16 +1915,18 @@ var base = {
1904
1915
  }
1905
1916
  return axios_ajax(url, {
1906
1917
  params: params
1907
- }, headers, format);
1918
+ }, headers, format, 'get', isData, isParams);
1908
1919
  },
1909
1920
  post: function post(url, params, headers, format) {
1910
- console.log(params, 'params');
1921
+ var isData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
1922
+ var isParams = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
1923
+
1911
1924
  if (params.params) {
1912
1925
  params.params.userId = params.params.userId || util["a" /* default */].getStorage('userId');
1913
1926
  } else {
1914
1927
  params.userId = params.userId || util["a" /* default */].getStorage('userId');
1915
1928
  }
1916
- return axios_ajax(url, params, headers, format, 'post');
1929
+ return axios_ajax(url, params, headers, format, 'post', isData, isParams);
1917
1930
  }
1918
1931
  };
1919
1932
  /* harmony default export */ var axios = (base);
@@ -1921,21 +1934,22 @@ var base = {
1921
1934
 
1922
1935
  var http_request = function request(options) {
1923
1936
  var fn = void 0;
1937
+ console.log(options, 'sss');
1924
1938
  switch (options.type) {
1925
1939
  case 'post':
1926
- fn = axios.post(options.url, options.params, options.headers, options.format);
1940
+ fn = axios.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);
1927
1941
  break;
1928
1942
  case 'POST':
1929
- fn = axios.post(options.url, options.params, options.headers, options.format);
1943
+ fn = axios.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);
1930
1944
  break;
1931
1945
  case 'get':
1932
- fn = axios.get(options.url, options.params, options.headers = {});
1946
+ fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
1933
1947
  break;
1934
1948
  case 'GET':
1935
- fn = axios.get(options.url, options.params, options.headers = {});
1949
+ fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
1936
1950
  break;
1937
1951
  default:
1938
- fn = axios.get(options.url, options.params, options.headers = {});
1952
+ fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
1939
1953
  }
1940
1954
  return fn;
1941
1955
  };
package/lib/radio.js CHANGED
@@ -1740,6 +1740,8 @@ var axios_ajax = function ajax(url) {
1740
1740
  var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1741
1741
  var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
1742
1742
  var type = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'get';
1743
+ var isData = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
1744
+ var isParams = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : true;
1743
1745
 
1744
1746
  var http = external_axios_default.a.create({
1745
1747
  baseURL: apiUrl,
@@ -1803,6 +1805,13 @@ var axios_ajax = function ajax(url) {
1803
1805
  if (config.url.search('mecp/overtime') !== -1 || config.url.search('mecp/leave') !== -1 || config.url.search('contractext') !== -1 || config.url.search('getSysParam') !== -1) {
1804
1806
  delete config.headers.deviceId;
1805
1807
  }
1808
+ if (!isData) {
1809
+ delete config.data;
1810
+ }
1811
+ if (!isParams) {
1812
+ delete config.params;
1813
+ }
1814
+
1806
1815
  return config;
1807
1816
  }, function (error) {
1808
1817
  return Promise.error(error);
@@ -1886,6 +1895,8 @@ var base = {
1886
1895
  var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1887
1896
  var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1888
1897
  var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
1898
+ var isData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
1899
+ var isParams = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
1889
1900
 
1890
1901
  if (params.params && url.search('registerNew') === -1) {
1891
1902
  params.params.userId = params.params.userId ? params.params.userId : util["a" /* default */].getStorage('userId');
@@ -1904,16 +1915,18 @@ var base = {
1904
1915
  }
1905
1916
  return axios_ajax(url, {
1906
1917
  params: params
1907
- }, headers, format);
1918
+ }, headers, format, 'get', isData, isParams);
1908
1919
  },
1909
1920
  post: function post(url, params, headers, format) {
1910
- console.log(params, 'params');
1921
+ var isData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
1922
+ var isParams = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
1923
+
1911
1924
  if (params.params) {
1912
1925
  params.params.userId = params.params.userId || util["a" /* default */].getStorage('userId');
1913
1926
  } else {
1914
1927
  params.userId = params.userId || util["a" /* default */].getStorage('userId');
1915
1928
  }
1916
- return axios_ajax(url, params, headers, format, 'post');
1929
+ return axios_ajax(url, params, headers, format, 'post', isData, isParams);
1917
1930
  }
1918
1931
  };
1919
1932
  /* harmony default export */ var axios = (base);
@@ -1921,21 +1934,22 @@ var base = {
1921
1934
 
1922
1935
  var http_request = function request(options) {
1923
1936
  var fn = void 0;
1937
+ console.log(options, 'sss');
1924
1938
  switch (options.type) {
1925
1939
  case 'post':
1926
- fn = axios.post(options.url, options.params, options.headers, options.format);
1940
+ fn = axios.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);
1927
1941
  break;
1928
1942
  case 'POST':
1929
- fn = axios.post(options.url, options.params, options.headers, options.format);
1943
+ fn = axios.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);
1930
1944
  break;
1931
1945
  case 'get':
1932
- fn = axios.get(options.url, options.params, options.headers = {});
1946
+ fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
1933
1947
  break;
1934
1948
  case 'GET':
1935
- fn = axios.get(options.url, options.params, options.headers = {});
1949
+ fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
1936
1950
  break;
1937
1951
  default:
1938
- fn = axios.get(options.url, options.params, options.headers = {});
1952
+ fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
1939
1953
  }
1940
1954
  return fn;
1941
1955
  };
@@ -1744,6 +1744,8 @@ var axios_ajax = function ajax(url) {
1744
1744
  var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1745
1745
  var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
1746
1746
  var type = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'get';
1747
+ var isData = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
1748
+ var isParams = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : true;
1747
1749
 
1748
1750
  var http = external_axios_default.a.create({
1749
1751
  baseURL: apiUrl,
@@ -1807,6 +1809,13 @@ var axios_ajax = function ajax(url) {
1807
1809
  if (config.url.search('mecp/overtime') !== -1 || config.url.search('mecp/leave') !== -1 || config.url.search('contractext') !== -1 || config.url.search('getSysParam') !== -1) {
1808
1810
  delete config.headers.deviceId;
1809
1811
  }
1812
+ if (!isData) {
1813
+ delete config.data;
1814
+ }
1815
+ if (!isParams) {
1816
+ delete config.params;
1817
+ }
1818
+
1810
1819
  return config;
1811
1820
  }, function (error) {
1812
1821
  return Promise.error(error);
@@ -1890,6 +1899,8 @@ var base = {
1890
1899
  var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1891
1900
  var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1892
1901
  var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
1902
+ var isData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
1903
+ var isParams = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
1893
1904
 
1894
1905
  if (params.params && url.search('registerNew') === -1) {
1895
1906
  params.params.userId = params.params.userId ? params.params.userId : util["a" /* default */].getStorage('userId');
@@ -1908,16 +1919,18 @@ var base = {
1908
1919
  }
1909
1920
  return axios_ajax(url, {
1910
1921
  params: params
1911
- }, headers, format);
1922
+ }, headers, format, 'get', isData, isParams);
1912
1923
  },
1913
1924
  post: function post(url, params, headers, format) {
1914
- console.log(params, 'params');
1925
+ var isData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
1926
+ var isParams = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
1927
+
1915
1928
  if (params.params) {
1916
1929
  params.params.userId = params.params.userId || util["a" /* default */].getStorage('userId');
1917
1930
  } else {
1918
1931
  params.userId = params.userId || util["a" /* default */].getStorage('userId');
1919
1932
  }
1920
- return axios_ajax(url, params, headers, format, 'post');
1933
+ return axios_ajax(url, params, headers, format, 'post', isData, isParams);
1921
1934
  }
1922
1935
  };
1923
1936
  /* harmony default export */ var axios = (base);
@@ -1925,21 +1938,22 @@ var base = {
1925
1938
 
1926
1939
  var http_request = function request(options) {
1927
1940
  var fn = void 0;
1941
+ console.log(options, 'sss');
1928
1942
  switch (options.type) {
1929
1943
  case 'post':
1930
- fn = axios.post(options.url, options.params, options.headers, options.format);
1944
+ fn = axios.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);
1931
1945
  break;
1932
1946
  case 'POST':
1933
- fn = axios.post(options.url, options.params, options.headers, options.format);
1947
+ fn = axios.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);
1934
1948
  break;
1935
1949
  case 'get':
1936
- fn = axios.get(options.url, options.params, options.headers = {});
1950
+ fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
1937
1951
  break;
1938
1952
  case 'GET':
1939
- fn = axios.get(options.url, options.params, options.headers = {});
1953
+ fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
1940
1954
  break;
1941
1955
  default:
1942
- fn = axios.get(options.url, options.params, options.headers = {});
1956
+ fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
1943
1957
  }
1944
1958
  return fn;
1945
1959
  };
package/lib/selector.js CHANGED
@@ -1740,6 +1740,8 @@ var axios_ajax = function ajax(url) {
1740
1740
  var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1741
1741
  var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
1742
1742
  var type = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'get';
1743
+ var isData = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
1744
+ var isParams = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : true;
1743
1745
 
1744
1746
  var http = external_axios_default.a.create({
1745
1747
  baseURL: apiUrl,
@@ -1803,6 +1805,13 @@ var axios_ajax = function ajax(url) {
1803
1805
  if (config.url.search('mecp/overtime') !== -1 || config.url.search('mecp/leave') !== -1 || config.url.search('contractext') !== -1 || config.url.search('getSysParam') !== -1) {
1804
1806
  delete config.headers.deviceId;
1805
1807
  }
1808
+ if (!isData) {
1809
+ delete config.data;
1810
+ }
1811
+ if (!isParams) {
1812
+ delete config.params;
1813
+ }
1814
+
1806
1815
  return config;
1807
1816
  }, function (error) {
1808
1817
  return Promise.error(error);
@@ -1886,6 +1895,8 @@ var base = {
1886
1895
  var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1887
1896
  var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1888
1897
  var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
1898
+ var isData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
1899
+ var isParams = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
1889
1900
 
1890
1901
  if (params.params && url.search('registerNew') === -1) {
1891
1902
  params.params.userId = params.params.userId ? params.params.userId : util["a" /* default */].getStorage('userId');
@@ -1904,16 +1915,18 @@ var base = {
1904
1915
  }
1905
1916
  return axios_ajax(url, {
1906
1917
  params: params
1907
- }, headers, format);
1918
+ }, headers, format, 'get', isData, isParams);
1908
1919
  },
1909
1920
  post: function post(url, params, headers, format) {
1910
- console.log(params, 'params');
1921
+ var isData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
1922
+ var isParams = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
1923
+
1911
1924
  if (params.params) {
1912
1925
  params.params.userId = params.params.userId || util["a" /* default */].getStorage('userId');
1913
1926
  } else {
1914
1927
  params.userId = params.userId || util["a" /* default */].getStorage('userId');
1915
1928
  }
1916
- return axios_ajax(url, params, headers, format, 'post');
1929
+ return axios_ajax(url, params, headers, format, 'post', isData, isParams);
1917
1930
  }
1918
1931
  };
1919
1932
  /* harmony default export */ var axios = (base);
@@ -1921,21 +1934,22 @@ var base = {
1921
1934
 
1922
1935
  var http_request = function request(options) {
1923
1936
  var fn = void 0;
1937
+ console.log(options, 'sss');
1924
1938
  switch (options.type) {
1925
1939
  case 'post':
1926
- fn = axios.post(options.url, options.params, options.headers, options.format);
1940
+ fn = axios.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);
1927
1941
  break;
1928
1942
  case 'POST':
1929
- fn = axios.post(options.url, options.params, options.headers, options.format);
1943
+ fn = axios.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);
1930
1944
  break;
1931
1945
  case 'get':
1932
- fn = axios.get(options.url, options.params, options.headers = {});
1946
+ fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
1933
1947
  break;
1934
1948
  case 'GET':
1935
- fn = axios.get(options.url, options.params, options.headers = {});
1949
+ fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
1936
1950
  break;
1937
1951
  default:
1938
- fn = axios.get(options.url, options.params, options.headers = {});
1952
+ fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
1939
1953
  }
1940
1954
  return fn;
1941
1955
  };
@@ -1740,6 +1740,8 @@ var axios_ajax = function ajax(url) {
1740
1740
  var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1741
1741
  var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
1742
1742
  var type = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'get';
1743
+ var isData = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
1744
+ var isParams = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : true;
1743
1745
 
1744
1746
  var http = external_axios_default.a.create({
1745
1747
  baseURL: apiUrl,
@@ -1803,6 +1805,13 @@ var axios_ajax = function ajax(url) {
1803
1805
  if (config.url.search('mecp/overtime') !== -1 || config.url.search('mecp/leave') !== -1 || config.url.search('contractext') !== -1 || config.url.search('getSysParam') !== -1) {
1804
1806
  delete config.headers.deviceId;
1805
1807
  }
1808
+ if (!isData) {
1809
+ delete config.data;
1810
+ }
1811
+ if (!isParams) {
1812
+ delete config.params;
1813
+ }
1814
+
1806
1815
  return config;
1807
1816
  }, function (error) {
1808
1817
  return Promise.error(error);
@@ -1886,6 +1895,8 @@ var base = {
1886
1895
  var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1887
1896
  var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1888
1897
  var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
1898
+ var isData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
1899
+ var isParams = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
1889
1900
 
1890
1901
  if (params.params && url.search('registerNew') === -1) {
1891
1902
  params.params.userId = params.params.userId ? params.params.userId : util["a" /* default */].getStorage('userId');
@@ -1904,16 +1915,18 @@ var base = {
1904
1915
  }
1905
1916
  return axios_ajax(url, {
1906
1917
  params: params
1907
- }, headers, format);
1918
+ }, headers, format, 'get', isData, isParams);
1908
1919
  },
1909
1920
  post: function post(url, params, headers, format) {
1910
- console.log(params, 'params');
1921
+ var isData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
1922
+ var isParams = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
1923
+
1911
1924
  if (params.params) {
1912
1925
  params.params.userId = params.params.userId || util["a" /* default */].getStorage('userId');
1913
1926
  } else {
1914
1927
  params.userId = params.userId || util["a" /* default */].getStorage('userId');
1915
1928
  }
1916
- return axios_ajax(url, params, headers, format, 'post');
1929
+ return axios_ajax(url, params, headers, format, 'post', isData, isParams);
1917
1930
  }
1918
1931
  };
1919
1932
  /* harmony default export */ var axios = (base);
@@ -1921,21 +1934,22 @@ var base = {
1921
1934
 
1922
1935
  var http_request = function request(options) {
1923
1936
  var fn = void 0;
1937
+ console.log(options, 'sss');
1924
1938
  switch (options.type) {
1925
1939
  case 'post':
1926
- fn = axios.post(options.url, options.params, options.headers, options.format);
1940
+ fn = axios.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);
1927
1941
  break;
1928
1942
  case 'POST':
1929
- fn = axios.post(options.url, options.params, options.headers, options.format);
1943
+ fn = axios.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);
1930
1944
  break;
1931
1945
  case 'get':
1932
- fn = axios.get(options.url, options.params, options.headers = {});
1946
+ fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
1933
1947
  break;
1934
1948
  case 'GET':
1935
- fn = axios.get(options.url, options.params, options.headers = {});
1949
+ fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
1936
1950
  break;
1937
1951
  default:
1938
- fn = axios.get(options.url, options.params, options.headers = {});
1952
+ fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
1939
1953
  }
1940
1954
  return fn;
1941
1955
  };
package/lib/table.js CHANGED
@@ -1619,6 +1619,8 @@ var axios_ajax = function ajax(url) {
1619
1619
  var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1620
1620
  var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
1621
1621
  var type = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'get';
1622
+ var isData = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
1623
+ var isParams = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : true;
1622
1624
 
1623
1625
  var http = external_axios_default.a.create({
1624
1626
  baseURL: apiUrl,
@@ -1682,6 +1684,13 @@ var axios_ajax = function ajax(url) {
1682
1684
  if (config.url.search('mecp/overtime') !== -1 || config.url.search('mecp/leave') !== -1 || config.url.search('contractext') !== -1 || config.url.search('getSysParam') !== -1) {
1683
1685
  delete config.headers.deviceId;
1684
1686
  }
1687
+ if (!isData) {
1688
+ delete config.data;
1689
+ }
1690
+ if (!isParams) {
1691
+ delete config.params;
1692
+ }
1693
+
1685
1694
  return config;
1686
1695
  }, function (error) {
1687
1696
  return Promise.error(error);
@@ -1765,6 +1774,8 @@ var base = {
1765
1774
  var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1766
1775
  var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1767
1776
  var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
1777
+ var isData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
1778
+ var isParams = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
1768
1779
 
1769
1780
  if (params.params && url.search('registerNew') === -1) {
1770
1781
  params.params.userId = params.params.userId ? params.params.userId : util["a" /* default */].getStorage('userId');
@@ -1783,16 +1794,18 @@ var base = {
1783
1794
  }
1784
1795
  return axios_ajax(url, {
1785
1796
  params: params
1786
- }, headers, format);
1797
+ }, headers, format, 'get', isData, isParams);
1787
1798
  },
1788
1799
  post: function post(url, params, headers, format) {
1789
- console.log(params, 'params');
1800
+ var isData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
1801
+ var isParams = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
1802
+
1790
1803
  if (params.params) {
1791
1804
  params.params.userId = params.params.userId || util["a" /* default */].getStorage('userId');
1792
1805
  } else {
1793
1806
  params.userId = params.userId || util["a" /* default */].getStorage('userId');
1794
1807
  }
1795
- return axios_ajax(url, params, headers, format, 'post');
1808
+ return axios_ajax(url, params, headers, format, 'post', isData, isParams);
1796
1809
  }
1797
1810
  };
1798
1811
  /* harmony default export */ var axios = (base);
@@ -1800,21 +1813,22 @@ var base = {
1800
1813
 
1801
1814
  var http_request = function request(options) {
1802
1815
  var fn = void 0;
1816
+ console.log(options, 'sss');
1803
1817
  switch (options.type) {
1804
1818
  case 'post':
1805
- fn = axios.post(options.url, options.params, options.headers, options.format);
1819
+ fn = axios.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);
1806
1820
  break;
1807
1821
  case 'POST':
1808
- fn = axios.post(options.url, options.params, options.headers, options.format);
1822
+ fn = axios.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);
1809
1823
  break;
1810
1824
  case 'get':
1811
- fn = axios.get(options.url, options.params, options.headers = {});
1825
+ fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
1812
1826
  break;
1813
1827
  case 'GET':
1814
- fn = axios.get(options.url, options.params, options.headers = {});
1828
+ fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
1815
1829
  break;
1816
1830
  default:
1817
- fn = axios.get(options.url, options.params, options.headers = {});
1831
+ fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
1818
1832
  }
1819
1833
  return fn;
1820
1834
  };
@@ -25,6 +25,8 @@ var ajax = function ajax(url) {
25
25
  var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
26
26
  var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
27
27
  var type = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'get';
28
+ var isData = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
29
+ var isParams = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : true;
28
30
 
29
31
  var http = _axios2.default.create({
30
32
  baseURL: apiUrl,
@@ -88,6 +90,13 @@ var ajax = function ajax(url) {
88
90
  if (config.url.search('mecp/overtime') !== -1 || config.url.search('mecp/leave') !== -1 || config.url.search('contractext') !== -1 || config.url.search('getSysParam') !== -1) {
89
91
  delete config.headers.deviceId;
90
92
  }
93
+ if (!isData) {
94
+ delete config.data;
95
+ }
96
+ if (!isParams) {
97
+ delete config.params;
98
+ }
99
+
91
100
  return config;
92
101
  }, function (error) {
93
102
  return Promise.error(error);
@@ -171,6 +180,8 @@ var base = {
171
180
  var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
172
181
  var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
173
182
  var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
183
+ var isData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
184
+ var isParams = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
174
185
 
175
186
  if (params.params && url.search('registerNew') === -1) {
176
187
  params.params.userId = params.params.userId ? params.params.userId : _util2.default.getStorage('userId');
@@ -189,16 +200,18 @@ var base = {
189
200
  }
190
201
  return ajax(url, {
191
202
  params: params
192
- }, headers, format);
203
+ }, headers, format, 'get', isData, isParams);
193
204
  },
194
205
  post: function post(url, params, headers, format) {
195
- console.log(params, 'params');
206
+ var isData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
207
+ var isParams = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
208
+
196
209
  if (params.params) {
197
210
  params.params.userId = params.params.userId || _util2.default.getStorage('userId');
198
211
  } else {
199
212
  params.userId = params.userId || _util2.default.getStorage('userId');
200
213
  }
201
- return ajax(url, params, headers, format, 'post');
214
+ return ajax(url, params, headers, format, 'post', isData, isParams);
202
215
  }
203
216
  };
204
217
  exports.default = base;
package/lib/utils/http.js CHANGED
@@ -10,21 +10,22 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
10
10
 
11
11
  var request = function request(options) {
12
12
  var fn = void 0;
13
+ console.log(options, 'sss');
13
14
  switch (options.type) {
14
15
  case 'post':
15
- fn = _axios2.default.post(options.url, options.params, options.headers, options.format);
16
+ fn = _axios2.default.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);
16
17
  break;
17
18
  case 'POST':
18
- fn = _axios2.default.post(options.url, options.params, options.headers, options.format);
19
+ fn = _axios2.default.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);
19
20
  break;
20
21
  case 'get':
21
- fn = _axios2.default.get(options.url, options.params, options.headers = {});
22
+ fn = _axios2.default.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
22
23
  break;
23
24
  case 'GET':
24
- fn = _axios2.default.get(options.url, options.params, options.headers = {});
25
+ fn = _axios2.default.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
25
26
  break;
26
27
  default:
27
- fn = _axios2.default.get(options.url, options.params, options.headers = {});
28
+ fn = _axios2.default.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
28
29
  }
29
30
  return fn;
30
31
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-mobiles",
3
- "version": "0.2.31",
3
+ "version": "0.2.32",
4
4
  "description": "eoss内部移动端业务组件",
5
5
  "main": "lib/eoss-mobile.common.js",
6
6
  "files": [
package/src/index.js CHANGED
@@ -105,7 +105,7 @@ if (typeof window !== 'undefined' && window.Vue) {
105
105
  }
106
106
 
107
107
  export default {
108
- version: '0.2.31',
108
+ version: '0.2.32',
109
109
  install,
110
110
  Button,
111
111
  ButtonGroup,
@@ -4,7 +4,15 @@ import $ from './util';
4
4
  import qs from 'qs';
5
5
  let apiUrl = $.getStorage('host');
6
6
 
7
- const ajax = (url, params = {}, headers = {}, format = true, type = 'get') => {
7
+ const ajax = (
8
+ url,
9
+ params = {},
10
+ headers = {},
11
+ format = true,
12
+ type = 'get',
13
+ isData = true,
14
+ isParams = true
15
+ ) => {
8
16
  let http = Axios.create({
9
17
  baseURL: apiUrl,
10
18
  timeout: 60000,
@@ -77,6 +85,13 @@ const ajax = (url, params = {}, headers = {}, format = true, type = 'get') => {
77
85
  ) {
78
86
  delete config.headers.deviceId;
79
87
  }
88
+ if (!isData) {
89
+ delete config.data;
90
+ }
91
+ if (!isParams) {
92
+ delete config.params;
93
+ }
94
+
80
95
  return config;
81
96
  },
82
97
  error => {
@@ -161,7 +176,14 @@ const ajax = (url, params = {}, headers = {}, format = true, type = 'get') => {
161
176
  // 响应拦截器
162
177
 
163
178
  const base = {
164
- get: (url, params = {}, headers = {}, format = false) => {
179
+ get: (
180
+ url,
181
+ params = {},
182
+ headers = {},
183
+ format = false,
184
+ isData = true,
185
+ isParams = true
186
+ ) => {
165
187
  if (params.params && url.search('registerNew') === -1) {
166
188
  params.params.userId = params.params.userId
167
189
  ? params.params.userId
@@ -185,17 +207,19 @@ const base = {
185
207
  params
186
208
  },
187
209
  headers,
188
- format
210
+ format,
211
+ 'get',
212
+ isData,
213
+ isParams
189
214
  );
190
215
  },
191
- post: (url, params, headers, format) => {
192
- console.log(params, 'params');
216
+ post: (url, params, headers, format, isData = true, isParams = true) => {
193
217
  if (params.params) {
194
218
  params.params.userId = params.params.userId || $.getStorage('userId');
195
219
  } else {
196
220
  params.userId = params.userId || $.getStorage('userId');
197
221
  }
198
- return ajax(url, params, headers, format, 'post');
222
+ return ajax(url, params, headers, format, 'post', isData, isParams);
199
223
  }
200
224
  };
201
225
  export default base;