diff --git a/app/api/logic/order/OrderLogic.php b/app/api/logic/order/OrderLogic.php index 5e170d82..05134ec2 100644 --- a/app/api/logic/order/OrderLogic.php +++ b/app/api/logic/order/OrderLogic.php @@ -88,11 +88,11 @@ class OrderLogic extends BaseLogic $cartInfo['name'] = $find['store_name']; $cartInfo['image'] = $find['image']; //计算好vip价格 - $vipPrice = self::dealVip($find['price']); - if ($vipPrice) { - $cartInfo['price'] = $vipPrice; - } - $cartInfo['vip_price'] = $cart_select[$k]['total'] - $vipPrice ?? 0; + // $vipPrice = self::dealVip($find['price']); + // if ($vipPrice) { + // $cartInfo['price'] = $vipPrice; + // } + $cartInfo['vip_price'] = 0;//$cart_select[$k]['total'] - $vipPrice ?? 0; $cart_select[$k]['cart_info'] = json_encode($cartInfo); //理论上每笔都是拆分了 $cart_select[$k]['name'] = $find['store_name']; @@ -106,13 +106,13 @@ class OrderLogic extends BaseLogic $pay_price = self::$total; // $check = StoreOrder::where('uid',\request()->userId)->count();//首单逻辑 $vipPrice = 0; - if (isset($check) && $check['status'] == 1) { + // if (isset($check) && $check['status'] == 1) { // $discountRate = '0.99';//首单逻辑 // $pay_price 是价格 - $discountRate = $check['remark'];//折扣 - $discountRate = bcdiv($discountRate, '10', 2); - $pay_price = bcdiv(bcmul($pay_price, $discountRate, 4), '1', 2); - } else { + // $discountRate = $check['remark'];//折扣 + // $discountRate = bcdiv($discountRate, '10', 2); + // $pay_price = bcdiv(bcmul($pay_price, $discountRate, 4), '1', 2); + // } else { /* $userVip = User::where('id', \request()->userId)->value('user_ship'); if ($userVip) { switch ($userVip) { @@ -137,11 +137,11 @@ class OrderLogic extends BaseLogic $discountRate = bcdiv($discountRate, '100', 2); $pay_price = bcdiv(bcmul($pay_price, $discountRate, 4), '1', 2); }*/ - } - if (!empty(self::$total) && !empty($pay_price)) { - bcscale(2); - $vipPrice = bcsub(self::$total, $pay_price, 2); - } + // } + // if (!empty(self::$total) && !empty($pay_price)) { + // bcscale(2); + // $vipPrice = bcsub(self::$total, $pay_price, 2); + // } //成本价 收益 $order = [