1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?php
- /**
- * 系统文章
- */
- namespace app\home\controller;
- use think\facade\View;
- use think\facade\Lang;
- /**
- * ============================================================================
- *
- * ============================================================================
- * 版权所有 2014-2028 浙江惠利玛产业互联网有限公司,并保留所有权利。
- * 网站地址: https://www.valimart.net/
- * ----------------------------------------------------------------------------
- *
- * ============================================================================
- * 控制器
- */
- class Document extends BaseMall {
- public function initialize() {
- parent::initialize();
- Lang::load(base_path() . 'home/lang/'.config('lang.default_lang').'/index.lang.php');
- }
- public function index() {
- $code = input('param.code');
-
- if ($code == '') {
- $this->error(lang('param_error'));//'缺少参数:文章标识'
- }
- $document_model = model('document');
- $doc = $document_model->getOneDocumentByCode($code);
- View::assign('doc', $doc);
- /**
- * 分类导航
- */
- $nav_link = array(
- array(
- 'title' => lang('homepage'),
- 'link' => HOME_SITE_URL
- ),
- array(
- 'title' => $doc['document_title']
- )
- );
- View::assign('nav_link_list', $nav_link);
- return View::fetch($this->template_dir . 'index');
- }
- }
- ?>
|