API 接口文档
自动扫描生成 · 带 鉴权 的接口需在 Header 携带
Authorization: Bearer {token}
后台 (admin)
8 个控制器BaseController
— +---------------------------------------------------------------------- 需鉴权public function apiSchema($param) { $class = $this->apiResolveModel(); $this->view($class::apiSchema()); } /** 分页列表:page/size/sort/order/kw/filter 见 Model::apiPaginate() */
Authorization: Bearer {token}
public function apiSave($param) { $class = $this->apiResolveModel(); $dt = post('data'); $id = post('id'); $ret = $class::where($id)->update($dt); if ($ret) $this->apiFlushStatic(); // API 模式下 jumpPrompt 直接吐 JSON,redirect 参数被忽略 $this->jumpPrompt($ret, (string) ($_GET['resource'] ?? '')); } /** 删除 */
Authorization: Bearer {token}
ColumnController
需鉴权protected $apiResources = [ 'article' => ArticleModel::class, 'link' => LinkModel::class, 'music' => MusicModel::class, 'message' => MessageModel::class, 'notepad' => NotepadModel::class, ]; // ********************** 文章管理 START ********************** public function article($param) { $output = ArticleModel::order('asc')->select(); // var_dump($output); $this->view(get_defined_vars()); } public function articleAdd($param) { $output = ArticleModel::where($param)->find(); $this->view(get_defined_vars()); } public function articleUpdate() { $dt = post('data'); $id = post('id'); $ret = ArticleModel::where($id)->update($dt); if ($ret) StaticHtml::flush('article'); $this->jumpPrompt($ret, 'article'); } 删除 /
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
id |
{Object} |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
name |
{Object} |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
name |
{Object} |
Authorization: Bearer {token}
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
id |
{Object} |
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
id |
{Object} |
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
id |
{Object} |
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
name |
{Object} |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
/
Authorization: Bearer {token}
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
id |
{Object} |
Authorization: Bearer {token}
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
id |
{Object} |
/
Authorization: Bearer {token}
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
HomeController
需鉴权protected $apiResources = [ 'roles' => RolesModel::class, 'user' => UserModel::class, 'menu' => MenuModel::class, ]; 首页 /
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
扁平数组返回(不在后端递归成树),前端按 parent 字段自己组装—— 权限过滤逻辑与 index() 完全一致(同一份 $where 构造),避免页面导航看到的菜单 和实际能访问的菜单出现分歧。 /
Authorization: Bearer {token}
urlencode/urldecode(存的时候编码,读的时候解码),generic 端点原样透传会 导致新版树管理页面存的路径解不出来;管理页面是树状结构,一次要拿全部节点 自己组树,不走分页;删除要递归清空整棵子树,不只是老版 menuDel() 那样的 一层子级,不然容易删出孤儿数据;列表只返回当前管理站点能看到的菜单 (site_id=0 全站通用 + 当前站点),跟 apiMenu() 侧边栏用的过滤条件保持一致 ——不然树管理页面里改了排序/层级,SPA 侧边栏那边过滤掉看不见的节点 顺序对不上会很怪。前端顶栏切站点时 AdminLayout 的 router-view key 已经带了 currentSiteId,切站点会自动重新挂载这个页面、重新拉一次列表,不需要额外接线。 /
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
下面"和"同级内部换序"两种情况,避免拖一次要为每个受影响的兄弟节点单独 发一次 api_save(82 条菜单、一次跨层级拖拽最坏情况要顺带更新一整层兄弟的 order_num,逐条请求既慢又不是原子操作)。 POST /df/home/apiMenuReorder Body: data = JSON 字符串 [{"id":1,"parent":0,"order_num":10}, ...] /
Authorization: Bearer {token}
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
(apiLogin 只塞了导航/权限必需的字段),这里单独取一次。 /
Authorization: Bearer {token}
带对旧密码——跟 setPwd()/updateSetPwd() 那条老后台路径的校验逻辑一致, 只是这里走 API 鉴权(apiUser)取当前用户 id,不依赖 session。 POST /df/home/apiUpdateProfile Body: data[pic](可选,已上传图片URL)、data[old_pw]+data[new_pw](可选,改密码时两个都要传) /
Authorization: Bearer {token}
但不算菜单树——SPA 侧边栏菜单走独立的 apiMenu() 接口,这里没有 index() 里 老后台顶部下拉菜单那个用途,省掉一次菜单表查询。 /
Authorization: Bearer {token}
Authorization: Bearer {token}
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
name |
{Object} |
Authorization: Bearer {token}
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
name |
mixed |
Authorization: Bearer {token}
Authorization: Bearer {token}
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
id |
{Object} |
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
/
Authorization: Bearer {token}
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
id |
{Object} |
Authorization: Bearer {token}
/
Authorization: Bearer {token}
/
Authorization: Bearer {token}
/
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
/
Authorization: Bearer {token}
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
id |
{Object} |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
name |
{Object} |
将动态页面转化为静态可以大大提升访问速度,是优化网站的好办法 可以提高网站在搜索引擎的收录率 建议一开始就在后台生成好,保证用户每次访问的都是现成的html页面 /
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
LoginController
需鉴权Authorization: Bearer {token}
POST /df/login/api_login Body: {"nm":"admin","pw":"xxx"} 返回: {"code":0,"msg":"ok","data":{"token":"...","expires_in":86400}} /
Authorization: Bearer {token}
POST /df/login/api_logout Header: Authorization: Bearer {token} /
Authorization: Bearer {token}
OssController
需鉴权配置参数 /data/config/oss.php 请求地址 http://{domain name}/admin/oss/getRequestParams $.ajax({ url: "/admin/oss/getRequestParams/type/ueditor", type: 'POST', // 截取视频封面。oss媒体处理样式名称 // data:{process_list:{'cover':['c','jpg']}}, // 加工图片。oss图片处理样式名称(样式里包含了各种参数,比如:http://res.tye3.com/kp_tye3//2024/image/tYGKNP9trMWHR9EQ.jpg?x-oss-process=image/auto-orient,1/resize,m_pad,w_200,h_200) data:{process_list:{'img_l':null,'img_m':"m",'img_s':"s"}}, success: function(response) { console.log('Success:', response); }, error: function(xhr, status, error) { console.error('Error:', error); } }); /
Authorization: Bearer {token}
请求地址 http://{domain name}/admin/oss/uploadCallback /
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
var |
mixed | 默认:null |
可用来添加上传记录 /
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
status |
{Object} | 状态。true 成功 false 失败 |
post_arr |
{Object} | 上传参数 |
SiteController
需鉴权/
Authorization: Bearer {token}
/
Authorization: Bearer {token}
/
Authorization: Bearer {token}
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
id |
mixed |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
id |
mixed |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
id |
mixed |
UploadController
需鉴权富文本上传组件 /
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
name |
{Object} |
文件上传组件 /
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
name |
{Object} |
复用同一套 uploadFile() 核心逻辑(目录生成/压缩/命名),只是输出格式不同, 不影响上面两个给老编辑器组件用的方法。 /
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
name |
{Object} | 上传表单的字段名,默认 'file' |
WwwController
需鉴权Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
id |
mixed |
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
id |
mixed |
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
id |
mixed |
Authorization: Bearer {token}
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
id |
mixed |
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
id |
mixed |
ads
2 个控制器ColumnController
需鉴权protected $apiResources = ['adsImg' => AdsImgModel::class]; public function adsImg($param) { $output = AdsImgModel::order(['update_time', 'desc'])->select(); $this->view(get_defined_vars(),'common_admin'); } 修改记事本 /
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
id |
{Object} |
/
Authorization: Bearer {token}
HomeController
需鉴权/
Authorization: Bearer {token}
ai
1 个控制器IndexController
需鉴权/
Authorization: Bearer {token}
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
var |
object | 变量 |
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
original_text |
mixed |
Authorization: Bearer {token}
Authorization: Bearer {token}
bookmark
2 个控制器BaseController
— 基础类 需鉴权/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
subject |
{Object} | 订单名称 |
total_amount |
{Object} | 付款金额 |
body |
{Object} | 商品描述 |
config_url |
{Object} | 支付对象 |
para |
{Object} | 控制回调页面显示不同的内容 |
HomeController
需鉴权/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
demo
1 个控制器HomeController
需鉴权/
Authorization: Bearer {token}
/
Authorization: Bearer {token}
doc
1 个控制器ColumnController
需鉴权docUpdate() 手动解码/编码(大概率是当年为了绕开某些特殊字符存库出问题)。 通用 api_list/api_save 端点不知道这个约定,原样透传会导致新版富文本编辑器 显示/保存的都是一串 base64 乱码(实测踩到)。这里只对 doc 资源单独解/编码, 其余资源和 docType 走原有逻辑不受影响。 /
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
id |
{Object} |
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
name |
mixed |
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
name |
mixed |
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
id |
mixed |
docv1
1 个控制器HomeController
需鉴权/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
Authorization: Bearer {token}
/
Authorization: Bearer {token}
file
4 个控制器AlarmController
需鉴权Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
id |
mixed |
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
name |
mixed |
ApiController
需鉴权/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
HomeController
需鉴权Authorization: Bearer {token}
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
MsgPushController
需鉴权Authorization: Bearer {token}
前台 (homepage)
2 个控制器DocController
公开protected bool $apiPublic = true; API 文档首页 /
HomeController
需鉴权/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
Authorization: Bearer {token}
jz
2 个控制器ColumnController
需鉴权protected $apiResources = ['jzList' => JzListModel::class]; public function jzList($param) { $output = JzListModel::order(['id' => 'desc'])->select(); $this->view(get_defined_vars()); } 修改记事本 /
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
id |
{Object} |
/
Authorization: Bearer {token}
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
HomeController
需鉴权/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
map
2 个控制器ColumnController
需鉴权protected $apiResources = [ 'mapPoint' => MapPointModel::class, 'mapNotepad' => MapNotepadModel::class, 'mapLink' => MapLinkModel::class, ]; /map/column/map_point /
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
Authorization: Bearer {token}
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
id |
mixed |
Authorization: Bearer {token}
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
id |
mixed |
Authorization: Bearer {token}
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
Authorization: Bearer {token}
Authorization: Bearer {token}
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
id |
{Object} |
HomeController
需鉴权/map /
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
music
2 个控制器ApiController
需鉴权Authorization: Bearer {token}
Authorization: Bearer {token}
mixed
HomeController
需鉴权/map /
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
other
4 个控制器ApiController
需鉴权Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
var |
object | 变量 |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
http://lbsyun.baidu.com/index.php?title=webapi/weather#service-page-anchor-1-1 http://api.map.baidu.com/weather/v1/?district_id=420500&data_type=all&ak=k5Z56pTgQE0d0iHqQQtY0aBbZ7McmDBO http://api.map.baidu.com/location/ip?ak=k5Z56pTgQE0d0iHqQQtY0aBbZ7McmDBO&ip=47.97.176.50&coor=bd09ll /
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
http://api.dfer.site/other/api/logs/ /
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
var |
mixed | 默认:null |
location ~* /git(.*)$ { rewrite ^/git(.*)$ /index.php?s=other/api/git/$1; }
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
src |
mixed |
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
var |
object | 变量 |
len |
mixed |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
HcrController
需鉴权/
Authorization: Bearer {token}
/
Authorization: Bearer {token}
/
Authorization: Bearer {token}
/
Authorization: Bearer {token}
/
Authorization: Bearer {token}
/
Authorization: Bearer {token}
/
Authorization: Bearer {token}
/
Authorization: Bearer {token}
/
Authorization: Bearer {token}
/
Authorization: Bearer {token}
MusicController
需鉴权/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
Authorization: Bearer {token}
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
https://github.com/metowolf/Meting
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
server |
object | 服务器 array('netease', 'tencent', 'xiami', 'kugou', 'baidu', 'kuwo'); |
type |
object | 类型 playlist|url|search |
id |
object | 参数 60198|35847388|杰伦 |
var |
mixed | 默认:null |
ToolsController
需鉴权Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
var |
object | 变量 |
/other/tools/unix_time
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
var |
object | 变量 |
/other/tools/to_pinyin
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
var |
object | 变量 |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
Authorization: Bearer {token}
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
word |
mixed |
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
val |
mixed |
查看硬盘的整体使用情况和关键目录的硬盘使用情况 /
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
seo
3 个控制器AgentController
需鉴权Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
BaiduController
需鉴权Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
id |
mixed |
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
api |
mixed |
HomeController
需鉴权Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
site |
mixed | |
urls |
mixed |
Authorization: Bearer {token}
域名;获取页面数组的api;网站根目录绝对路径 /
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
host |
{Object} | |
api |
{Object} | |
src |
{Object} | |
debug |
Bool | 调试 |
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
host |
object | 域名 |
Authorization: Bearer {token}
mixed
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
host |
mixed |
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
var |
object | 变量 |
text |
mixed | 默认:null |
smallpro
6 个控制器BaseDataController
— 谷雨光影 需鉴权Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
DewatermarkController
— 水印清除控制器 需鉴权https://api.dfer.site/smallpro/dewatermark/dewatermark_stat /
Authorization: Bearer {token}
https://api.dfer.site/smallpro/dewatermark/sp_dewatermark_log_del/{id} /
Authorization: Bearer {token}
https://api.dfer.site/smallpro/dewatermark/clear_stat /
Authorization: Bearer {token}
https://api.dfer.site/smallpro/dewatermark/get_res?url= /
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
url |
{Object} |
https://api.dfer.site/smallpro/dewatermark/remove_watermark?url=
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
var |
object | 变量 |
/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
https://github.com/Evil0ctal/Douyin_TikTok_Download_API 自己部署 https://github.com/Evil0ctal/Douyin_TikTok_Download_API/blob/main/README.md#%EF%B8%8F%E9%83%A8%E7%BD%B2%E5%89%8D%E7%9A%84%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C%E8%AF%B7%E4%BB%94%E7%BB%86%E9%98%85%E8%AF%BB http://api.dfer.site:9000/docs docker exec -it douyin_tiktok_api bash 更换aliyun的apt源。http://doc.dfer.site/v1/home/detail/398 apt update && apt install nano -y 获取最新cookie。网页打开https://www.douyin.com/video/6918273131559881997,F12开发者工具,筛选XHR关键词`https://www.douyin.com`,响应标头,复制cookie值(包含`__ac_nonce`即可,不一定是首位)。 nano /app/crawlers/douyin/web/config.yaml docker restart douyin_tiktok_api 测试 https://douyin.wtf/ https://douyin.wtf/docs 付费 https://user.tikhub.io/zh-hans/users/view_api_price https://docs.tikhub.io/190419377e0 6JsPEF4p3nAypgY5gFGrkFY80xkDmq+EiqxenAm9hylO9GoAJ8d/nj+aCA==
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
url |
String | 视频地址 |
jump |
Bool | 用当前域名跳转到资源链接 |
https://docs.tikhub.io /
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
url |
mixed |
https://api.dfer.site/smallpro/dewatermark/domain_whitelist /
Authorization: Bearer {token}
https://api.dfer.site/smallpro/dewatermark/clear_domains /
Authorization: Bearer {token}
https://api.dfer.site/smallpro/dewatermark/import_domains /
Authorization: Bearer {token}
去除抖音、tiktok等多平台水印 https://dlpanda.com/zh-CN https://api.dfer.site/smallpro/dewatermark/get_video_dlpanda/?url= /
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} | |
url |
mixed |
每天单个用户限制50次 https://www.qingdou.vip/pctool/manage-account-copy /
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
url |
{Object} |
Authorization: Bearer {token}
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
url |
mixed |
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
var |
object | 变量 |
ForumController
需鉴权Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
MediaController
需鉴权Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
Authorization: Bearer {token}
SecurityController
— 内容安全检测控制器 需鉴权https://api.dfer.site/smallpro/security/img_check 前端用 uni.uploadFile 以 name=media 字段上传图片,异步模式下额外带上 formData.code(uni.login()拿到的临时code) 返回 status: 0=通过 -1=不通过/异常放行(msg会说明) 1=检测中,需要用trace_id轮询 smallpro/security/img_check_result /
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
array | 框架自动解析的请求参数(当前方法未使用,实际文件从 $_FILES 读取) |
https://api.dfer.site/smallpro/security/img_check_result?trace_id=xxx /
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
array | 框架自动解析的请求参数(当前方法未使用,实际参数从 $_GET/$_POST 读取) |
https://api.dfer.site/smallpro/security/media_check_callback 需要在 微信公众平台-开发-消息推送 里配置该地址,Token 与 self::WX_PUSH_TOKEN 保持一致, 消息加密方式选"明文模式"、数据格式选"XML"(对应下面 simplexml_load_string 的解析方式) 消息推送机制官方文档:https://developers.weixin.qq.com/miniprogram/dev/framework/server-ability/message-push.html (该总览文档未详细列出 wxa_media_check 事件的具体字段格式,字段名以实测/社区反馈为准, 见下方 media_check_callback_raw 日志——遇到疑似漏判时先看这条原始日志,比猜字段名靠谱) 该地址会被微信用两种方式调用: ① GET 首次配置/微信定期校验服务器有效性时发起,只需验签后原样回传 echostr ② POST 真正的检测结果推送,body是XML,同样要先验签,再解析里面的 trace_id + 检测结果 /
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
array | 框架自动解析的请求参数(当前方法未使用,实际参数从 $_GET 和 php://input 读取) |
https://api.dfer.site/smallpro/security/view_logs?key=xxx 可选参数: date 要看哪天的日志,格式YYYYMMDD,不传默认今天 q 关键词过滤,比如 media_check_async_error;不传时默认只显示 self::LOG_VIEW_DEFAULT_KEYWORDS 命中的日志(过滤掉全站其它模块的日志噪音) all 传1时显示当天全部日志,不做默认关键词过滤 /
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
array | 框架自动解析的请求参数(当前方法未使用,实际参数从 $_GET 读取) |
TourshowController
需鉴权Authorization: Bearer {token}
Authorization: Bearer {token}
storage
1 个控制器ApiController
需鉴权/
Authorization: Bearer {token}
Authorization: Bearer {token}
v1
1 个控制器BaseController
— 基础类 需鉴权/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
subject |
{Object} | 订单名称 |
total_amount |
{Object} | 付款金额 |
body |
{Object} | 商品描述 |
config_url |
{Object} | 支付对象 |
para |
{Object} | 控制回调页面显示不同的内容 |
video_vip
1 个控制器ApiController
需鉴权Authorization: Bearer {token}
wallpaper
1 个控制器HomeController
需鉴权/
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
tags http://cdn.apc.360.cn/index.php?c=WallPaper&a=getAllCategoriesV2&from=360chrome new http://wallpaper.apc.360.cn/index.php?c=WallPaper&a=getAppsByOrder&order=create_time&start=【0开始】&count=【加载数】&from=360chrome 专区 http://wallpaper.apc.360.cn/index.php?c=WallPaper&a=getAppsByCategory&cid=【分类ID】&start=【0开始】&count=【加载数】&from=360chrome /
Authorization: Bearer {token}
| 参数名 | 类型 | 说明 |
|---|---|---|
param |
{Object} |
webctl
1 个控制器MainController
需鉴权Authorization: Bearer {token}
Authorization: Bearer {token}
www
3 个控制器ArticleController
需鉴权public function index($param = null) { // 支持干净 URL /www/article/index/{cateId}/{page} 按栏目+分页静态化; // query 里的 ?page= 优先(AJAX 换页等场景,一直保持动态) global $_param; $cateId = is_array($param) ? ($param[0] ?? null) : $param; $pathPage = is_array($param) ? ($param[1] ?? null) : null; if (empty($_param['page']) && $pathPage) { $_param['page'] = $pathPage; } $cate = \Cms::cateRow((int) $cateId); if (empty($cate)) { http_response_code(404); echo '栏目不存在'; return; } $cate['topid'] = (int) ($cate['parent_id'] ? $cate['parent_id'] : $cate['id']); \Cms::setContext(['cate' => $cate, 'table' => $this->table, 'ctrl' => $this->ctrl]); $this->view([ 'cate' => $cate, 'title' => $cate['cate_name'] ?? '', ]); } /** 内容详情 */
Authorization: Bearer {token}
HomeController
需鉴权public function index($param = null) { $cate = ['topid' => 0, 'id' => 0, 'maintenance' => $this->system['maintenance'] ?? 0]; \Cms::setContext(['cate' => $cate]); $this->view([ 'cate' => $cate, 'title' => $this->system['title'] ?: ($this->system['name'] ?? ''), ]); } /** 关键字搜索 */
Authorization: Bearer {token}
public function tag($param = null) { $tag = $_GET['t'] ?? ($param ?? ''); $cate = ['topid' => 0, 'id' => 0]; \Cms::setContext(['cate' => $cate]); $this->view([ 'cate' => $cate, 'tag' => $tag, 'title' => '标签:' . $tag, ]); } 留言验证码图片。GD 画 4 位随机字符 + 干扰线/噪点,正确答案(小写)存 session, 一次性使用——message() 校验完就 unset,防止同一个验证码被反复提交。 /
Authorization: Bearer {token}
protected function messageResponse(bool $ok, string $msg): void { $isAjax = ($_SERVER['HTTP_X_REQUESTED_WITH'] ?? '') === 'XMLHttpRequest' || ($_SERVER['HTTP_ACCEPT'] ?? '') === 'application/json'; if ($isAjax) { header('Content-Type: application/json; charset=utf-8'); echo json_encode(['status' => $ok ? 0 : 1, 'msg' => $msg], JSON_UNESCAPED_UNICODE); exit; } echo ""; exit; } /** 留言 / 投稿 */
Authorization: Bearer {token}
ProductController
需鉴权public function index($param = null) { // 支持干净 URL /www/product/index/{cateId}/{page} 按栏目+分页静态化; // query 里的 ?page= 优先(AJAX 换页等场景,一直保持动态) global $_param; $cateId = is_array($param) ? ($param[0] ?? null) : $param; $pathPage = is_array($param) ? ($param[1] ?? null) : null; if (empty($_param['page']) && $pathPage) { $_param['page'] = $pathPage; } $cate = \Cms::cateRow((int) $cateId); if (empty($cate)) { http_response_code(404); echo '栏目不存在'; return; } $cate['topid'] = (int) ($cate['parent_id'] ? $cate['parent_id'] : $cate['id']); \Cms::setContext(['cate' => $cate, 'table' => $this->table, 'ctrl' => $this->ctrl]); $this->view([ 'cate' => $cate, 'title' => $cate['cate_name'] ?? '', ]); } /** 内容详情 */
Authorization: Bearer {token}
wx
1 个控制器HomeController
需鉴权Authorization: Bearer {token}
Authorization: Bearer {token}