單頁欄目,自定義欄目字段下添加的多文件字段,如何轉(zhuǎn)換得到URL地址

回調(diào)代碼
public function category_show($data) {
$rt = [
'xcxpt' => dr_share_cat_value($data['catid'], "xcxpt"),
];
return $rt;
}返回數(shù)據(jù):
{
"code": 1,
"msg": "view",
"data": {
"xcxpt": [
{
"file": "18",
"title": "57f1a9381d4b7",
"description": ""
},
{
"file": "19",
"title": "57f1a91443710",
"description": ""
},
{
"file": "20",
"title": "57f1a941d2c80",
"description": ""
},
{
"file": "21",
"title": "57f1a9606d614",
"description": ""
}
]
}
}請問這種多圖字段,回調(diào)函數(shù)應(yīng)該怎么寫才能把數(shù)字(file)轉(zhuǎn)換成圖片地址
public function category_show($data) { $aaa = dr_share_cat_value($data['catid'], "xcxpt"); foreach($aaa as $a => $aa) { $aaa[$a]['file'] = dr_get_file($aaa[$a]['file']); } $rt = [ 'xcxpt' => $aaa, ]; return $rt; }不要復(fù)制代碼,先理解一下為什么這么寫
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)@官方插件實習(xí)技術(shù) 沒敢直接復(fù)制,厲害。學(xué)習(xí)了