|
@@ -19,6 +19,7 @@ function YLQCustom(props: PropsWithChildren<CustomPropsType>) {
|
|
|
let {
|
|
|
adpId,
|
|
|
width,
|
|
|
+ closeIcon,
|
|
|
onEmitOpenMiniProgram,
|
|
|
onError,
|
|
|
onLoad,
|
|
@@ -93,12 +94,16 @@ function YLQCustom(props: PropsWithChildren<CustomPropsType>) {
|
|
|
|
|
|
function videoClick() {
|
|
|
adActionReport(reportBusinessType.adClick, 'adClick')
|
|
|
- videoOpenMiniProgram()
|
|
|
+ const { landingPageAddress, landingPageType, landingPageAppid } = adData
|
|
|
+ if (landingPageType === 1) { // 半屏小程序
|
|
|
+ openOriginMiniProgram(landingPageAddress, landingPageAppid)
|
|
|
+ } else if (landingPageType === 2) { // h5
|
|
|
+ openSelfMiniProgram(landingPageAddress)
|
|
|
+ }
|
|
|
closeCustom()
|
|
|
}
|
|
|
|
|
|
- function videoOpenMiniProgram() {
|
|
|
- const { landingPageAddress } = adData
|
|
|
+ function openSelfMiniProgram(landingPageAddress) {
|
|
|
const query = queryURLParams(createAdActionReportData())
|
|
|
|
|
|
adActionReport(reportBusinessType.adPlay, 'adOpen')
|
|
@@ -107,7 +112,16 @@ function YLQCustom(props: PropsWithChildren<CustomPropsType>) {
|
|
|
|
|
|
onEmitOpenMiniProgram(
|
|
|
'wx5ef216d1caf4a0ea',
|
|
|
- `/pages/ad-launch-page/index?q=${path}`
|
|
|
+ `/pages/ad-launch-page/index?q=${path}`,
|
|
|
+ {}
|
|
|
+ )
|
|
|
+ }
|
|
|
+
|
|
|
+ function openOriginMiniProgram(landingPageAddress, landingPageAppid) {
|
|
|
+ onEmitOpenMiniProgram(
|
|
|
+ landingPageAppid,
|
|
|
+ landingPageAddress,
|
|
|
+ { pqtId }
|
|
|
)
|
|
|
}
|
|
|
|
|
@@ -183,7 +197,8 @@ function YLQCustom(props: PropsWithChildren<CustomPropsType>) {
|
|
|
bidCreativeParam: JSON.stringify(bidCreativeParam || {}), // {}
|
|
|
adpId,
|
|
|
pqtId,
|
|
|
- ownAdSystemType
|
|
|
+ ownAdSystemType,
|
|
|
+ clientTimestamp: new Date().getTime()
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -206,8 +221,8 @@ function YLQCustom(props: PropsWithChildren<CustomPropsType>) {
|
|
|
广告
|
|
|
</View>
|
|
|
{/* 关闭icon */}
|
|
|
- <View className='close-icon' onClick={closeCustom}>
|
|
|
- </View>
|
|
|
+ {closeIcon && <View className='close-icon' onClick={closeCustom}>
|
|
|
+ </View>}
|
|
|
<Custom
|
|
|
width={width}
|
|
|
adData={adData}
|