shish 6 лет назад
Родитель
Сommit
6c84e8b021
1 измененных файлов с 10 добавлено и 1 удалено
  1. 10 1
      app/client/controllers/OrderController.php

+ 10 - 1
app/client/controllers/OrderController.php

@@ -45,6 +45,11 @@ class OrderController extends BaseController
 		$needSend = isset($goodsInfo['needSend']) && $goodsInfo['needSend'] == 1 ? 1 : 0;
 		
 		$post['userId'] = $this->userId;
+		$post['bookName'] = isset($user['userName']) ? $user['userName'] : '';
+		$bookMobile = isset($post['bookMobile']) && !empty($post['bookMobile']) && stringUtil::isMobile($post['bookMobile']) ? $post['bookMobile'] : '';
+		$bookMobile = empty($bookMobile) && isset($user['mobile']) && !empty($user['mobile']) ? $user['mobile'] : '';
+		$post['bookMobile'] = $bookMobile;
+
 		$post['payWay'] = $this->isWx == true ? 0 : 1;
 		$defaultShopId = MerchantService::getDefaultShopId($this->merchant);
 		if (empty($defaultShopId)) {
@@ -243,8 +248,12 @@ class OrderController extends BaseController
 			$sourceType = 2;
 		}
 		$sourceType = isset($post['sourceType']) ? $post['sourceType'] : 0;
-		
 		$post['userId'] = $this->userId;
+		$user = $this->user;
+		$post['bookName'] = isset($user['userName']) ? $user['userName'] : '';
+		$bookMobile = isset($post['bookMobile']) && !empty($post['bookMobile']) && stringUtil::isMobile($post['bookMobile']) ? $post['bookMobile'] : '';
+		$bookMobile = empty($bookMobile) && isset($user['mobile']) && !empty($user['mobile']) ? $user['mobile'] : '';
+		$post['bookMobile'] = $bookMobile;
 		$prePrice = round($post['prePrice'], 2);
 		$couponId = isset($post['couponId']) ? $post['couponId'] : 0;
 		$discountData = OrderService::getDiscountPrice(['price' => $prePrice, 'sourceType' => $sourceType, 'couponId' => $couponId, 'userId' => $this->userId]);