|
@@ -238,15 +238,19 @@ class Good extends Base
|
|
|
$nakelist = Db::name("good_nake")->where(['spuCode'=>$good_platform['spuCode'],"is_del"=>0])->select()->toArray();
|
|
|
// $catinfo = Db::name("cat")->where(["id"=>$data['cat_id']])->find();
|
|
|
|
|
|
- $cat_top_list = made($data['cat_id']);
|
|
|
+ $cat_top_list = $data['cat_info'];
|
|
|
$cat_top_id = isset($cat_top_list[0]['id']) ? $cat_top_list[0]['id'] : 0;
|
|
|
// $budget = isset($catinfo['order_rate']) ? $catinfo['order_rate']/100:0;
|
|
|
+ $gold_price=0;
|
|
|
+ if ($data['is_gold_price']==1 && $cat_top_id==6) {
|
|
|
+ $gold_price = Db::name("gold_price1")->where(["type" => $data['noble_metal'], "status" => 1, "is_del" => 0])->order("addtime desc")->value('price', 0);
|
|
|
+ }
|
|
|
+ $data['gold_price'] =$gold_price;
|
|
|
$nakearry=[];
|
|
|
if(!empty($nakelist)){
|
|
|
|
|
|
//实时金价
|
|
|
- $gold_price = Db::name("gold_price1")->where(["type" => $data['noble_metal'], "status" => 1, "is_del" => 0])->order("addtime desc")->value('price', 0);
|
|
|
- foreach ($nakelist as $value){
|
|
|
+ foreach ($nakelist as $value){
|
|
|
$value['sale_price'] =$value['nake_total'];
|
|
|
|
|
|
//计算最终售价
|