dever 6 years ago
parent
commit
c8dbd20759
1 changed files with 3 additions and 2 deletions
  1. 3 2
      main/lib/Cron.php

+ 3 - 2
main/lib/Cron.php

@@ -57,10 +57,11 @@ class Cron
     # 重新计算排行榜
     public function pai_api()
     {
-        $data = Dever::db('act/score')->state(array('type' => 4, 'data_id' => 28));
+        $id = Dever::input('product_id', 28);
+        $data = Dever::db('act/score')->state(array('type' => 4, 'data_id' => $id));
 
         # 购买小刊
-        $where['product_id'] = Dever::input('product_id', 28);
+        $where['product_id'] = $id;
         $where['status'] = 2;
         //$this->score = 20;