|
@@ -19,7 +19,7 @@ function YLQCustom(props: PropsWithChildren<CustomPropsType>) {
|
|
|
let {
|
|
|
adpId,
|
|
|
width,
|
|
|
- openEmbeddedMiniProgram,
|
|
|
+ onEmitOpenMiniProgram,
|
|
|
onError,
|
|
|
onLoad,
|
|
|
onClose
|
|
@@ -37,7 +37,7 @@ function YLQCustom(props: PropsWithChildren<CustomPropsType>) {
|
|
|
function init() {
|
|
|
if (
|
|
|
typeof adpId !== 'string' ||
|
|
|
- typeof openEmbeddedMiniProgram !== 'function'
|
|
|
+ typeof onEmitOpenMiniProgram !== 'function'
|
|
|
) {
|
|
|
catchError('参数错误', 1031)
|
|
|
return
|
|
@@ -107,7 +107,7 @@ function YLQCustom(props: PropsWithChildren<CustomPropsType>) {
|
|
|
const orgPath = `path=${encodeURIComponent(landingPageAddress)}&${query}`
|
|
|
const path = AES.encrypt(orgPath, 'wx5ef216d1caf4a0eaylq').toString()
|
|
|
|
|
|
- openEmbeddedMiniProgram(
|
|
|
+ onEmitOpenMiniProgram(
|
|
|
'wx5ef216d1caf4a0ea',
|
|
|
`/pages/ad-launch-page/index?q=${path}`
|
|
|
)
|
|
@@ -194,10 +194,11 @@ function YLQCustom(props: PropsWithChildren<CustomPropsType>) {
|
|
|
}
|
|
|
|
|
|
function catchError(message, code) {
|
|
|
- onError({ message, code })
|
|
|
+ onError(code)
|
|
|
setShow(false)
|
|
|
adActionReport(reportBusinessType.adError, 'adError', {
|
|
|
- errorCode: code
|
|
|
+ errorCode: code,
|
|
|
+ message
|
|
|
})
|
|
|
}
|
|
|
|