Ver Fonte

优惠信息

shish há 6 anos atrás
pai
commit
910927f0c6
1 ficheiros alterados com 3 adições e 4 exclusões
  1. 3 4
      app/client/controllers/OrderController.php

+ 3 - 4
app/client/controllers/OrderController.php

@@ -242,12 +242,11 @@ class OrderController extends BaseController
 		//验证门店是否有效
 		$shopInfo = ShopService::getById($shopId);
 		ShopService::valid($shopInfo, $this->merchantId);
-		//门店订单
-		$sourceType = 1;
+		$sourceType = 3;
 		$post['userId'] = $this->userId;
 		$prePrice = round($post['prePrice'], 2);
 		$couponId = isset($post['couponId']) ? $post['couponId'] : 0;
-		$discountData = OrderService::getDiscountPrice(['price' => $prePrice, 'couponId' => $couponId, 'userId' => $this->userId]);
+		$discountData = OrderService::getDiscountPrice(['price' => $prePrice, 'sourceType' => $sourceType, 'couponId' => $couponId, 'userId' => $this->userId]);
 		$actPrice = $discountData['price'];
 		$post['discountType'] = $discountData['discountType'];
 		$post['discountAmount'] = $discountData['discountAmount'];
@@ -264,7 +263,7 @@ class OrderController extends BaseController
 		//微信支付订单提交不能修改价格
 		$post['modPrice'] = $this->isWx ? 0 : 1;
 		$post['sourceType'] = $sourceType;
-
+		
 		$order = OrderService::addOrder($post);
 		$orderId = $order['id'];
 		$orderSn = $order['orderSn'];