1
0
Files
2020-08-06 14:58:51 +08:00

48 lines
1.4 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// +------------------------------------------------+
// |http://www.cjango.com |
// +------------------------------------------------+
// | 修复BUG不是一朝一夕的事情等我喝醉了再说吧 |
// +------------------------------------------------+
// | Author: 小陈叔叔 <Jason.Chen> |
// +------------------------------------------------+
namespace app\mobile\controller;
use app\common\model\Content as ContentModel;
use app\common\service\Content as ContentService;
class Share extends _Init
{
public function _initialize()
{
parent::_initialize();
$this->nav = 3;
}
public function index()
{
$this->list = ContentService::categoryList('share');
return $this->fetch();
}
public function lists($category)
{
$this->list = ContentModel::where(['status' => 1, 'category_id' => $category])->order('id desc')->paginate(20);
if (IS_AJAX) {
if (count($this->list) > 0) {
return $this->success($this->fetch('share/list'));
} else {
return $this->error('已经到最后一页');
}
}
return $this->fetch();
}
public function detail($id)
{
parent::shareArticle();
$this->info = ContentModel::get($id);
return $this->fetch();
}
}