联系官方销售客服
1835022288
028-61286886
api接口如何调用“自定义资料”插件的多文件RUL
PHP回调代码:
$return = []; // 返回数据 // 查询自定义资料下多图片 $data = \Phpcmf\Service::M()->table('1_block')->where("id", "2")->getAll(); if ($data) { foreach ($data as $r) { $return= [ 'content' => $r['content'], ]; } }
接口查询返回:
{ "code": 1, "msg": "ok", "data": { "content": "{i-4}:\"{\\\"file\\\":[\\\"23\\\"],\\\"title\\\":[\\\"003\\\"],\\\"description\\\":[\\\"\\\"]}\"" } }
以上这种应该如何去除[\\\和\\\]啊,得到如下格式,然后再转换ID得到文件RUL:
"content": "{i-4}:\"{"file":"23"],"title":"003","description":[""]}""