Просмотр исходного кода

Wesmiler 校企小程序 更新 6.15

wesmiler 4 лет назад
Родитель
Сommit
ce6a05044b
3 измененных файлов с 3 добавлено и 3 удалено
  1. 1 1
      app/api/controller/School.php
  2. 1 1
      app/api/model/School.php
  3. 1 1
      app/common/model/School.php

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

@@ -65,7 +65,7 @@ class School extends Controller
         }
 
         $data = [
-            'info'=> SchoolModel::detail($schoolId),
+            'info'=> SchoolModel::detail((int)$schoolId),
             'albums'=> SchoolAlbum::getShowList($schoolId, 6),
             'news'=> SchoolNew::getShowList($schoolId, 1, 3),
             '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)){
-            (new static())->setIncViews((int)$where);
+            self::setIncViews((int)$where);
         }
 
         return $data;

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

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