Advertisement

帝国cms 文章列表api实现过程

阅读量:

帝国cms 文章列表api实现过程

1、系统-管理菜单-扩展菜单-新建:文章列表API接口

2、插件-找到菜单-点击-菜单名称:课程表列表api

链接地址:plugins/api/index.php

金刚模式链接

3、刷新:插件-找到菜单-点击-菜单名称:课程表列表api

建模块:kcb 课程表 课程表

建控制器listinfo 代码如下

param('page' , 1 , 'intval'); //页码 if($p==0) { $p=1; } $classid = $api->param('classid' , 88 , 'intval'); //classid $w = "classid = ".$classid; $l = $api->param('limit' , 10 , 'intval'); $table = "ecms_xk"; //表 $rulelist = $api->select($table , $field = 'id,title,ftitle,titlepic,onclick,newstime' , $where = $w , $limit = $l , $page = $p , $orderby = 'newstime desc'); //构造输出数组 $res = array( "success" => true, "data" => $rulelist ); //输出json数据 $api->json($res); ?>

获得接口地址http://www.uclass.top:8085/e/extend/api/index.php?m=kcb&c=listinfo

http://www.uclass.top:8085/e/extend/api/index.php?m=kcb&c=listinfo&current_page=3

在mui调用和遍历Jason数据

全部评论 (0)

还没有任何评论哟~