|
@@ -127,8 +127,13 @@ class GoodsService extends BaseService
|
|
|
$usdtCnyPrice = ConfigService::make()->getConfigByCode('usdt_cny_price', 7.2);
|
|
$usdtCnyPrice = ConfigService::make()->getConfigByCode('usdt_cny_price', 7.2);
|
|
|
$usdtPrice = $usdtCnyPrice>0 && $usdtCnyPrice< 100? $usdtCnyPrice : 0;
|
|
$usdtPrice = $usdtCnyPrice>0 && $usdtCnyPrice< 100? $usdtCnyPrice : 0;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
$xdPrice = ConfigService::make()->getConfigByCode('xd_price', 100);
|
|
$xdPrice = ConfigService::make()->getConfigByCode('xd_price', 100);
|
|
|
$xdPrice = $xdPrice > 0 && $xdPrice <= 10000 ? $xdPrice : 100;
|
|
$xdPrice = $xdPrice > 0 && $xdPrice <= 10000 ? $xdPrice : 100;
|
|
|
|
|
+ $awardWaitRate = ConfigService::make()->getConfigByCode('shop_award_score_rate', 0);
|
|
|
|
|
+ $awardWaitRate = $awardWaitRate>0 && $awardWaitRate<1000? $awardWaitRate : 0;
|
|
|
|
|
+ $waitRate = ConfigService::make()->getConfigByCode('day_wait_score_num', 0);
|
|
|
|
|
+ $waitRate = $waitRate>0 && $waitRate<100? $waitRate : 0;
|
|
|
foreach ($list['data'] as &$item) {
|
|
foreach ($list['data'] as &$item) {
|
|
|
$item['detail_img'] = isset($item['detail_img']) && $item['detail_img'] ? json_decode($item['detail_img'], true) : [];
|
|
$item['detail_img'] = isset($item['detail_img']) && $item['detail_img'] ? json_decode($item['detail_img'], true) : [];
|
|
|
$item['supply_name'] = isset($supplyList[$item['supply_type']]) ? $supplyList[$item['supply_type']] : '';
|
|
$item['supply_name'] = isset($supplyList[$item['supply_type']]) ? $supplyList[$item['supply_type']] : '';
|
|
@@ -136,10 +141,9 @@ class GoodsService extends BaseService
|
|
|
$item['xd_price_rate'] = $xdPrice;
|
|
$item['xd_price_rate'] = $xdPrice;
|
|
|
$item['retail_price1'] = $item['retail_price'];
|
|
$item['retail_price1'] = $item['retail_price'];
|
|
|
$item['retail_price'] = $this->getRealSalePrice($item['cost_price']);
|
|
$item['retail_price'] = $this->getRealSalePrice($item['cost_price']);
|
|
|
|
|
+ $item['wait_score'] = moneyFormat($item['retail_price'] * $awardWaitRate/100 * $waitRate/100, 2);
|
|
|
}
|
|
}
|
|
|
unset($item);
|
|
unset($item);
|
|
|
- } else {
|
|
|
|
|
- $this->updateGoods();
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return [
|
|
return [
|
|
@@ -187,9 +191,14 @@ class GoodsService extends BaseService
|
|
|
$info['usdt_price_rate'] = $usdtPrice;
|
|
$info['usdt_price_rate'] = $usdtPrice;
|
|
|
$info['xd_price'] = $xdPrice;
|
|
$info['xd_price'] = $xdPrice;
|
|
|
$info['custom_uid'] = ConfigService::make()->getConfigByCode('xl_custom_id',100001);
|
|
$info['custom_uid'] = ConfigService::make()->getConfigByCode('xl_custom_id',100001);
|
|
|
|
|
+ $awardWaitRate = ConfigService::make()->getConfigByCode('shop_award_score_rate', 0);
|
|
|
|
|
+ $awardWaitRate = $awardWaitRate>0 && $awardWaitRate<1000? $awardWaitRate : 0;
|
|
|
|
|
+ $waitRate = ConfigService::make()->getConfigByCode('day_wait_score_num', 0);
|
|
|
|
|
+ $waitRate = $waitRate>0 && $waitRate<100? $waitRate : 0;
|
|
|
if(isset($info['retail_price']) && $info['retail_price']){
|
|
if(isset($info['retail_price']) && $info['retail_price']){
|
|
|
$info['retail_price1'] =$info['retail_price'];
|
|
$info['retail_price1'] =$info['retail_price'];
|
|
|
$info['retail_price'] = $this->getRealSalePrice($info['cost_price']);
|
|
$info['retail_price'] = $this->getRealSalePrice($info['cost_price']);
|
|
|
|
|
+ $info['wait_score'] = moneyFormat($info['retail_price'] * $awardWaitRate/100 * $waitRate/100, 2);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if(isset($info['sku_list']) && $info['sku_list']){
|
|
if(isset($info['sku_list']) && $info['sku_list']){
|
|
@@ -199,7 +208,7 @@ class GoodsService extends BaseService
|
|
|
$v['main_img'] = $v['main_img']? get_image_url($v['main_img']) : '';
|
|
$v['main_img'] = $v['main_img']? get_image_url($v['main_img']) : '';
|
|
|
$v['retail_price_1'] = $v['retail_price'];
|
|
$v['retail_price_1'] = $v['retail_price'];
|
|
|
$v['retail_price'] = $this->getRealSalePrice($v['plat_price']);
|
|
$v['retail_price'] = $this->getRealSalePrice($v['plat_price']);
|
|
|
-
|
|
|
|
|
|
|
+ $item['wait_score'] = moneyFormat($v['retail_price'] * $awardWaitRate/100 * $waitRate/100, 2);
|
|
|
}
|
|
}
|
|
|
unset($v);
|
|
unset($v);
|
|
|
}
|
|
}
|