|
|
@@ -582,8 +582,8 @@ class OrderController extends BaseController
|
|
|
$post['customId'] = $this->customId;
|
|
|
$user = isset($this->user->attributes) ? $this->user->attributes : [];
|
|
|
$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'] : $bookMobile;
|
|
|
+ $bookMobile = !empty($post['bookMobile']) && stringUtil::isMobile($post['bookMobile']) ? $post['bookMobile'] : '';
|
|
|
+ $bookMobile = empty($bookMobile) && !empty($user['mobile']) ? $user['mobile'] : $bookMobile;
|
|
|
$post['bookMobile'] = $bookMobile;
|
|
|
$prePrice = round($post['prePrice'], 2);
|
|
|
$couponId = isset($post['couponId']) ? $post['couponId'] : 0;
|
|
|
@@ -596,7 +596,7 @@ class OrderController extends BaseController
|
|
|
$post['realPrice'] = $actPrice;
|
|
|
$post['mainPay'] = $actPrice;
|
|
|
$post['payStyle'] = 0;
|
|
|
- $post['sjId'] = $this->sjId;
|
|
|
+ $post['userId'] = $this->userId;
|
|
|
$post['needPrint'] = dict::getDict('needPrint', 'noNeed');
|
|
|
$now = time();
|
|
|
$expireTime = $now + 300;//订单5分钟后过期
|
|
|
@@ -609,29 +609,29 @@ class OrderController extends BaseController
|
|
|
$post['modPrice'] = $this->isWx ? 0 : 1;
|
|
|
$post['goodsNum'] = 1;
|
|
|
$post['fromType'] = $post['fromType'] ?? 1;
|
|
|
- $post['reachDate'] = isset($post['reachDate']) && !empty($post['reachDate']) ? $post['reachDate'] : '00-00-00';
|
|
|
+ $post['reachDate'] = !empty($post['reachDate']) ? $post['reachDate'] : '00-00-00';
|
|
|
$post['onlinePay'] = dict::getDict('onlinePay', 'yes');
|
|
|
|
|
|
//前端未修改时这边做兼容
|
|
|
- if (isset($post['receiveAddress']) && !empty($post['receiveAddress'])) {
|
|
|
+ if (!empty($post['receiveAddress'])) {
|
|
|
$post['address'] = $post['receiveAddress'];
|
|
|
- if (isset($post['receiveProvince']) && !empty($post['receiveProvince'])) {
|
|
|
+ if (!empty($post['receiveProvince'])) {
|
|
|
$post['province'] = $post['receiveProvince'];
|
|
|
}
|
|
|
- if (isset($post['receiveCity']) && !empty($post['receiveCity'])) {
|
|
|
+ if (!empty($post['receiveCity'])) {
|
|
|
$post['city'] = $post['receiveCity'];
|
|
|
}
|
|
|
- if (isset($post['receiveFloor']) && !empty($post['receiveFloor'])) {
|
|
|
+ if (!empty($post['receiveFloor'])) {
|
|
|
$post['floor'] = $post['receiveFloor'];
|
|
|
}
|
|
|
- if (isset($post['latitude']) && !empty($post['latitude'])) {
|
|
|
+ if (!empty($post['latitude'])) {
|
|
|
$post['lat'] = $post['latitude'];
|
|
|
}
|
|
|
- if (isset($post['longitude']) && !empty($post['longitude'])) {
|
|
|
+ if (!empty($post['longitude'])) {
|
|
|
$post['long'] = $post['longitude'];
|
|
|
}
|
|
|
$city = $post['receiveCity'] ?? '';
|
|
|
- $address = $post['receiveAddress'] ?? '';
|
|
|
+ $address = $post['receiveAddress'];
|
|
|
$floor = $post['receiveFloor'] ?? '';
|
|
|
$post['fullAddress'] = $city . $address . $floor;
|
|
|
}
|
|
|
@@ -678,7 +678,7 @@ class OrderController extends BaseController
|
|
|
'couponId' => $couponId,
|
|
|
];
|
|
|
$response = $laResource->driveWxPay($wxParams);
|
|
|
- if (isset($response['code']) == false || $response['code'] != 'BBS00000') {
|
|
|
+ if (!isset($response['code']) || $response['code'] != 'BBS00000') {
|
|
|
$errMsg = $response['msg'] ?? '';
|
|
|
noticeUtil::push($errMsg, '15280215347');
|
|
|
util::fail('支付失败');
|
|
|
@@ -729,7 +729,7 @@ class OrderController extends BaseController
|
|
|
'subject' => $subject,
|
|
|
];
|
|
|
$response = $laResource->cashierPay($cashParams);
|
|
|
- if (isset($response['code']) == false || $response['code'] != '000000') {
|
|
|
+ if (!isset($response['code']) || $response['code'] != '000000') {
|
|
|
util::fail('支付失败了');
|
|
|
}
|
|
|
$url = $response['resp_data']['counter_url'] ? $response['resp_data']['counter_url'] : '';
|