Browse Source

需要更新

shish 1 year ago
parent
commit
f58a3884e5
1 changed files with 11 additions and 1 deletions
  1. 11 1
      app-hd/controllers/GhsController.php

+ 11 - 1
app-hd/controllers/GhsController.php

@@ -180,7 +180,7 @@ class GhsController extends BaseController
             foreach ($respond['list'] as $key => $ghs) {
                 if (getenv('YII_ENV') == 'production') {
                     //海翔、源花汇先不显示广告
-                    $noAdShopId = [42345,10649];
+                    $noAdShopId = [42345, 10649];
                 } else {
                     $noAdShopId = [0];
                 }
@@ -191,6 +191,16 @@ class GhsController extends BaseController
         }
         $respond['showAd'] = $showAd;
 
+        //告之你有多家供货商了
+        $list = $respond['list'] ?? [];
+        if (count($list) > 1) {
+            $admin = $this->admin;
+            $noticeHasMoreGhs = $admin->noticeHasMoreGhs ?? 0;
+            if ($noticeHasMoreGhs == 0) {
+                $respond['needNotice'] = 1;
+            }
+        }
+
         util::success($respond);
     }