소스 검색

Merge branch 'master' of http://121.40.40.223:3000/wiipu/boniu

wanggangtao 5 년 전
부모
커밋
14d3e9750e
1개의 변경된 파일9개의 추가작업 그리고 2개의 파일을 삭제
  1. 9 2
      api/v1.0/stock_list.php

+ 9 - 2
api/v1.0/stock_list.php

@@ -24,14 +24,21 @@ try {
 
 
     //参数
-    $filter = array();
-    $filter["sector"]=$sector;
+    if($sector!=0){
+        $filter = array();
+        $filter["sector"]=$sector;
+    }
+
+
     //总数
     $params=array();
     $count_num=Stock::getStockList($filter,11,$page, $pagesize);//总条数
     if($pagesize!=0){
         $count_page=ceil($count_num/$pagesize);//总页数
     }
+    else{
+        $count_page=1;
+    }
     $params['message_code']=API::SUCCESS;
     $params['message']=API::SUCCESS_MSG;
     $params['sector']=$sector;