diff --git a/packages/uni-components/src/components/ad-draw.ts b/packages/uni-components/src/components/ad-draw.ts
index e2b7b1c1e1a3ae4d697c6631d2755d9517f619be..24a666b04d987acc400dfe764e648e2b5593b427 100644
--- a/packages/uni-components/src/components/ad-draw.ts
+++ b/packages/uni-components/src/components/ad-draw.ts
@@ -15,7 +15,8 @@ export function getAdData(
}
// TODO 缺少语法提示 getDrawAds
- plus.ad.getAds(
+ // @ts-ignore
+ plus.ad.getDrawAds(
{
adpid: String(adpid),
count: 3,
diff --git a/packages/uni-components/src/nvue/ad-draw/index.tsx b/packages/uni-components/src/nvue/ad-draw/index.tsx
index bcb8c638a2efc2b196015f9038fc1eecba9a8936..46451cf266b4a6b70711693d54b8ab6a9a8d3fd3 100644
--- a/packages/uni-components/src/nvue/ad-draw/index.tsx
+++ b/packages/uni-components/src/nvue/ad-draw/index.tsx
@@ -49,7 +49,7 @@ export default defineComponent({
)
const listeners = {
- dislike(e: Event) {
+ onDislike(e: Event) {
trigger(AdEventType.close, e)
},
}
@@ -68,7 +68,7 @@ export default defineComponent({
const { data } = state
return (
@@ -97,7 +97,7 @@ function _loadAdData(
state.width,
state.height,
(res: any) => {
- state.data = res.data
+ state.data = res
trigger(AdEventType.load, {})
},
(err: any) => {
diff --git a/packages/uni-components/src/nvue/ad/index.tsx b/packages/uni-components/src/nvue/ad/index.tsx
index 9c10d6cc7156327f6230627496731c189795b55a..c70bc5ccfc8af170ba500eacabbbb3868e303dd4 100644
--- a/packages/uni-components/src/nvue/ad/index.tsx
+++ b/packages/uni-components/src/nvue/ad/index.tsx
@@ -64,17 +64,22 @@ export default defineComponent({
})
const listeners = {
- downloadchange(e: Event) {
+ onDownloadchange(e: Event) {
trigger(AdEventType.downloadchange, e)
},
- dislike(e: Event) {
+ onDislike(e: Event) {
trigger(AdEventType.close, e)
},
}
return () => {
- const { data } = state
- return
+ return (
+
+ )
}
},
})
@@ -99,7 +104,7 @@ function _loadAdData(
width: state.width,
},
(res: any) => {
- state.data = res.data
+ state.data = res
trigger(AdEventType.load, {})
},
(err: any) => {
diff --git a/packages/uni-components/src/nvue/components.ts b/packages/uni-components/src/nvue/components.ts
index c5d1fdd804b464c74ec2d5385e7fc0784f09041c..1f39c8430b2e99d58fb5677f66b4b7d10868e10c 100644
--- a/packages/uni-components/src/nvue/components.ts
+++ b/packages/uni-components/src/nvue/components.ts
@@ -18,6 +18,8 @@ import Icon from './icon'
import Swiper from './swiper'
import SwiperItem from './swiper-item'
import RichText from './rich-text'
+import Ad from './ad'
+import AdDraw from './ad-draw'
export default {
Navigator,
Label,
@@ -39,4 +41,6 @@ export default {
Swiper,
SwiperItem,
RichText,
+ Ad,
+ AdDraw,
}