@tarojs/taro-h5 3.6.0-beta.1 → 3.6.0-beta.2

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.esm.js CHANGED
@@ -35,7 +35,7 @@ class MethodHandler {
35
35
  else {
36
36
  res.errMsg = `${this.methodName}:fail ${res.errMsg}`;
37
37
  }
38
- if (!isProd) {
38
+ if (process.env.NODE_ENV !== 'production') {
39
39
  console.error(res.errMsg);
40
40
  }
41
41
  isFunction(this.__fail) && this.__fail(res);
@@ -150,7 +150,6 @@ const isValidColor = (color) => {
150
150
  };
151
151
 
152
152
  /* eslint-disable prefer-promise-reject-errors */
153
- const isProd = process.env.NODE_ENV === 'production';
154
153
  function shouldBeObject(target) {
155
154
  if (target && typeof target === 'object')
156
155
  return { flag: true };
@@ -232,7 +231,7 @@ function temporarilyNotSupport(name = '') {
232
231
  type: 'method',
233
232
  category: 'temporarily',
234
233
  });
235
- if (isProd) {
234
+ if (process.env.NODE_ENV === 'production') {
236
235
  console.warn(errMsg);
237
236
  return handle.success({ errMsg });
238
237
  }
@@ -252,7 +251,7 @@ function weixinCorpSupport(name) {
252
251
  type: 'method',
253
252
  category: 'weixin_corp',
254
253
  });
255
- if (isProd) {
254
+ if (process.env.NODE_ENV === 'production') {
256
255
  console.warn(errMsg);
257
256
  return handle.success({ errMsg });
258
257
  }
@@ -272,7 +271,7 @@ function permanentlyNotSupport(name = '') {
272
271
  type: 'method',
273
272
  category: 'permanently',
274
273
  });
275
- if (isProd) {
274
+ if (process.env.NODE_ENV === 'production') {
276
275
  console.warn(errMsg);
277
276
  return handle.success({ errMsg });
278
277
  }
@@ -637,6 +636,8 @@ const getDeviceInfo = () => {
637
636
  const info = {
638
637
  /** 应用二进制接口类型(仅 Android 支持) */
639
638
  abi: '',
639
+ /** 设备二进制接口类型(仅 Android 支持) */
640
+ deviceAbi: '',
640
641
  /** 设备性能等级(仅Android小游戏)。取值为:-2 或 0(该设备无法运行小游戏),-1(性能未知),>=1(设备性能值,该值越高,设备性能越好,目前最高不到50) */
641
642
  benchmarkLevel: -1,
642
643
  /** 设备品牌 */
@@ -646,7 +647,9 @@ const getDeviceInfo = () => {
646
647
  /** 操作系统及版本 */
647
648
  system: md.os(),
648
649
  /** 客户端平台 */
649
- platform: navigator.platform
650
+ platform: navigator.platform,
651
+ /** 设备二进制接口类型(仅 Android 支持) */
652
+ CPUType: '',
650
653
  };
651
654
  return info;
652
655
  };