dfws-ve-taro-request 0.1.5 → 0.1.7

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/dist/index.umd.js CHANGED
@@ -6823,7 +6823,7 @@
6823
6823
  return data;
6824
6824
  }
6825
6825
  var type = response.header['Content-Type'] || response.header['content-type'] || '';
6826
- if (typeof data.status == 'undefined' && !type.includes('text/html')) {
6826
+ if (typeof data.status == 'undefined' && (type && !type.includes('text/html'))) {
6827
6827
  data.status = 1;
6828
6828
  data.errMsg = "";
6829
6829
  }
@@ -6860,14 +6860,7 @@
6860
6860
  data: isMethod ? {} : isEncode ? encryptByDES(data, debug) : data,
6861
6861
  method: method,
6862
6862
  timeout: 15000,
6863
- header: {
6864
- 'authorization': Taro.getStorageSync('ticket'),
6865
- 've-version': header.version || '1.0.0',
6866
- 'dfws-params': header.params || '',
6867
- 'content-type': header["content-type"] || 'application/json;charset=utf-8',
6868
- 'resume-language': header['resume-language'] || 'zh-CN',
6869
- 'common-params': header['common-params'] || '',
6870
- }
6863
+ header: __assign(__assign({ 'authorization': Taro.getStorageSync('ticket') }, header), { 've-version': header.version || '1.0.0', 'dfws-params': header.params || '', 'content-type': header["content-type"] || 'application/json;charset=utf-8', 'resume-language': header['resume-language'] || 'zh-CN', 'common-params': header['common-params'] || '' })
6871
6864
  }).then(function (res) {
6872
6865
  var response = isEncode ? __assign(__assign({}, res), { data: decryptByDES(unescape(res.data), debug) }) : res;
6873
6866
  return checkStatus(response, { url: url, data: data, method: method }, Taro);