@dcloudio/uni-cli-shared 2.0.2-alpha-4070620250722001 → 2.0.2-alpha-4080120250820001
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/components/ad.mixin.mp-weixin.js +15 -17
- package/package.json +2 -2
|
@@ -206,7 +206,7 @@ export default {
|
|
|
206
206
|
},
|
|
207
207
|
|
|
208
208
|
_onwxchannelerror (e) {
|
|
209
|
-
this._dispatchEvent(EventType.Error, e.detail)
|
|
209
|
+
this._dispatchEvent(EventType.Error, e.detail || e)
|
|
210
210
|
},
|
|
211
211
|
|
|
212
212
|
_dispatchEvent (type, data) {
|
|
@@ -250,12 +250,16 @@ export default {
|
|
|
250
250
|
switch (this.wxAdType) {
|
|
251
251
|
case AdType.RewardedVideo:
|
|
252
252
|
if (this._wxRewardedAd) {
|
|
253
|
-
this._wxRewardedAd.load()
|
|
253
|
+
this._wxRewardedAd.load().catch((err) => {
|
|
254
|
+
this._dispatchEvent(EventType.Error, err)
|
|
255
|
+
})
|
|
254
256
|
}
|
|
255
257
|
break
|
|
256
258
|
case AdType.Interstitial:
|
|
257
259
|
if (this._wxInterstitialAd) {
|
|
258
|
-
this._wxInterstitialAd.load()
|
|
260
|
+
this._wxInterstitialAd.load().catch((err) => {
|
|
261
|
+
this._dispatchEvent(EventType.Error, err)
|
|
262
|
+
})
|
|
259
263
|
}
|
|
260
264
|
break
|
|
261
265
|
}
|
|
@@ -275,11 +279,7 @@ export default {
|
|
|
275
279
|
}
|
|
276
280
|
// eslint-disable-next-line handle-callback-err
|
|
277
281
|
this._wxRewardedAd.show().catch((err) => {
|
|
278
|
-
this.
|
|
279
|
-
this._wxRewardedAd.show()
|
|
280
|
-
}).catch((err) => {
|
|
281
|
-
this._dispatchEvent(EventType.Error, err)
|
|
282
|
-
})
|
|
282
|
+
this._dispatchEvent(EventType.Error, err)
|
|
283
283
|
})
|
|
284
284
|
break
|
|
285
285
|
case AdType.Interstitial:
|
|
@@ -288,11 +288,7 @@ export default {
|
|
|
288
288
|
}
|
|
289
289
|
// eslint-disable-next-line handle-callback-err
|
|
290
290
|
this._wxInterstitialAd.show().catch((err) => {
|
|
291
|
-
this.
|
|
292
|
-
this._wxInterstitialAd.show()
|
|
293
|
-
}).catch((err) => {
|
|
294
|
-
this._dispatchEvent(EventType.Error, err)
|
|
295
|
-
})
|
|
291
|
+
this._dispatchEvent(EventType.Error, err)
|
|
296
292
|
})
|
|
297
293
|
break
|
|
298
294
|
}
|
|
@@ -326,8 +322,6 @@ export default {
|
|
|
326
322
|
this._callServer()
|
|
327
323
|
}
|
|
328
324
|
})
|
|
329
|
-
|
|
330
|
-
this._wxRewardedAd.load().then(() => { }).catch((_) => { })
|
|
331
325
|
|
|
332
326
|
this.loading = true
|
|
333
327
|
},
|
|
@@ -345,7 +339,9 @@ export default {
|
|
|
345
339
|
this._dispatchEvent(EventType.Load, {})
|
|
346
340
|
if (this._userInvokeShowFlag) {
|
|
347
341
|
this._userInvokeShowFlag = false
|
|
348
|
-
this._wxInterstitialAd.show()
|
|
342
|
+
this._wxInterstitialAd.show().catch((err) => {
|
|
343
|
+
this._dispatchEvent(EventType.Error, err)
|
|
344
|
+
})
|
|
349
345
|
}
|
|
350
346
|
})
|
|
351
347
|
|
|
@@ -358,7 +354,9 @@ export default {
|
|
|
358
354
|
this._dispatchEvent(EventType.Close, res)
|
|
359
355
|
})
|
|
360
356
|
|
|
361
|
-
this._wxInterstitialAd.load().
|
|
357
|
+
this._wxInterstitialAd.load().catch((err) => {
|
|
358
|
+
this._dispatchEvent(EventType.Error, err)
|
|
359
|
+
})
|
|
362
360
|
|
|
363
361
|
this.loading = true
|
|
364
362
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcloudio/uni-cli-shared",
|
|
3
|
-
"version": "2.0.2-alpha-
|
|
3
|
+
"version": "2.0.2-alpha-4080120250820001",
|
|
4
4
|
"description": "uni-cli-shared",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"postcss-urlrewrite": "^0.2.2",
|
|
28
28
|
"strip-json-comments": "^2.0.1"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "1b189efe8ae8539a5bc8263bccc28b25d9816771"
|
|
31
31
|
}
|