版本号更新,接口更新
This commit is contained in:
25
application/api/controller/Content.php
Normal file
25
application/api/controller/Content.php
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
namespace app\api\controller;
|
||||||
|
|
||||||
|
class Content extends \app\common\controller\Api{
|
||||||
|
|
||||||
|
public function lists($page = 1, $pagesize = 25){
|
||||||
|
$list = db('Article')->page($page . ',' . $pagesize)->order('id desc')->select();
|
||||||
|
foreach($list as $key => $value){
|
||||||
|
$list[$key]['create_time'] = date('Y-m-d H:i:s', $value['create_time']);
|
||||||
|
$list[$key]['cover'] = 'https://www.tensent.cn' . get_cover($value['cover_id'], 'path');
|
||||||
|
}
|
||||||
|
$this->data['list'] = $list;
|
||||||
|
return $this->data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function detail($id = 0){
|
||||||
|
$info = db('Article')->where('id', $id)->find();
|
||||||
|
$info['create_time'] = date('Y-m-d H:i:s', $info['create_time']);
|
||||||
|
$info['content'] = str_replace('/uploads/', 'https://www.tensent.cn/uploads/', $info['content']);
|
||||||
|
$info['cover'] = 'https://www.tensent.cn' . get_cover($info['cover_id'], 'path');
|
||||||
|
|
||||||
|
$this->data['info'] = $info;
|
||||||
|
return $this->data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
// SentCMS常量定义
|
// SentCMS常量定义
|
||||||
define('SENTCMS_VERSION', '3.5.201801');
|
define('SENTCMS_VERSION', '3.6.201803');
|
||||||
define('SENT_ADDON_PATH', __DIR__ . '/../addons' . DS);
|
define('SENT_ADDON_PATH', __DIR__ . '/../addons' . DS);
|
||||||
|
|
||||||
//字符串解密加密
|
//字符串解密加密
|
||||||
|
|||||||
Reference in New Issue
Block a user