|
|
@@ -174,6 +174,22 @@ class GhsController extends BaseController
|
|
|
$ad = [];
|
|
|
$respond['ad'] = $ad;
|
|
|
|
|
|
+ //默认显示广告
|
|
|
+ $showAd = 1;
|
|
|
+ if (isset($respond['list']) && !empty($respond['list'])) {
|
|
|
+ foreach ($respond['list'] as $key => $ghs) {
|
|
|
+ if (getenv('YII_ENV') == 'production') {
|
|
|
+ $noAdShopId = 25159;
|
|
|
+ } else {
|
|
|
+ $noAdShopId = 36523;
|
|
|
+ }
|
|
|
+ if (isset($ghs['shopId']) && $ghs['shopId'] == $noAdShopId) {
|
|
|
+ $showAd = 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $respond['showAd'] = $showAd;
|
|
|
+
|
|
|
util::success($respond);
|
|
|
}
|
|
|
|