Showjoinin.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace app\home\controller;
  3. use think\facade\View;
  4. use think\facade\Lang;
  5. use think\facade\Db;
  6. /**
  7. * ============================================================================
  8. *
  9. * ============================================================================
  10. * 版权所有 2014-2028 浙江惠利玛产业互联网有限公司,并保留所有权利。
  11. * 网站地址: https://www.valimart.net/
  12. * ----------------------------------------------------------------------------
  13. *
  14. * ============================================================================
  15. * 控制器
  16. */
  17. class Showjoinin extends BaseMall {
  18. public function initialize() {
  19. parent::initialize();
  20. Lang::load(base_path() . 'home/lang/'.config('lang.default_lang').'/showjoinin.lang.php');
  21. }
  22. /*
  23. * 入驻相关首页介绍
  24. */
  25. public function index() {
  26. $code_info = config('ds_config.store_joinin_pic');
  27. $info['pic'] = array();
  28. $info['show_txt'] = '';
  29. if (!empty($code_info)) {
  30. $info = unserialize($code_info);
  31. }
  32. $storejoinin_model = model('storejoinin');
  33. $joinin_detail = $storejoinin_model->getOneStorejoinin(array('member_id' => session('member_id')));
  34. View::assign('joinin_detail', $joinin_detail); //入驻信息
  35. View::assign('pic_list', $info['pic']); //首页图片
  36. View::assign('show_txt', $info['show_txt']); //贴心提示
  37. $help_model = model('help');
  38. $condition = array();
  39. $condition[] = array('helptype_id','=',1);//入驻指南
  40. $help_list = $help_model->getHelpList($condition, '', 4); //显示4个
  41. //获取第一文章分类的前三篇文章
  42. $index_articles=Db::name('article')->where('ac.ac_code','notice')->where('a.article_show',1)->alias('a')->field('a.article_id,a.article_url,a.article_title')->order('a.article_sort asc,a.article_time desc')->limit(5)->join('articleclass ac','a.ac_id=ac.ac_id')->select()->toArray();
  43. View::assign('index_articles', $index_articles);
  44. View::assign('help_list', $help_list);
  45. View::assign('article_list', ''); //底部不显示文章分类
  46. View::assign('show_sign', 'joinin');
  47. View::assign('html_title', config('ds_config.site_name') . ' - ' . lang('tenants'));
  48. return View::fetch($this->template_dir . 'index');
  49. }
  50. }
  51. ?>