|
|
|
@ -336,9 +336,41 @@ export default function Index() { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 暂停播放回调
|
|
|
|
|
const pausePlay = () => { |
|
|
|
|
// 埋点
|
|
|
|
|
Taro.request({ |
|
|
|
|
method: 'POST', |
|
|
|
|
url: 'https://interapi.jm-kid.com/api/embedpoint', |
|
|
|
|
header: { |
|
|
|
|
authorization: `bearer ${Taro.getStorageSync('UserToken')}` |
|
|
|
|
}, |
|
|
|
|
data: { |
|
|
|
|
timestamp: Date.now(), |
|
|
|
|
action_code: '1005002', |
|
|
|
|
value: alldata[displayindex['index']].ResId |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const provingCdKey = () => { |
|
|
|
|
//记录验证成功后退出函数,避免反复执行
|
|
|
|
|
setisplay(true) |
|
|
|
|
|
|
|
|
|
// 埋点
|
|
|
|
|
Taro.request({ |
|
|
|
|
method: 'POST', |
|
|
|
|
url: 'https://interapi.jm-kid.com/api/embedpoint', |
|
|
|
|
header: { |
|
|
|
|
authorization: `bearer ${Taro.getStorageSync('UserToken')}` |
|
|
|
|
}, |
|
|
|
|
data: { |
|
|
|
|
timestamp: Date.now(), |
|
|
|
|
action_code: '1005003', |
|
|
|
|
value: alldata[displayindex['index']].ResId |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -355,6 +387,20 @@ export default function Index() { |
|
|
|
|
const { fullScreen } = e.detail |
|
|
|
|
fullScreen || setPlayListOpen(false) |
|
|
|
|
setIsFullscreen(fullScreen) |
|
|
|
|
|
|
|
|
|
// 埋点
|
|
|
|
|
Taro.request({ |
|
|
|
|
method: 'POST', |
|
|
|
|
url: 'https://interapi.jm-kid.com/api/embedpoint', |
|
|
|
|
header: { |
|
|
|
|
authorization: `bearer ${Taro.getStorageSync('UserToken')}` |
|
|
|
|
}, |
|
|
|
|
data: { |
|
|
|
|
timestamp: Date.now(), |
|
|
|
|
action_code: fullScreen ? '1005004' : '1005005', |
|
|
|
|
value: alldata[displayindex['index']].ResId |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 展示选集列表
|
|
|
|
@ -390,6 +436,7 @@ export default function Index() { |
|
|
|
|
muted={false} |
|
|
|
|
onClick={() => videoClick()} |
|
|
|
|
onEnded={() => continuePlay()} |
|
|
|
|
onPause={() => pausePlay()} |
|
|
|
|
onPlay={() => provingCdKey()} |
|
|
|
|
onFullScreenChange={(e) => fullScreenChange(e)} |
|
|
|
|
direction={90} |
|
|
|
@ -410,6 +457,7 @@ export default function Index() { |
|
|
|
|
playerid='tvp' |
|
|
|
|
vid={displayindex.src} |
|
|
|
|
onEnded={() => continuePlay()} |
|
|
|
|
onPause={() => pausePlay()} |
|
|
|
|
onPlay={() => provingCdKey()} |
|
|
|
|
autoplay |
|
|
|
|
/> : |
|
|
|
|