Ver Fonte

到期提示

shish há 1 ano atrás
pai
commit
68b6d7d3ef
1 ficheiros alterados com 7 adições e 1 exclusões
  1. 7 1
      app-ghs/controllers/ProductController.php

+ 7 - 1
app-ghs/controllers/ProductController.php

@@ -601,7 +601,7 @@ class ProductController extends BaseController
         $default = $shop->default ?? 0;
         if ($join == 0 && $default == 0) {
             //除了小蔡鲜花的蔡总、郑总,其他人直营分店不能改价格,多处要同步修改,关键词d_price_change
-            if(!in_array($this->adminId,[35725,23659])){
+            if (!in_array($this->adminId, [35725, 23659])) {
                 util::fail('直营店不能改价');
             }
         }
@@ -1075,6 +1075,12 @@ class ProductController extends BaseController
             }
         }
 
+        $deadline = $shop->deadline;
+        $deadTime = strtotime($deadline);
+        if (time() > $deadTime) {
+            util::fail('系统已到期');
+        }
+
         $post = Yii::$app->request->post();
         $discountPrice = $post['discountPrice'] ?? 0;
         if ($discountPrice > 0) {