|
@@ -22,6 +22,7 @@ use App\Services\BaseService;
|
|
|
use App\Services\ConfigService;
|
|
use App\Services\ConfigService;
|
|
|
use App\Services\RedisService;
|
|
use App\Services\RedisService;
|
|
|
use App\Services\SupplyService;
|
|
use App\Services\SupplyService;
|
|
|
|
|
+use App\Services\WalletService;
|
|
|
use BN\Red;
|
|
use BN\Red;
|
|
|
use Illuminate\Support\Facades\DB;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
|
|
|
@@ -98,8 +99,13 @@ class GoodsService extends BaseService
|
|
|
$locale = $locale ? $locale : session('locale_lang');
|
|
$locale = $locale ? $locale : session('locale_lang');
|
|
|
$locale = $locale ? $locale : 'zh-cn';
|
|
$locale = $locale ? $locale : 'zh-cn';
|
|
|
$supplyList = config('goods.supplyList');
|
|
$supplyList = config('goods.supplyList');
|
|
|
|
|
+ $usdtPrice = WalletService::make()->getBianRatePrice();
|
|
|
|
|
+ $xdPrice = ConfigService::make()->getConfigByCode('xd_price',100);
|
|
|
|
|
+ $xdPrice = $xdPrice>0 && $xdPrice<=10000? $xdPrice : 100;
|
|
|
foreach ($list['data'] as &$item) {
|
|
foreach ($list['data'] as &$item) {
|
|
|
$item['supply_name'] = isset($supplyList[$item['supply_type']])? $supplyList[$item['supply_type']] : '';
|
|
$item['supply_name'] = isset($supplyList[$item['supply_type']])? $supplyList[$item['supply_type']] : '';
|
|
|
|
|
+ $item['original_price'] = $item['cost_price'];
|
|
|
|
|
+ $item['cost_price'] = $usdtPrice>0? moneyFormat($item['cost_price']/$usdtPrice*$xdPrice, 2) : $item['cost_price'];
|
|
|
}
|
|
}
|
|
|
unset($item);
|
|
unset($item);
|
|
|
}else{
|
|
}else{
|