Showhelp.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. namespace app\home\controller;
  3. use think\facade\View;
  4. use think\facade\Lang;
  5. /**
  6. * ============================================================================
  7. *
  8. * ============================================================================
  9. * 版权所有 2014-2028 浙江惠利玛产业互联网有限公司,并保留所有权利。
  10. * 网站地址: https://www.valimart.net/
  11. * ----------------------------------------------------------------------------
  12. *
  13. * ============================================================================
  14. * 控制器
  15. */
  16. class Showhelp extends BaseMall
  17. {
  18. public function initialize()
  19. {
  20. parent::initialize(); // TODO: Change the autogenerated stub
  21. Lang::load(base_path() . 'home/lang/'.config('lang.default_lang').'/showhelp.lang.php');
  22. }
  23. /**
  24. * 店铺帮助页
  25. *
  26. */
  27. public function index()
  28. {
  29. $help_model = model('help');
  30. $help_list = $help_model->getShowStoreHelpList();
  31. $helptype_id = intval(input('param.t_id'));//帮助类型编号
  32. if ($helptype_id < 1 || empty($help_list[$helptype_id])) {
  33. $type_array = current($help_list);
  34. $helptype_id = $type_array['helptype_id'];
  35. }
  36. View::assign('helptype_id', $helptype_id);
  37. $help_id = intval(input('param.help_id'));//帮助编号
  38. if ($help_id < 1 || empty($help_list[$helptype_id]['help_list'][$help_id])) {
  39. $help = @current($help_list[$helptype_id]['help_list']);
  40. $help_id = $help['help_id'];
  41. }else{
  42. $help = $help_list[$helptype_id]['help_list'][$help_id];
  43. }
  44. View::assign('help_id', $help_id);
  45. View::assign('help_list', $help_list);//左侧帮助类型及帮助
  46. View::assign('help', $help);//当前帮助
  47. View::assign('article_list', '');//底部不显示首页的文章分类
  48. $phone_array = explode(',', config('ds_config.site_phone'));
  49. View::assign('phone_array', $phone_array);
  50. View::assign('html_title', config('ds_config.site_name') . ' - ' . lang('business_management_center'));
  51. return View::fetch($this->template_dir.'store_help');
  52. }
  53. }