不影响原来返回参数, getViewInfo 增加返回参数处理返回参数示例:原来的: "customField":[ { "name":"hall_1", "title":"hall", "dtype":"text", "value":"hall" }, { "name":"hall_2", "title":"hall", "dtype":"htmltext", "value":"hall" }]增加的:"customFieldObject": { "hall": "hall", "product_desc": "hall", "desc": "hall", "number": "A12333", "logo": "hall", "name": "hall" },//$customFieldObject = new StdClass();这个函数本地环境不支持$customFieldObject = json_decode('{}');foreach ($customField as $key => $value) { $name = $customField[$key]['name']; if ('img' == $value['dtype']) { $customField[$key]['value'] = $this->get_default_pic($detailExt[$key]); $customFieldObject->$name = $this->get_default_pic($detailExt[$key]); } else if ('media' == $value['dtype']) { $customField[$key]['value'] = $this->get_default_pic($detailExt[$key]); $customFieldObject->$name = $this->get_default_pic($detailExt[$key]); } else if ('imgs' == $value['dtype']) { foreach ($detailExt[$key] as $kk => $vv) { $detailExt[$key][$kk]['image_url'] = $this->get_default_pic($vv['image_url']); } $customField[$key]['value'] = $detailExt[$key]; $customFieldObject->$name = $detailExt[$key]; } else { $customField[$key]['value'] = $detailExt[$key]; $customFieldObject->$name = $detailExt[$key]; }}$detail['customFieldObject'] = !empty($customFieldObject) ? $customFieldObject : false;