@dcloudio/uni-cli-shared 2.0.2-alpha-4070220250613001 → 2.0.2-alpha-4070320250626001
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.
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
<view @click="_onclick">
|
|
3
3
|
<slot :options="options" :loading="loading" :error="errorMessage" />
|
|
4
4
|
<!-- #ifdef MP-WEIXIN -->
|
|
5
|
-
<uniad-plugin class="uniad-plugin" :adpid="adpid" :unit-id="unitId" @load="_onmpload" @close="_onmpclose" @error="_onmperror" @nextChannel="_onnextchannel"></uniad-plugin>
|
|
6
|
-
<uniad-plugin-wx v-if="wxchannel" class="uniad-plugin-wx" @load="_onmpload" @close="_onmpclose" @error="_onwxchannelerror"></uniad-plugin-wx>
|
|
5
|
+
<uniad-plugin class="uniad-plugin" data-com-type="wx" :adpid="adpid" :unit-id="unitId" @load="_onmpload" @close="_onmpclose" @error="_onmperror" @nextChannel="_onnextchannel"></uniad-plugin>
|
|
6
|
+
<uniad-plugin-wx v-if="wxchannel" class="uniad-plugin-wx" data-com-type="wx" @load="_onmpload" @close="_onmpclose" @error="_onwxchannelerror"></uniad-plugin-wx>
|
|
7
7
|
<!-- #endif -->
|
|
8
8
|
<!-- #ifdef MP-ALIPAY -->
|
|
9
9
|
<uniad-plugin class="uniad-plugin" :adpid="adpid" @create="_handleAdRef" @load="_onmpload" @close="_onmpclose" @error="_onmperror"></uniad-plugin>
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
<view @click="_onclick">
|
|
3
3
|
<slot :options="options" :loading="loading" :error="errorMessage" />
|
|
4
4
|
<!-- #ifdef MP-WEIXIN -->
|
|
5
|
-
<uniad-plugin class="uniad-plugin" :adpid="adpid" :unit-id="unitId" @load="_onmpload" @close="_onmpclose" @error="_onmperror" @nextChannel="_onnextchannel"></uniad-plugin>
|
|
6
|
-
<uniad-plugin-wx v-if="wxchannel" class="uniad-plugin-wx" @load="_onmpload" @close="_onmpclose" @error="_onwxchannelerror"></uniad-plugin-wx>
|
|
5
|
+
<uniad-plugin class="uniad-plugin" data-com-type="wx" :adpid="adpid" :unit-id="unitId" @load="_onmpload" @close="_onmpclose" @error="_onmperror" @nextChannel="_onnextchannel"></uniad-plugin>
|
|
6
|
+
<uniad-plugin-wx v-if="wxchannel" class="uniad-plugin-wx" data-com-type="wx" @load="_onmpload" @close="_onmpclose" @error="_onwxchannelerror"></uniad-plugin-wx>
|
|
7
7
|
<!-- #endif -->
|
|
8
8
|
<!-- #ifdef MP-ALIPAY -->
|
|
9
9
|
<uniad-plugin class="uniad-plugin" :adpid="adpid" @create="_handleAdRef" @load="_onmpload" @close="_onmpclose" @error="_onmperror"></uniad-plugin>
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
<view @click="_onclick">
|
|
3
3
|
<slot :options="options" :loading="loading" :error="errorMessage" />
|
|
4
4
|
<!-- #ifdef MP-WEIXIN -->
|
|
5
|
-
<uniad-plugin class="uniad-plugin" :adpid="adpid" :unit-id="unitId" @load="_onmpload" @close="_onmpclose" @error="_onmperror" @nextChannel="_onnextchannel"></uniad-plugin>
|
|
6
|
-
<uniad-plugin-wx v-if="wxchannel" class="uniad-plugin-wx" @load="_onmpload" @close="_onmpclose" @error="_onwxchannelerror"></uniad-plugin-wx>
|
|
5
|
+
<uniad-plugin class="uniad-plugin" data-com-type="wx" :adpid="adpid" :unit-id="unitId" @load="_onmpload" @close="_onmpclose" @error="_onmperror" @nextChannel="_onnextchannel"></uniad-plugin>
|
|
6
|
+
<uniad-plugin-wx v-if="wxchannel" class="uniad-plugin-wx" data-com-type="wx" @load="_onmpload" @close="_onmpclose" @error="_onwxchannelerror"></uniad-plugin-wx>
|
|
7
7
|
<!-- #endif -->
|
|
8
8
|
<!-- #ifdef MP-ALIPAY -->
|
|
9
9
|
<uniad-plugin class="uniad-plugin" :adpid="adpid" @create="_handleAdRef" @load="_onmpload" @close="_onmpclose" @error="_onmperror"></uniad-plugin>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* eslint-disable no-undef */
|
|
1
|
+
/* eslint-disable no-undef */
|
|
2
2
|
const adPlugin = requirePlugin('uni-ad')
|
|
3
3
|
|
|
4
4
|
const EventType = {
|
|
@@ -54,7 +54,7 @@ export default {
|
|
|
54
54
|
return {
|
|
55
55
|
loading: false,
|
|
56
56
|
userwx: false,
|
|
57
|
-
userUnitId: '',
|
|
57
|
+
userUnitId: '',
|
|
58
58
|
customFullscreen: '',
|
|
59
59
|
wxchannel: false,
|
|
60
60
|
errorMessage: null
|
|
@@ -168,9 +168,9 @@ export default {
|
|
|
168
168
|
case 4:
|
|
169
169
|
this.wxAdType = AdType.Banner
|
|
170
170
|
this.userwx = true
|
|
171
|
-
this.userUnitId = adData.posid
|
|
172
|
-
if (adData.tmpl_type === 24) {
|
|
173
|
-
this.customFullscreen = 'uni-ad-custom-fullscreen'
|
|
171
|
+
this.userUnitId = adData.posid
|
|
172
|
+
if (adData.tmpl_type === 24) {
|
|
173
|
+
this.customFullscreen = 'uni-ad-custom-fullscreen'
|
|
174
174
|
}
|
|
175
175
|
break
|
|
176
176
|
case 9:
|
|
@@ -260,7 +260,7 @@ export default {
|
|
|
260
260
|
case AdType.RewardedVideo:
|
|
261
261
|
if (!this._wxRewardedAd) {
|
|
262
262
|
return
|
|
263
|
-
}
|
|
263
|
+
}
|
|
264
264
|
// eslint-disable-next-line handle-callback-err
|
|
265
265
|
this._wxRewardedAd.show().catch((err) => {
|
|
266
266
|
this._wxRewardedAd.load().then(() => {
|
|
@@ -273,7 +273,7 @@ export default {
|
|
|
273
273
|
case AdType.Interstitial:
|
|
274
274
|
if (!this._wxInterstitialAd) {
|
|
275
275
|
return
|
|
276
|
-
}
|
|
276
|
+
}
|
|
277
277
|
// eslint-disable-next-line handle-callback-err
|
|
278
278
|
this._wxInterstitialAd.show().catch((err) => {
|
|
279
279
|
this._wxInterstitialAd.load().then(() => {
|
|
@@ -308,13 +308,15 @@ export default {
|
|
|
308
308
|
this._dispatchEvent(EventType.Error, err)
|
|
309
309
|
})
|
|
310
310
|
|
|
311
|
-
this._wxRewardedAd.onClose(res => {
|
|
311
|
+
this._wxRewardedAd.onClose(res => {
|
|
312
312
|
this._dispatchEvent(EventType.Close, res)
|
|
313
313
|
if (res.isEnded && this._hasCallback()) {
|
|
314
314
|
this._callServer()
|
|
315
315
|
}
|
|
316
316
|
})
|
|
317
317
|
|
|
318
|
+
this._wxRewardedAd.load().then(() => { }).catch((_) => { })
|
|
319
|
+
|
|
318
320
|
this.loading = true
|
|
319
321
|
},
|
|
320
322
|
|
|
@@ -344,6 +346,8 @@ export default {
|
|
|
344
346
|
this._dispatchEvent(EventType.Close, res)
|
|
345
347
|
})
|
|
346
348
|
|
|
349
|
+
this._wxInterstitialAd.load().then(() => { }).catch((_) => { })
|
|
350
|
+
|
|
347
351
|
this.loading = true
|
|
348
352
|
},
|
|
349
353
|
|
package/components/uniad.vue
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
@nextChannel="_onnextchannel"
|
|
10
10
|
/>
|
|
11
11
|
<!-- #ifdef MP-WEIXIN -->
|
|
12
|
-
<ad-custom v-if="userwx" :unit-id="userUnitId" class="uni-ad-custom" :class="[customFullscreen]" @load="_onmpload" @error="_onmperror"></ad-custom>
|
|
13
|
-
<uniad-plugin-wx v-if="wxchannel" class="uniad-plugin-wx" @load="_onmpload" @error="_onwxchannelerror"></uniad-plugin-wx>
|
|
12
|
+
<ad-custom v-if="userwx" :unit-id="userUnitId" class="uni-ad-custom" data-com-type="wx" :class="[customFullscreen]" @load="_onmpload" @error="_onmperror"></ad-custom>
|
|
13
|
+
<uniad-plugin-wx v-if="wxchannel" class="uniad-plugin-wx" data-com-type="wx" @load="_onmpload" @error="_onwxchannelerror"></uniad-plugin-wx>
|
|
14
14
|
<!-- #endif -->
|
|
15
15
|
</view>
|
|
16
16
|
</template>
|
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-4070320250626001",
|
|
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": "fb5ef292c92c0e71c7538151b525b8a8cbbde68b"
|
|
31
31
|
}
|