area_business_post_area.cpp 937 B

1234567891011121314151617181920212223242526272829
  1. #include "area.h"
  2. #include "card_base.h"
  3. #include "tool_time.h"
  4. #include "area_business_post_area.h"
  5. /*
  6. 确定推送人员信息时的区域,每一个明确需要推送的区域,都要推送
  7. */
  8. //将推送区域信息加入人员数据
  9. void area_business_post_area::on_enter(const std::shared_ptr<area_hover>&a,
  10. const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data>&ptr)
  11. {
  12. c->set_area_info(a->mapid(),a->scale(),a->id(),a->m_enter_time,0);
  13. }
  14. void area_business_post_area::on_hover(const std::shared_ptr<area_hover>&a,
  15. const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data> ptr)
  16. {
  17. c->set_area_info(0,0,a->id(),a->m_enter_time,1);
  18. }
  19. //从人员数据中清除区域信息
  20. void area_business_post_area::on_leave(const std::shared_ptr<area_hover>&a,
  21. const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data> ptr)
  22. {
  23. c->set_area_info(0,0,a->id(),0,2);
  24. }