|
|
@@ -284,6 +284,31 @@ class OrderController extends BaseController
|
|
|
$post['fromType'] = $fromType;
|
|
|
$post['reachDate'] = isset($post['reachDate']) && !empty($post['reachDate']) ? $post['reachDate'] : '00-00-00';
|
|
|
$post['thirdPay'] = dict::getDict('thirdPay', 'onlineWay');
|
|
|
+
|
|
|
+ //前端未修改时这边做兼容
|
|
|
+ if (isset($post['receiveAddress']) && !empty($post['receiveAddress'])) {
|
|
|
+ $post['address'] = $post['receiveAddress'];
|
|
|
+ if (isset($post['receiveProvince']) && !empty($post['receiveProvince'])) {
|
|
|
+ $post['province'] = $post['receiveProvince'];
|
|
|
+ }
|
|
|
+ if (isset($post['receiveCity']) && !empty($post['receiveCity'])) {
|
|
|
+ $post['city'] = $post['receiveCity'];
|
|
|
+ }
|
|
|
+ if (isset($post['receiveFloor']) && !empty($post['receiveFloor'])) {
|
|
|
+ $post['floor'] = $post['receiveFloor'];
|
|
|
+ }
|
|
|
+ if (isset($post['latitude']) && !empty($post['latitude'])) {
|
|
|
+ $post['lat'] = $post['latitude'];
|
|
|
+ }
|
|
|
+ if (isset($post['longitude']) && !empty($post['longitude'])) {
|
|
|
+ $post['long'] = $post['longitude'];
|
|
|
+ }
|
|
|
+ $city = $post['receiveCity'] ?? '';
|
|
|
+ $address = $post['receiveAddress'] ?? '';
|
|
|
+ $floor = $post['receiveFloor'] ?? '';
|
|
|
+ $post['fullAddress'] = $city . $address . $floor;
|
|
|
+ }
|
|
|
+
|
|
|
$order = OrderClass::addOrder($post);
|
|
|
$orderId = $order['id'];
|
|
|
$orderSn = $order['orderSn'];
|