SubjectWidget.class.php 705 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * 狮子鱼社区团购系统
  4. *
  5. *
  6. * @author fish
  7. *
  8. */
  9. namespace Home\Widget;
  10. use Think\Controller;
  11. /**
  12. * 商城推荐活动
  13. */
  14. class SubjectWidget extends Controller{
  15. public function hot_subject_show()
  16. {
  17. if (!$slider_cache = S('slider_nav_cache')) {
  18. $slider=M('plugins_slider')->where( array('type' => 'index_ad_nav') )->field('slider_name,image,url')->order('sort_order desc')->limit(8)->select();
  19. S('slider_nav_cache', $slider);
  20. $slider_cache=$slider;
  21. }
  22. $this->slider=$slider_cache;
  23. $this->display('Widget:hot_subject_show');
  24. }
  25. public function hot_kuaibao_show()
  26. {
  27. $this->display('Widget:hot_kuaibao_show');
  28. }
  29. }