|
|
@@ -100,8 +100,12 @@ class ShopController extends BaseController {
|
|
|
'orderBy' => 'S.SORT ASC, S.CREATED_AT DESC',
|
|
|
]);
|
|
|
|
|
|
+ $currencies = Currency::getAllData();
|
|
|
+ $currencies = array_column($currencies, NULL, 'ID');
|
|
|
+
|
|
|
foreach ($data['list'] as $key => $value) {
|
|
|
$data['list'][$key]['DISCOUNT'] = in_array($value['TYPE'], [1, 2]) ? ShopGoods::getGoodType()[$value['TYPE']]['discount'] : $value['SELL_DISCOUNT'] * 100;
|
|
|
+ $data['list'][$key]['COIN'] = $currencies[$value['LOCAL_CURRENCY_ID']]['CODE'] ?? '';
|
|
|
}
|
|
|
|
|
|
return static::notice($data);
|