shish 10 月之前
父節點
當前提交
5da53e70f0
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app-hd/controllers/ProductController.php

+ 2 - 2
app-hd/controllers/ProductController.php

@@ -729,7 +729,7 @@ class ProductController extends BaseController
     public function actionUpdate()
     {
         $shopAdmin = $this->shopAdmin;
-        if (isset($shopAdmin->super) == false || $shopAdmin->super != 1) {
+        if (!isset($shopAdmin->super) || $shopAdmin->super != 1) {
             util::fail('超管才能操作');
         }
 
@@ -752,7 +752,7 @@ class ProductController extends BaseController
         $post = Yii::$app->request->post();
         $discountPrice = $post['discountPrice'] ?? 0;
         if ($discountPrice > 0) {
-            if (isset($post['hjDiscountPrice']) == false || empty($post['hjDiscountPrice'])) {
+            if (empty($post['hjDiscountPrice'])) {
                 $addPrice = $post['addPrice'] ?? 0;
                 $hjAddPrice = $post['hjAddPrice'] ?? 0;
                 $skMore = $post['skMore'] ?? 0;