|
|
@@ -76,6 +76,7 @@ class Home extends Api {
|
|
|
),
|
|
|
'getClassidShopList' => array(
|
|
|
'classid' => array('name' => 'classid', 'type' => 'int', 'default'=>'1' ,'desc' => '分类id'),
|
|
|
+ 'p' => array('name' => 'p', 'type' => 'int', 'default'=>'1' ,'desc' => '页数'),
|
|
|
),
|
|
|
);
|
|
|
}
|
|
|
@@ -490,18 +491,18 @@ class Home extends Api {
|
|
|
*/
|
|
|
public function getClassidShopList() {
|
|
|
$rs = array('code' => 0, 'msg' => '', 'list' => array());
|
|
|
- $id=\App\checkNull($this->id);
|
|
|
-
|
|
|
+ $classid=\App\checkNull($this->classid);
|
|
|
+ $p=\App\checkNull($this->p);
|
|
|
$domain=new Domain_Home();
|
|
|
|
|
|
- $key="getNewsDetail_".$id;
|
|
|
- $newsInfo=\App\getcaches($key);
|
|
|
- if(!$newsInfo){
|
|
|
- $newsInfo = $domain->getNewsDetail($id);
|
|
|
- \App\setCaches($key,$newsInfo,2);
|
|
|
+ $key="getClassidShopList_".$classid.'_'.$p;
|
|
|
+ $classidShopList=\App\getcaches($key);
|
|
|
+ if(!$classidShopList){
|
|
|
+ $classidShopList = $domain->getClassidShopList($classid,$p);
|
|
|
+ \App\setCaches($key,$classidShopList,2);
|
|
|
}
|
|
|
|
|
|
- $rs['list'] = $newsInfo;
|
|
|
+ $rs['list'] = $classidShopList;
|
|
|
|
|
|
return $rs;
|
|
|
}
|