<?php
namespace app\mobile\controller;
use think\facade\Session;
use app\common\variable\MsgCode;
use app\common\controller\Article as ArticleController;
use app\common\controller\ArticleCate as ArticleCateController;
use app\common\model\ArticleCate as ArticleCateModel;
class Article extends Base
{
    public function contentAlias($alias)
    {
        $Find=ArticleController::getAliasContent($alias);
        if($Find){
        	return $this->ajaxReturn('',MsgCode::$success,$Find);
        }else{
        	return $this->ajaxReturn('文章不存在',MsgCode::$error);
        }
    }
    public function contentId($id)
    {
        $Find=ArticleController::getIdContent($id);
        if($Find){
        	return $this->ajaxReturn('',MsgCode::$success,$Find);
        }else{
        	return $this->ajaxReturn('文章不存在',MsgCode::$error);
        }
    }
    public function getAliasSelect($alias)
    {
    	$List=ArticleController::getPage($alias,10);
        return $this->ajaxReturn('',MsgCode::$success,$List);
    }
    public function getCateAliasSelect($alias)
    {
        $CateList=ArticleCateController::getSelect($alias,'h5');
        return $this->ajaxReturn('',MsgCode::$success,$CateList);
    }
}
