|
|
@@ -290,7 +290,7 @@ class PurchaseController extends BaseController
|
|
|
}
|
|
|
$ghsShopId = $ghsInfo['shopId'] ?? 0;
|
|
|
|
|
|
- if (isset($ghsInfo['mainId']) && !empty($ghsInfo['mainId']) && $ghsInfo['mainId'] == $ghsInfo['ownMainId']) {
|
|
|
+ if (!empty($ghsInfo['mainId']) && $ghsInfo['mainId'] == $ghsInfo['ownMainId']) {
|
|
|
util::fail('不能跟自己的店买花');
|
|
|
}
|
|
|
|
|
|
@@ -342,7 +342,7 @@ class PurchaseController extends BaseController
|
|
|
if (isset($post['transType']) && $post['transType'] == 4) {
|
|
|
if (isset($ghsShopInfo->pfLevel) && $ghsShopInfo->pfLevel == 1) {
|
|
|
$notSameCity = PurchaseClass::notSameCity($this->shop, $ghsShopInfo);
|
|
|
- if ($notSameCity == false) {
|
|
|
+ if (!$notSameCity) {
|
|
|
util::fail('距离太远,不能选择同城配送');
|
|
|
}
|
|
|
}
|
|
|
@@ -401,7 +401,7 @@ class PurchaseController extends BaseController
|
|
|
if ($book == 1) {
|
|
|
util::fail('预订时不能选择预售花材');
|
|
|
} else {
|
|
|
- if (isset($post['sendTimeWant']) == false || empty($post['sendTimeWant'])) {
|
|
|
+ if (empty($post['sendTimeWant'])) {
|
|
|
util::fail('请选择配送日期');
|
|
|
}
|
|
|
$sendTimeWant = $post['sendTimeWant'];
|
|
|
@@ -413,7 +413,7 @@ class PurchaseController extends BaseController
|
|
|
if (empty($hasDate)) {
|
|
|
util::fail('预售日期有问题,请提醒门店');
|
|
|
}
|
|
|
- if (in_array(strtotime($sendTimeWant), $hasDate) == false) {
|
|
|
+ if (!in_array(strtotime($sendTimeWant), $hasDate)) {
|
|
|
util::fail("有预售花材在{$sendTimeWant}没到货");
|
|
|
}
|
|
|
$post['presell'] = 1;
|