<?php
namespace app\index\controller;

use app\index\controller\Common;
use app\service\SeoService;
use app\service\ApiService;
use app\service\ArticleService;
use app\service\ArticleCategoryService;
use app\service\BreadcrumbService;

/**
 * 文章详情
 * @author   Devil
 * @blog     http://gong.gg/
 * @version  0.0.1
 * @datetime 2016-12-01T21:51:08+0800
 */
class Franchise extends Common {
	/**
     * 构造方法
     * @author   Devil
     * @blog    http://gong.gg/
     * @version 1.0.0
     * @date    2018-11-30
     * @desc    description
     */
    public function __construct() {
        parent::__construct();
    }

	/**
     * 文章详情
     * @author  Devil
     * @blog    http://gong.gg/
     * @version 1.0.0
     * @date    2021-11-08
     * @desc    description
     */
	public function Index() {

        // 模板数据
        $assign = [
            // 文章
            'article'            => ArticleService::RecommendedArticleList(111,1),
            'article_footer_list'      => ArticleService::RecommendedArticleList(111,1),
        ];

        $id = $assign['article'][0]['id'];
		// 访问统计
		ArticleService::ArticleAccessCountInc(['id'=>$id]);

        $assign['home_seo_site_title'] = $assign['article'][0]['seo_title'];
        $assign['home_seo_site_keywords'] = $assign['article'][0]['seo_keywords'];
        $assign['home_seo_site_description'] = $assign['article'][0]['seo_desc'];


		// 数据赋值
        MyViewAssign($assign);
		return MyView();
	}

}
?>