@dcloudio/uni-cli-shared 2.0.2-alpha-4070420250630001 → 2.0.2-alpha-4070520250704001
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.
|
@@ -65,6 +65,7 @@ export default {
|
|
|
65
65
|
this._loading = false
|
|
66
66
|
this._wxRewardedAd = null
|
|
67
67
|
this._wxInterstitialAd = null
|
|
68
|
+
this._userInvokeShowFlag = false
|
|
68
69
|
this._providerType = ProviderType.ShanHu
|
|
69
70
|
if (this.preload && this._canCreateAd()) {
|
|
70
71
|
this.load()
|
|
@@ -86,6 +87,10 @@ export default {
|
|
|
86
87
|
|
|
87
88
|
show (e) {
|
|
88
89
|
this.errorMessage = null
|
|
90
|
+
if (this.loading) {
|
|
91
|
+
this._userInvokeShowFlag = true
|
|
92
|
+
return
|
|
93
|
+
}
|
|
89
94
|
if (this._providerType === ProviderType.ShanHu) {
|
|
90
95
|
this._showAdInPlugin(this.selectComponent('.uniad-plugin'))
|
|
91
96
|
} else if (this._providerType === ProviderType.WeChat) {
|
|
@@ -121,14 +126,21 @@ export default {
|
|
|
121
126
|
_onmpload (e) {
|
|
122
127
|
this.loading = false
|
|
123
128
|
this._dispatchEvent(EventType.Load, {})
|
|
129
|
+
if (this._userInvokeShowFlag) {
|
|
130
|
+
this._userInvokeShowFlag = false
|
|
131
|
+
setTimeout(() => {
|
|
132
|
+
this.show()
|
|
133
|
+
}, 1)
|
|
134
|
+
}
|
|
124
135
|
},
|
|
125
136
|
|
|
126
137
|
_onmpclose (e) {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
const
|
|
131
|
-
const
|
|
138
|
+
const detail = e.detail || e
|
|
139
|
+
this._dispatchEvent(EventType.Close, detail)
|
|
140
|
+
if (detail.adsdata) {
|
|
141
|
+
const adv = detail.adv
|
|
142
|
+
const adsdata = detail.adsdata
|
|
143
|
+
const version = detail.version
|
|
132
144
|
|
|
133
145
|
/* eslint-disable no-undef */
|
|
134
146
|
uniCloud.callFunction({
|
|
@@ -146,9 +158,9 @@ export default {
|
|
|
146
158
|
}
|
|
147
159
|
})
|
|
148
160
|
|
|
149
|
-
delete
|
|
150
|
-
delete
|
|
151
|
-
delete
|
|
161
|
+
delete detail.adv
|
|
162
|
+
delete detail.adsdata
|
|
163
|
+
delete detail.version
|
|
152
164
|
}
|
|
153
165
|
},
|
|
154
166
|
|
|
@@ -184,6 +196,10 @@ export default {
|
|
|
184
196
|
}
|
|
185
197
|
} else if (adData.provider === 10018) {
|
|
186
198
|
this._providerType = ProviderType.WeChat
|
|
199
|
+
if (adData.tmpl_type === 24) {
|
|
200
|
+
this.customFullscreen = 'uni-ad-custom-fullscreen'
|
|
201
|
+
}
|
|
202
|
+
this.loading = true
|
|
187
203
|
this.selectComponent('.uniad-plugin-wx').setConfig(adData)
|
|
188
204
|
}
|
|
189
205
|
})
|
|
@@ -191,6 +207,7 @@ export default {
|
|
|
191
207
|
|
|
192
208
|
_onwxchannelerror (e) {
|
|
193
209
|
this.wxchannel = false
|
|
210
|
+
this._dispatchEvent(EventType.Error, e.detail)
|
|
194
211
|
this.$nextTick(() => {
|
|
195
212
|
this._providerType = ProviderType.ShanHu
|
|
196
213
|
this.selectComponent('.uniad-plugin').shanhuChannel()
|
package/components/uniad.vue
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
/>
|
|
11
11
|
<!-- #ifdef MP-WEIXIN -->
|
|
12
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>
|
|
13
|
+
<uniad-plugin-wx v-if="wxchannel" class="uniad-plugin-wx" :class="[customFullscreen]" data-com-type="wx" @load="_onmpload" @error="_onwxchannelerror"></uniad-plugin-wx>
|
|
14
14
|
<!-- #endif -->
|
|
15
15
|
</view>
|
|
16
16
|
</template>
|
|
@@ -33,7 +33,8 @@ export default {
|
|
|
33
33
|
</script>
|
|
34
34
|
|
|
35
35
|
<style>
|
|
36
|
-
.uni-ad-custom-fullscreen {
|
|
36
|
+
.uni-ad-custom-fullscreen {
|
|
37
|
+
display: flex;
|
|
37
38
|
height: 100vh;
|
|
38
39
|
}
|
|
39
40
|
</style>
|
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-4070520250704001",
|
|
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": "40ab5f0ac156bba5446030b572ad8e00b7961948"
|
|
31
31
|
}
|