API兼容性:
QRN:v5.4.9
iOS:不支持
Android:60001486
QExpose
用来实现业务接管曝光任务, 具体背景和实现详见 wiki
import { QExpose } from 'qunar-react-native';
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) => { })
import { QExpose } from 'qunar-react-native';
//接管曝光
componentDidMount() {
QExpose.takeOverExpose({hybridId:'xxx',page:'xxx'}, (suc) => { }, (fail) => { });
}
//渲染完成后,通知框架可以开始曝光 方法名仅供参考
renderDone() {
QExpose.startExposeIfRenderEnd({hybridId:'xxx',page:'xxx'}, (suc) => { }, (fail) => { })
}