附件oss
This commit is contained in:
@@ -13,9 +13,9 @@ class CategorieService
|
|||||||
public function list($params)
|
public function list($params)
|
||||||
{
|
{
|
||||||
$result = (new CategorieLogic())->list($params);
|
$result = (new CategorieLogic())->list($params);
|
||||||
|
$value=$result[0]->toArray();
|
||||||
foreach ($result as $key => &$value) {
|
foreach ($result as $key => &$value) {
|
||||||
$value['name'] = isset($item['translation']) ? $item['translation']['name'] : '';
|
$value['name'] = isset($value['translation']) ? $value['translation']['name'] : '';
|
||||||
unset($value['translation']);
|
unset($value['translation']);
|
||||||
}
|
}
|
||||||
unset($value);
|
unset($value);
|
||||||
@@ -27,7 +27,7 @@ class CategorieService
|
|||||||
{
|
{
|
||||||
$result = (new CategorieLogic())->getAll($params);
|
$result = (new CategorieLogic())->getAll($params);
|
||||||
foreach ($result as $key => &$value) {
|
foreach ($result as $key => &$value) {
|
||||||
$value['name'] =isset($item['translation']) ? $item['translation']['name'] : '';
|
$value['name'] = isset($value['translation']) ? $value['translation']['name'] : '';
|
||||||
unset($value['translation']);
|
unset($value['translation']);
|
||||||
}
|
}
|
||||||
unset($value);
|
unset($value);
|
||||||
|
|||||||
@@ -17,6 +17,14 @@ class TicketService
|
|||||||
public function list($params)
|
public function list($params)
|
||||||
{
|
{
|
||||||
$res = (new TicketLogic())->list($params);
|
$res = (new TicketLogic())->list($params);
|
||||||
|
foreach ($res as $k => &$v) {
|
||||||
|
foreach ($v['attachments'] as &$attachments) {
|
||||||
|
$attachments['storage_path_full'] = (new \app\common\service\OssService())->generatePrivateUrl($attachments['storage_path']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
unset($v);
|
||||||
|
unset($attachments);
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user