SubjectWidget.class.php 1000 B

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