dfws-ve-taro-request 0.1.4 → 0.1.5

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.js CHANGED
@@ -6818,7 +6818,8 @@ var checkStatus = function (response, options, Taro) {
6818
6818
  data.status = 0;
6819
6819
  return data;
6820
6820
  }
6821
- if (typeof data.status == 'undefined' && !response.header['Content-Type'].includes('text/html')) {
6821
+ var type = response.header['Content-Type'] || response.header['content-type'] || '';
6822
+ if (typeof data.status == 'undefined' && !type.includes('text/html')) {
6822
6823
  data.status = 1;
6823
6824
  data.errMsg = "";
6824
6825
  }
@@ -6859,7 +6860,7 @@ var request = (function (url, data, method, header, Taro, debug) {
6859
6860
  'authorization': Taro.getStorageSync('ticket'),
6860
6861
  've-version': header.version || '1.0.0',
6861
6862
  'dfws-params': header.params || '',
6862
- 'content-type': header["content-type"] || 'application/json',
6863
+ 'content-type': header["content-type"] || 'application/json;charset=utf-8',
6863
6864
  'resume-language': header['resume-language'] || 'zh-CN',
6864
6865
  'common-params': header['common-params'] || '',
6865
6866
  }