Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
unidocs-zh
提交
ee062a70
unidocs-zh
项目概览
DCloud
/
unidocs-zh
通知
3172
Star
105
Fork
804
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
93
列表
看板
标记
里程碑
合并请求
67
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
unidocs-zh
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
93
Issue
93
列表
看板
标记
里程碑
合并请求
67
合并请求
67
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
ee062a70
编写于
4月 28, 2022
作者:
study夏羽
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
调整ad示例
上级
80e7bb28
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
39 addition
and
33 deletion
+39
-33
docs/component/ad-content-page.md
docs/component/ad-content-page.md
+2
-2
docs/component/ad-draw.md
docs/component/ad-draw.md
+1
-1
docs/component/ad-error-code.md
docs/component/ad-error-code.md
+1
-0
docs/component/ad-fullscreen-video.md
docs/component/ad-fullscreen-video.md
+6
-5
docs/component/ad-grid.md
docs/component/ad-grid.md
+3
-0
docs/component/ad-interstitial.md
docs/component/ad-interstitial.md
+7
-6
docs/component/ad-rewarded-video.md
docs/component/ad-rewarded-video.md
+18
-18
docs/component/ad.md
docs/component/ad.md
+1
-1
未找到文件。
docs/component/ad-content-page.md
浏览文件 @
ee062a70
...
...
@@ -80,10 +80,10 @@ export default {
},
methods
:
{
onadload
(
e
)
{
console
.
log
(
"
on
load
"
);
console
.
log
(
"
on
adload
"
,
e
);
},
onaderror
(
e
)
{
console
.
log
(
"
on
error
"
);
console
.
log
(
"
on
aderror
"
,
e
);
}
}
}
...
...
docs/component/ad-draw.md
浏览文件 @
ee062a70
...
...
@@ -136,7 +136,7 @@
)
},
onload
(
e
)
{
console
.
log
(
"
onload
"
);
console
.
log
(
"
onload
"
,
e
);
},
onerror
(
e
)
{
console
.
log
(
"
onerror:
"
+
e
.
detail
.
errCode
+
"
message::
"
+
e
.
detail
.
errMsg
);
...
...
docs/component/ad-error-code.md
浏览文件 @
ee062a70
...
...
@@ -23,6 +23,7 @@ code|message|
-
App端聚合的Sigmob(iOS):
[
错误码详情
](
http://docs.sigmob.cn/#/sdk/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98/ios/
)
-
App端聚合的Sigmob(Android):
[
错误码详情
](
http://docs.sigmob.cn/#/sdk/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98/android/
)
-
App端聚合的快手错误码
|code|message|
|:-:|:-:|
|40001|没有网络|
...
...
docs/component/ad-fullscreen-video.md
浏览文件 @
ee062a70
...
...
@@ -71,7 +71,7 @@
```
html
<template>
<view
class=
"content"
>
<ad-fullscreen-video
adpid=
"1507000611"
:loadnext=
"true"
v-slot:default=
"{loading, error}"
@
load=
"on
load"
@
close=
"onclose"
@
close=
"on
error"
>
<ad-fullscreen-video
adpid=
"1507000611"
:loadnext=
"true"
v-slot:default=
"{loading, error}"
@
load=
"on
adload"
@
close=
"onadclose"
@
error=
"onad
error"
>
<button
:disabled=
"loading"
:loading=
"loading"
>
显示广告
</button>
<view
v-if=
"error"
>
{{error}}
</view>
</ad-fullscreen-video>
...
...
@@ -85,12 +85,13 @@ export default {
}
},
methods
:
{
onload
(
e
)
{
on
ad
load
(
e
)
{
console
.
log
(
'
广告数据加载成功
'
);
},
onclose
(
e
)
{
onadclose
(
e
)
{
console
.
log
(
"
onadclose
"
,
e
);
},
onerror
(
e
)
{
on
ad
error
(
e
)
{
// 广告加载失败
console
.
log
(
"
onerror:
"
,
e
.
detail
);
}
...
...
@@ -101,4 +102,4 @@ export default {
**错误码**
[
错误码相关问题排查
](
https://unia
d.dcloud.net.cn/component/ad-error-code
)
[
错误码相关问题排查
](
https://unia
pp.dcloud.net.cn/component/ad-error-code.html
)
docs/component/ad-grid.md
浏览文件 @
ee062a70
...
...
@@ -67,10 +67,13 @@ Grid 广告在创建后会自动拉取广告。开发者可以通过 ad 组件
},
methods
:
{
adLoad
()
{
console
.
log
(
"
adLoad
"
,
e
);
},
adError
(
e
)
{
console
.
log
(
"
adError
"
,
e
);
},
adClose
(
e
)
{
console
.
log
(
"
adClose
"
,
e
);
}
}
}
...
...
docs/component/ad-interstitial.md
浏览文件 @
ee062a70
...
...
@@ -72,7 +72,7 @@ HBuilder 基座的测试广告位 `adpid` 为 `1111111113`
```
html
<template>
<view
class=
"content"
>
<ad-interstitial
adpid=
"1111111113"
:loadnext=
"true"
v-slot:default=
"{loading, error}"
@
load=
"on
load"
@
close=
"onclose"
@
close=
"on
error"
>
<ad-interstitial
adpid=
"1111111113"
:loadnext=
"true"
v-slot:default=
"{loading, error}"
@
load=
"on
adload"
@
close=
"onadclose"
@
error=
"onad
error"
>
<button
:disabled=
"loading"
:loading=
"loading"
>
显示广告
</button>
<view
v-if=
"error"
>
{{error}}
</view>
</ad-interstitial>
...
...
@@ -86,14 +86,15 @@ export default {
}
},
methods
:
{
onload
(
e
)
{
on
ad
load
(
e
)
{
console
.
log
(
'
广告数据加载成功
'
);
},
onclose
(
e
)
{
onadclose
(
e
)
{
console
.
log
(
"
onadclose
"
,
e
);
},
onerror
(
e
)
{
on
ad
error
(
e
)
{
// 广告加载失败
console
.
log
(
"
onerror:
"
,
e
.
detail
);
console
.
log
(
"
on
ad
error:
"
,
e
.
detail
);
}
}
}
...
...
@@ -102,4 +103,4 @@ export default {
**错误码**
[
错误码相关问题排查
](
https://unia
d.dcloud.net.cn/component/ad-error-code
)
[
错误码相关问题排查
](
https://unia
pp.dcloud.net.cn/component/ad-error-code.html
)
docs/component/ad-rewarded-video.md
浏览文件 @
ee062a70
...
...
@@ -92,7 +92,7 @@
```
html
<template>
<view
class=
"content"
>
<ad-rewarded-video
adpid=
"1507000611"
:loadnext=
"true"
v-slot:default=
"{loading, error}"
@
load=
"on
AdLoad"
@
close=
"onAdClose"
@
error=
"onAdE
rror"
>
<ad-rewarded-video
adpid=
"1507000611"
:loadnext=
"true"
v-slot:default=
"{loading, error}"
@
load=
"on
adload"
@
close=
"onadclose"
@
error=
"onade
rror"
>
<button
:disabled=
"loading"
:loading=
"loading"
>
显示广告
</button>
<view
v-if=
"error"
>
{{error}}
</view>
</ad-rewarded-video>
...
...
@@ -106,23 +106,23 @@ export default {
}
},
methods
:
{
on
AdL
oad
(
e
)
{
on
adl
oad
(
e
)
{
console
.
log
(
'
广告数据加载成功
'
);
},
on
AdC
lose
(
e
)
{
on
adc
lose
(
e
)
{
const
detail
=
e
.
detail
// 用户点击了【关闭广告】按钮
if
(
detail
&&
detail
.
isEnded
)
{
// 正常播放结束
console
.
log
(
"
on
AdC
lose
"
+
detail
.
isEnded
);
console
.
log
(
"
on
adc
lose
"
+
detail
.
isEnded
);
}
else
{
// 播放中途退出
console
.
log
(
"
on
C
lose
"
+
detail
.
isEnded
);
console
.
log
(
"
on
adc
lose
"
+
detail
.
isEnded
);
}
},
on
AdE
rror
(
e
)
{
on
ade
rror
(
e
)
{
// 广告加载失败
console
.
log
(
"
on
AdE
rror:
"
,
e
.
detail
);
console
.
log
(
"
on
ade
rror:
"
,
e
.
detail
);
}
}
}
...
...
@@ -134,7 +134,7 @@ export default {
```
html
<template>
<view
class=
"content"
>
<ad-rewarded-video
:adpid=
"adpids"
:loadnext=
"true"
v-slot:default=
"{loading, error}"
@
load=
"on
AdLoad"
@
close=
"onAdClose"
@
close=
"onAdE
rror"
>
<ad-rewarded-video
:adpid=
"adpids"
:loadnext=
"true"
v-slot:default=
"{loading, error}"
@
load=
"on
adload"
@
close=
"onadclose"
@
error=
"onade
rror"
>
<button
:disabled=
"loading"
:loading=
"loading"
>
显示广告
</button>
<view
v-if=
"error"
>
{{error}}
</view>
</ad-rewarded-video>
...
...
@@ -149,23 +149,23 @@ export default {
}
},
methods
:
{
on
AdL
oad
(
e
)
{
on
adl
oad
(
e
)
{
console
.
log
(
'
广告数据加载成功
'
);
},
on
AdC
lose
(
e
)
{
on
adc
lose
(
e
)
{
const
detail
=
e
.
detail
// 用户点击了【关闭广告】按钮
if
(
detail
&&
detail
.
isEnded
)
{
// 正常播放结束
console
.
log
(
"
on
AdC
lose
"
+
detail
.
isEnded
);
console
.
log
(
"
on
adc
lose
"
+
detail
.
isEnded
);
}
else
{
// 播放中途退出
console
.
log
(
"
on
AdC
lose
"
+
detail
.
isEnded
);
console
.
log
(
"
on
adc
lose
"
+
detail
.
isEnded
);
}
},
on
AdE
rror
(
e
)
{
on
ade
rror
(
e
)
{
// 广告加载失败
console
.
log
(
"
on
AdE
rror:
"
,
e
.
detail
);
console
.
log
(
"
on
ade
rror:
"
,
e
.
detail
);
}
}
}
...
...
@@ -256,7 +256,7 @@ export default {
```
html
<template>
<view
class=
"content"
>
<ad-rewarded-video
adpid=
"1507000611"
:loadnext=
"true"
v-slot:default=
"{loading, error}"
@
close=
"on
AdC
lose"
>
<ad-rewarded-video
adpid=
"1507000611"
:loadnext=
"true"
v-slot:default=
"{loading, error}"
@
close=
"on
adc
lose"
>
<button
:disabled=
"loading"
:loading=
"loading"
>
显示广告
</button>
<view
v-if=
"error"
>
{{error}}
</view>
</ad-rewarded-video>
...
...
@@ -266,16 +266,16 @@ export default {
<script>
export
default
{
methods
:
{
on
AdC
lose
(
e
)
{
on
adc
lose
(
e
)
{
const
detail
=
e
.
detail
// 用户点击了【关闭广告】按钮
if
(
detail
&&
detail
.
isEnded
)
{
// 正常播放结束
// 这里应该联网给予用户激励。且这段代码应该做安全保护,详见下文中的“安全注意”
console
.
log
(
"
on
AdC
lose
"
+
detail
.
isEnded
);
console
.
log
(
"
on
adc
lose
"
+
detail
.
isEnded
);
}
else
{
// 播放中途退出
console
.
log
(
"
on
AdC
lose
"
+
detail
.
isEnded
);
console
.
log
(
"
on
adc
lose
"
+
detail
.
isEnded
);
}
}
}
...
...
docs/component/ad.md
浏览文件 @
ee062a70
...
...
@@ -287,4 +287,4 @@ export default {
**错误码**
[
错误码相关问题排查
](
https://unia
d.dcloud.net.cn/component/ad-error-code
)
[
错误码相关问题排查
](
https://unia
pp.dcloud.net.cn/component/ad-error-code.html
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录