作者 sgj
1 个管道 的构建 失败 耗费 0 秒

接口查漏补缺

... ... @@ -22,6 +22,7 @@ use api\common\model\TeamModel;
use api\common\model\UserPassModel;
use api\common\model\UserWorkLog;
use api\common\model\VolunteerModel;
use api\index\model\ManageModel;
use api\index\model\UserModel;
use cmf\controller\RestBaseController;
use FontLib\Table\Type\name;
... ... @@ -1108,5 +1109,19 @@ class SecondController extends RestBaseController
$this->success('',$info);
}
/**
* @title 管理条例
* @description 管理条例
* @author sgj
* @url /index/second/manage
* @method GET
*
* @header name:XX-Token require:1 default: desc:token
*/
public function manage(){
$aboutModel = new ManageModel();
$data = $aboutModel->findData(array('id'=>1));
$this->success('获取成功!',$data);
}
}
\ No newline at end of file
... ...
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2019/1/3
* Time: 19:06
*/
namespace api\index\model;
use think\Model;
class ManageModel extends Model
{
/**
* thumbnail 自动转化
* @param $value
* @return array
*/
public function getThumbnailAttr($value)
{
return cmf_get_image_url($value);
}
/**
* content 自动转化
* @param $value
* @return array
*/
public function getContentAttr($value)
{
return cmf_replace_content_file_url(htmlspecialchars_decode($value));
}
public function findData($where){
$data = $this->where($where)->find();
return $data;
}
}
\ No newline at end of file
... ...