We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9620a32 commit 3ae7d07Copy full SHA for 3ae7d07
pages/component/ad/ad.vue
@@ -2,10 +2,10 @@
2
<view>
3
<page-head :title="title"></page-head>
4
<view class="ad-view">
5
- <ad adpid="1111111111" :unit-id="unitId" type="feed" @load="adload"></ad>
+ <ad adpid="1111111111" :unit-id="unitId" type="feed" @load="adload" @error="aderror"></ad>
6
<!-- #ifdef APP-PLUS -->
7
<view class="ad-tips" v-if="!isLoad">
8
- <text>广告加载中...</text>
+ <text>{{adMessage}}</text>
9
</view>
10
<!-- #endif -->
11
<!-- #ifndef APP-PLUS -->
@@ -26,7 +26,8 @@
26
return {
27
title: 'AD组件',
28
unitId: '',
29
- isLoad: false
+ isLoad: false,
30
+ adMessage: "广告加载中..."
31
}
32
},
33
onLoad() {
@@ -44,6 +45,9 @@
44
45
adload() {
46
this.isLoad = true;
47
48
+ aderror(e) {
49
+ this.adMessage = e.detail.errMsg;
50
+ },
51
gotoapi() {
52
uni.navigateTo({
53
url: "/pages/API/rewarded-video-ad/rewarded-video-ad"
0 commit comments