求助 版主:论坛审计组
这种调用方式在里面可以实现吗因为标签很强大可以写很多自定义字
类型:迅睿CMS 更新时间:2020-07-06 16:15:07 字段 接口 标签

image

这种调用方式在迅睿cms里面可以实现吗?因为list 标签很强大可以写很多自定义字段和修饰符

image

迅睿的数据接口不知道怎么添加修饰符

image

求指教

回帖
  • 利中
    #1楼    利中
    2020-05-28 16:59:49
    Chrome 0
    不能
  • 胡银萍
    #2楼    胡银萍
    2020-05-28 17:32:59
    Chrome 0
    利中 迅睿cms 数据接口能添加修饰符吗?
  • K大帅
    #3楼    K大帅
    2020-05-28 18:44:03
    iPhone手机 0
    不能加修饰符,提意见让增加吧
  • 吃不痴
    #4楼    吃不痴
    2020-05-28 19:55:20
    Chrome 0
    估计不行。
  • 胡银萍
    #5楼    胡银萍
    2020-05-29 11:25:32
    Chrome 0

    image
    前台调用修改文件 dayrui/App/Httpapi/Controllers/Home.php添加 /** * 通过标签调用数据 */ public function my_index() { $this->_api_auth(); $list = \Phpcmf\Service::L('input')->get('param'); //标签 $call = \Phpcmf\Service::L('input')->get('api_call_function'); //回调函数 $data = array('type' =>3 , 'call' => $call, 'list' => $list ); $rt = \Phpcmf\Service::M('http', APP_DIR)->get_api_data($data); $this->_json($rt['code'], $rt['msg'], $rt['data']); exit; }
  • SMALL
    #6楼    SMALL
    2020-07-06 11:32:33
    小米手机 0
    分页怎么写的 用page无用 大佬
  • 胡银萍
    #7楼    胡银萍
    2020-07-06 16:11:12
    Chrome 0
  • SMALL
    #8楼    SMALL
    2020-07-06 16:15:07
    Chrome 0
    胡银萍 我发现不能通过鉴权了,又自己改了下
    //$this->_api_auth();
            $signature = \Phpcmf\Service::L('input')->get('signature'); //签名
            $timestamp = \Phpcmf\Service::L('input')->get('timestamp'); //时间
            $appid = \Phpcmf\Service::L('input')->get('appid'); //appid
            $appsecret = "PHPCMF3EAC5A0D6FB63";
            if($signature!= md5($appid.$appsecret.$timestamp)){
                $this->_json(0, '签名错误');
            }
            $page = max(1,(int)\Phpcmf\Service::L('input')->get('page')); //$page;
            $pagesize = max(10,(int)\Phpcmf\Service::L('input')->get('pagesize')); //pagesize;
            $order = \Phpcmf\Service::L('input')->get('order'); //appid;
            $order = in_array($order,['hist','inputtime'])?$order:'hist';
            $num = $pagesize*($page-1).",".$pagesize;