@dcloudio/uni-cli-shared 2.0.1-alpha-3061020221121002 → 2.0.2-3061420221215001

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.
@@ -67,21 +67,14 @@
67
67
  this._uniAdPlugin.show()
68
68
  },
69
69
  getAdData() {
70
- if (!this.adpid) {
71
- this.$emit(events.error, {
72
- code: -5002,
73
- message: 'invalid adpid'
74
- })
75
- return
76
- }
77
-
78
70
  this.loading = true
79
71
 
80
72
  uni.request({
81
73
  url: AD_URL,
82
74
  method: 'POST',
83
75
  data: {
84
- adpid: this.adpid
76
+ adpid: this.adpid || '',
77
+ appid: uni.getAppBaseInfo().appId
85
78
  },
86
79
  timeout: 5000,
87
80
  dataType: 'json',
@@ -23,9 +23,13 @@ function parseUniExtApis(vite = true) {
23
23
  if (!fs_extra_1.default.existsSync(pkgPath)) {
24
24
  return;
25
25
  }
26
- const exports = (_b = (_a = JSON.parse(fs_extra_1.default.readFileSync(pkgPath, 'utf8'))) === null || _a === void 0 ? void 0 : _a.uni_modules) === null || _b === void 0 ? void 0 : _b['uni-ext-api'];
27
- if (exports) {
28
- Object.assign(injects, parseInjects(vite, process.env.UNI_PLATFORM === 'h5' ? 'web' : process.env.UNI_PLATFORM, `@/uni_modules/${uniModuleDir}`, exports));
26
+ try {
27
+ const exports = (_b = (_a = JSON.parse(fs_extra_1.default.readFileSync(pkgPath, 'utf8'))) === null || _a === void 0 ? void 0 : _a.uni_modules) === null || _b === void 0 ? void 0 : _b['uni-ext-api'];
28
+ if (exports) {
29
+ Object.assign(injects, parseInjects(vite, process.env.UNI_PLATFORM === 'h5' ? 'web' : process.env.UNI_PLATFORM, `@/uni_modules/${uniModuleDir}`, exports));
30
+ }
31
+ }
32
+ catch (e) {
29
33
  }
30
34
  });
31
35
  return injects;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-cli-shared",
3
- "version": "2.0.1-alpha-3061020221121002",
3
+ "version": "2.0.2-3061420221215001",
4
4
  "description": "uni-cli-shared",
5
5
  "main": "lib/index.js",
6
6
  "repository": {
@@ -25,5 +25,5 @@
25
25
  "postcss-urlrewrite": "^0.2.2",
26
26
  "strip-json-comments": "^2.0.1"
27
27
  },
28
- "gitHead": "55d7a28448a8588ecc25a6d2da6dc0ecd383e2a5"
28
+ "gitHead": "3332ef1b81e44bfdc1b4c44cc39417d916cf9de9"
29
29
  }