Authored by Rock Zhang

xiangou

... ... @@ -776,20 +776,22 @@ class DetailModel
$result['description'] = $product['description'];
// 附件
if (isset($product['attachment'])) {
foreach ($product['attachment'] as $item) {
if ($item['isDefault'] === 1) { // 排除默认图片
continue;
}
if (!isset($product['attachment'])) {
break;
}
$result['attaches'][] = self::procLimitProductAttach($item);
$result['attaches'] = array();
foreach ($product['attachment'] as $item) {
if ($item['isDefault'] === 1) { // 排除默认图片
continue;
}
$result['attaches'][] = self::procLimitProductAttach($item);
}
if(count($result['attaches']) > 1) {
Helpers::sortArrByField($result['attaches'], 'orderBy', true);
}
} while (false);
return $result;
... ...