QExpose 接管曝光任务

API兼容性:
QRN:v5.4.9
iOS:不支持
Android:60001486

QExpose用来实现业务接管曝光任务, 具体背景和实现详见 wiki

引入

import {  QExpose } from 'qunar-react-native';

API

QExpose.takeOverExpose ({hybridId:'xxx',page:'xxx'}, (suc) => { }, (fail) => { })
##### QExpose.takeOverExpose用来接管曝光任务,调用这个api后,曝光任务会被停止,等待调用下面的开始曝光api:QExpose.startExposeIfRenderEnd
QExpose.startExposeIfRenderEnd ({hybridId:'xxx',page:'xxx'}, (suc) => { }, (fail) => { })
##### QExpose.startExposeIfRenderEnd({hybridId:'xxx',page:'xxx'}, (suc) => { }, (fail) => { })
需要注意的是:QExpose.takeOverExpose和QExpose.startExposeIfRenderEnd是成对出现的,以page为设置单位调用

使用说明

import {  QExpose } from 'qunar-react-native';

    //接管曝光
    componentDidMount() {
         QExpose.takeOverExpose({hybridId:'xxx',page:'xxx'}, (suc) => { }, (fail) => { })}
    
   //渲染完成后,通知框架可以开始曝光 方法名仅供参考
    renderDone() {
        QExpose.startExposeIfRenderEnd({hybridId:'xxx',page:'xxx'}, (suc) => { }, (fail) => { })
    }