Procházet zdrojové kódy

Wesmiler 校企小程序 更新 6.15

wesmiler před 4 roky
rodič
revize
ce6a05044b

+ 1 - 1
app/api/controller/School.php

@@ -65,7 +65,7 @@ class School extends Controller
         }
         }
 
 
         $data = [
         $data = [
-            'info'=> SchoolModel::detail($schoolId),
+            'info'=> SchoolModel::detail((int)$schoolId),
             'albums'=> SchoolAlbum::getShowList($schoolId, 6),
             'albums'=> SchoolAlbum::getShowList($schoolId, 6),
             'news'=> SchoolNew::getShowList($schoolId, 1, 3),
             'news'=> SchoolNew::getShowList($schoolId, 1, 3),
             'scenery'=> SchoolNew::getShowList($schoolId, 2, 6)
             'scenery'=> SchoolNew::getShowList($schoolId, 2, 6)

+ 1 - 1
app/api/model/School.php

@@ -181,7 +181,7 @@ class School extends SchoolModel
         }
         }
 
 
         if(is_int($where)){
         if(is_int($where)){
-            (new static())->setIncViews((int)$where);
+            self::setIncViews((int)$where);
         }
         }
 
 
         return $data;
         return $data;

+ 1 - 1
app/common/model/School.php

@@ -230,6 +230,6 @@ class School extends BaseModel
      * @param $id
      * @param $id
      */
      */
     public static function setIncViews($id){
     public static function setIncViews($id){
-        self::setInc(['speciality_id'=> $id], 'views', 1);
+        (new static())->setInc(['speciality_id'=> $id], 'views', 1);
     }
     }
 }
 }