Selaa lähdekoodia

接收参数的方式修改

lizhen_gitee 1 vuosi sitten
vanhempi
commit
d01763d8d1
1 muutettua tiedostoa jossa 5 lisäystä ja 5 poistoa
  1. 5 5
      application/api/controller/Eggnew.php

+ 5 - 5
application/api/controller/Eggnew.php

@@ -50,9 +50,9 @@ class Eggnew extends Api
     public function strike() {
 //        $this->error("系统正在维护中。。。");
         $nowtime = time();
-        $num  = $this->request->request("num");
-        $type = $this->request->request("type",1);
-        $party_id = $this->request->request("party_id", 0);// 派对ID
+        $num  = input("num");
+        $type = input("type",1);
+        $party_id = input("party_id", 0);// 派对ID
         if($num <=0) {
             $this->error("参数错误");
         }
@@ -334,7 +334,7 @@ class Eggnew extends Api
 
     //手气榜单
     public function getRankList(){
-        $type = $this->request->request("type",1);
+        $type = input("type",1);
 
         $today = strtotime(date("Y-m-d"));
         $where = [];
@@ -356,7 +356,7 @@ class Eggnew extends Api
      * 获取排行榜
      */
     public function getRankList_old() {
-        $time = $this->request->request("time"); // 1=今天,2=昨天
+        $time = input("time"); // 1=今天,2=昨天
         if(!in_array($time,[1,2])) {
             $this->error("参数缺失!");
         }