联系官方销售客服

1835022288

028-61286886

应用插件 版主:官方插件技术组
请求地址自定义回调返回数据空白
类型:迅睿CMS 更新时间:2020-01-22 02:55:07

请求地址https://wx.demo.com/index.php?appid=1&appsecret=PHPCMFDD8C40749AC64&api_call_function=books&s=books&c=show&id=44

自定义回调

    public function books($data) {
    
        $rt = [];
        if ($data) {
            foreach ($data as $t) {
                $rt[] = [
                    'id' => $t['id'],
                    'title' => $t['title'],
                    'thumb' => dr_thumb($t['thumb'], 200, 300),
                    'time' => dr_date($t['_updatetime'], 'Y-m-d'),
                    'description' => $t['description'],
                    'author' => $t['authors'],
                    'downtype' => $t['downtype'],
                    'type' => $t['type'],
                    'download' => $t['download'],
                   
                ];
            }
        }
        
        return $rt;
    }

返回数据空白

回帖