|
|
@@ -92,11 +92,32 @@ class OrderController extends BaseController
|
|
|
$post['shopAdminName'] = $shopAdmin['name'] ?? '';
|
|
|
$post['merchantId'] = $this->sjId;
|
|
|
$post['shopId'] = $shopId;
|
|
|
- $post['payWay'] = $this->isWx == true ? 0 : 1;
|
|
|
$post['fromType'] = 1;
|
|
|
$post['expressId'] = $post['expressId'] ?? 0;
|
|
|
- $post['clearType'] = $post['clearType'] ?? OrderClass::CLEAR_DEBT;
|
|
|
$post['sendCost'] = $post['sendCost'] ?? '0.00';
|
|
|
+ $post['payWay'] = dict::getDict('payWay', 'wxPay');
|
|
|
+
|
|
|
+ //PC端开单
|
|
|
+ if (isset($post['clearType'])) {
|
|
|
+ $clearType = $post['clearType'];
|
|
|
+ if ($clearType == OrderClass::CLEAR_DEBT) {
|
|
|
+ $post['debt'] = OrderClass::DEBT_YES;
|
|
|
+ $post['payWay'] = dict::getDict('payWay', 'debtPay');
|
|
|
+ } else {
|
|
|
+ $post['debt'] = OrderClass::DEBT_NO;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //PC端开单
|
|
|
+ if (isset($post['getType'])) {
|
|
|
+ $getType = $post['getType'];
|
|
|
+ //自取
|
|
|
+ if ($getType == 1) {
|
|
|
+ $post['sendType'] = OrderClass::SEND_TYPE_NO;
|
|
|
+ } else {
|
|
|
+ //选择配送时,在发货时让商家自己再确认一下用什么方式
|
|
|
+ $post['sendType'] = OrderClass::SEND_TYPE_UNKNOWN;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
$productJson = $post['product'] ?? '';
|
|
|
if (empty($productJson)) {
|