|
@@ -9729,7 +9729,8 @@ class AnimeService
|
|
|
$product_name = getProp($product, 'product_name');
|
|
$product_name = getProp($product, 'product_name');
|
|
|
if ($product_name) {
|
|
if ($product_name) {
|
|
|
$product_dict[$product_name] = [
|
|
$product_dict[$product_name] = [
|
|
|
- 'url' => getProp($product, 'url'),
|
|
|
|
|
|
|
+ // 优先使用三视图图片作为素材/参考图,否则使用原图 url
|
|
|
|
|
+ 'url' => getProp($product, 'three_view_image_url') ?: getProp($product, 'url'),
|
|
|
'voice_prompt' => getProp($product, 'voice_prompt')
|
|
'voice_prompt' => getProp($product, 'voice_prompt')
|
|
|
];
|
|
];
|
|
|
}
|
|
}
|
|
@@ -10071,6 +10072,14 @@ class AnimeService
|
|
|
$products[$product_name] = $extra_product; // 覆盖同名数据
|
|
$products[$product_name] = $extra_product; // 覆盖同名数据
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 兼容返回 three_view_image_url 字段(旧数据可能没有该键,统一补空值)
|
|
|
|
|
+ foreach ($products as &$product) {
|
|
|
|
|
+ if (!isset($product['three_view_image_url'])) {
|
|
|
|
|
+ $product['three_view_image_url'] = '';
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ unset($product);
|
|
|
|
|
|
|
|
// 重新索引数组(去除key)
|
|
// 重新索引数组(去除key)
|
|
|
$products = array_values($products);
|
|
$products = array_values($products);
|