@dcloudio/vue-cli-plugin-uni 2.0.1-alpha-36720221017001 → 2.0.1-alpha-36720221017002

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/env.js CHANGED
@@ -341,7 +341,13 @@ if (
341
341
  )
342
342
 
343
343
  if (uniStatistics.enable === true) {
344
- process.env.UNI_USING_STAT = Number(uniStatistics.version) === 2 ? '2' : '1'
344
+ const uniStatLog = (text) => {
345
+ console.log()
346
+ console.warn(text)
347
+ console.log()
348
+ }
349
+ const version = Number(uniStatistics.version) === 2 ? '2' : '1'
350
+ process.env.UNI_USING_STAT = version
345
351
  // 获取服务空间配置信息
346
352
  const uniCloudConfig = uniStatistics.uniCloud || {}
347
353
  process.env.UNI_STATISTICS_CONFIG = JSON.stringify(uniStatistics)
@@ -350,35 +356,31 @@ if (
350
356
 
351
357
  if (process.env.NODE_ENV === 'production') {
352
358
  if (!process.UNI_STAT_CONFIG.appid) {
353
- console.log()
354
- console.warn(uniI18n.__('pluginUni.uniStatisticsNoAppid', {
359
+ uniStatLog(uniI18n.__('pluginUni.uniStatisticsNoAppid', {
355
360
  0: 'https://ask.dcloud.net.cn/article/36303'
356
361
  }))
357
- console.log()
358
362
  } else {
359
363
  if (!uniStatistics.version) {
360
- console.log()
361
- console.warn(uniI18n.__('pluginUni.uniStatisticsNoVersion', {
364
+ uniStatLog(uniI18n.__('pluginUni.uniStatisticsNoVersion', {
362
365
  0: 'https://uniapp.dcloud.io/uni-stat-v2.html'
363
366
  }))
364
- console.log()
365
367
  } else {
366
- console.log()
367
- console.warn(`已开启 uni统计${uniStatistics.version}.0 版本`)
368
- console.log()
368
+ uniStatLog(`已开启 uni统计${uniStatistics.version}.0 版本`)
369
+ if (version === '2') {
370
+ uniStatLog('【重要】因 HBuilderX 3.4.9 版本起,uni统计2.0 调整了安卓端 deviceId 获取方式,导致 uni统计2.0 App-Android平台部分统计数据不准确。如使用了HBuilderX 3.4.9 - 3.6.4版本且开通了uni统计2.0的应用,需要使用HBuilderX3.6.7及以上版本重新发布应用并升级 uniAdmin 云函数解决,详见:https://ask.dcloud.net.cn/article/40097')
371
+ }
369
372
  }
370
373
  }
371
374
  } else {
372
375
  if (!uniStatistics.version) {
373
- console.log()
374
- console.warn(uniI18n.__('pluginUni.uniStatisticsNoVersion', {
376
+ uniStatLog(uniI18n.__('pluginUni.uniStatisticsNoVersion', {
375
377
  0: 'https://uniapp.dcloud.io/uni-stat-v2.html'
376
378
  }))
377
- console.log()
378
379
  } else {
379
- console.log()
380
- console.warn(`已开启 uni统计${uniStatistics.version}.0 版本`)
381
- console.log()
380
+ uniStatLog(`已开启 uni统计${uniStatistics.version}.0 版本`)
381
+ if (version === '2') {
382
+ uniStatLog('【重要】因 HBuilderX 3.4.9 版本起,uni统计2.0 调整了安卓端 deviceId 获取方式,导致 uni统计2.0 App-Android平台部分统计数据不准确。如使用了HBuilderX 3.4.9 - 3.6.4版本且开通了uni统计2.0的应用,需要使用HBuilderX3.6.7及以上版本重新发布应用并升级 uniAdmin 云函数解决,详见:https://ask.dcloud.net.cn/article/40097')
383
+ }
382
384
  }
383
385
  }
384
386
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/vue-cli-plugin-uni",
3
- "version": "2.0.1-alpha-36720221017001",
3
+ "version": "2.0.1-alpha-36720221017002",
4
4
  "description": "uni-app plugin for vue-cli 3",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -17,7 +17,7 @@
17
17
  "author": "fxy060608",
18
18
  "license": "Apache-2.0",
19
19
  "dependencies": {
20
- "@dcloudio/uni-stat": "^2.0.1-alpha-36720221017001",
20
+ "@dcloudio/uni-stat": "^2.0.1-alpha-36720221017002",
21
21
  "buffer-json": "^2.0.0",
22
22
  "clone-deep": "^4.0.1",
23
23
  "cross-env": "^5.2.0",
@@ -41,5 +41,5 @@
41
41
  "copy-webpack-plugin": ">=5",
42
42
  "postcss": ">=7"
43
43
  },
44
- "gitHead": "7d7030aaaffab530253dc4cf02f87a13023c0d1f"
44
+ "gitHead": "fccb6f1da0c110a1ebb6f7530a60ee1388055751"
45
45
  }
@@ -5850,9 +5850,13 @@ function internalMixin(Vue) {
5850
5850
  if (this.$scope && event) {
5851
5851
  var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
5852
5852
  if (triggerEvent) {
5853
- triggerEvent.call(this.$scope, event, {
5854
- __args__: toArray(arguments, 1)
5855
- });
5853
+ try {
5854
+ triggerEvent.call(this.$scope, event, {
5855
+ __args__: toArray(arguments, 1)
5856
+ });
5857
+ } catch (error) {
5858
+
5859
+ }
5856
5860
  }
5857
5861
  }
5858
5862
  return oldEmit.apply(this, arguments)