xxxrrrdddd il y a 2 ans
Parent
commit
cb360c26b7
2 fichiers modifiés avec 6 ajouts et 2 suppressions
  1. 5 1
      application/api/controller/MobileController.php
  2. 1 1
      application/common.php

+ 5 - 1
application/api/controller/MobileController.php

@@ -195,7 +195,11 @@ class MobileController extends UserApi
             }
         }
         $model->where(function (Query $query)use ($chanId){
-            $query->where('hold_chan',$chanId)->whereOr('hold_chan',0);
+            $query->where(function (Query $query) use ($chanId) {
+                $query->where('is_activity',1)->where('hold_chan',$chanId);
+            })->whereOr(function (Query $query){
+                $query->where('is_activity',0);
+            });
         });
 
 

+ 1 - 1
application/common.php

@@ -607,7 +607,7 @@ function buildUrl($url){
 }
 #分站ID
 function getChanId(){
-    return getSub()->getAdminId();
+    return getSub()->getAdminId()?:0;
 }
 #分站
 function getSub(){