Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

精准曝光组件介绍 | 码农Peter #7

Open
peterjx19 opened this issue Apr 17, 2022 · 0 comments
Open

精准曝光组件介绍 | 码农Peter #7

peterjx19 opened this issue Apr 17, 2022 · 0 comments

Comments

@peterjx19
Copy link
Owner

https://suiming.win/2021/11/14/cb7376238656/

近期有个需求,当一个组件在可视区中间80%范围内出现3S,即上传曝光。组件移出页面再已入,需要再次按规则曝光。 分析 因为tableview 和 scrollview 有复用机制,需要考虑曝光对象维护问题,为防止乱,用数据 id作为唯一标识。 手机资源紧缺,需要共用一个计时器 为了效率问题,需要在多线程上执行曝光逻辑 方案 使用基础的数组和字典,存储唯一数据id和曝光时间 使用累积的方式计算曝光

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant