|
|
@@ -75,11 +75,14 @@ class Home extends Api {
|
|
|
'id' => array('name' => 'id', 'type' => 'int', 'default'=>'1' ,'desc' => '新闻id'),
|
|
|
),
|
|
|
'getClassidShopList' => array(
|
|
|
- 'classid' => array('name' => 'classid', 'type' => 'int', 'default'=>'1' ,'desc' => '分类id'),
|
|
|
+ 'type' => array('name' => 'type', 'type' => 'int', 'default'=>'1' ,'desc' => '店铺类型 1:乡村云店; 2:都市云店; 3:一线云店 ;4:普通商户'),
|
|
|
'name'=> array('name' => 'name', 'type' => 'string', 'default'=>'' ,'desc' => '店铺名称'),
|
|
|
'province'=> array('name' => 'province', 'type' => 'string', 'default'=>'' ,'desc' => '地址省份'),
|
|
|
'p' => array('name' => 'p', 'type' => 'int', 'default'=>'1' ,'desc' => '页数'),
|
|
|
),
|
|
|
+ 'getShopAddressList' => array(
|
|
|
+ ),
|
|
|
+
|
|
|
);
|
|
|
}
|
|
|
|
|
|
@@ -494,17 +497,17 @@ class Home extends Api {
|
|
|
*/
|
|
|
public function getClassidShopList() {
|
|
|
$rs = array('code' => 0, 'msg' => '', 'list' => array());
|
|
|
- $classid=\App\checkNull($this->classid);
|
|
|
+ $type=\App\checkNull($this->type);
|
|
|
$province=\App\checkNull($this->province);
|
|
|
$name=\App\checkNull($this->name);
|
|
|
$p=\App\checkNull($this->p);
|
|
|
|
|
|
$domain=new Domain_Home();
|
|
|
|
|
|
- $key="getClassidShopList_".$classid.'_'.$p;
|
|
|
+ $key="getClassidShopList_".$type.'_'.$p;
|
|
|
$classidShopList=\App\getcaches($key);
|
|
|
if(!$classidShopList){
|
|
|
- $classidShopList = $domain->getClassidShopList($classid,$province,$name,$p);
|
|
|
+ $classidShopList = $domain->getClassidShopList($type,$province,$name,$p);
|
|
|
\App\setCaches($key,$classidShopList,2);
|
|
|
}
|
|
|
|
|
|
@@ -512,6 +515,39 @@ class Home extends Api {
|
|
|
|
|
|
return $rs;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取分类下店铺列表
|
|
|
+ * @desc 用于获取指定分类下店铺列表
|
|
|
+ * @return int code 操作码,0表示成功
|
|
|
+ * @return array list
|
|
|
+ * @return array list[0] 店铺信息
|
|
|
+ * @return array list[0][uid] 用户店铺id
|
|
|
+ * @return array list[0][name] 店铺名称
|
|
|
+ * @return array list[0][thumb] 店铺图片
|
|
|
+ * @return array list[0][username] 会员名称
|
|
|
+ * @return array list[0][sale_nums] 销售时间
|
|
|
+ * @return array list[0][service_points] 服务评分
|
|
|
+ * @return array list[0][delivery_time] 配送时间
|
|
|
+ * @return string msg 提示信息
|
|
|
+ */
|
|
|
+ public function getShopAddressList() {
|
|
|
+ $rs = array('code' => 0, 'msg' => '', 'list' => array());
|
|
|
+
|
|
|
+ $domain=new Domain_Home();
|
|
|
+
|
|
|
+ $key="getShopAddressList";
|
|
|
+ $shopAddressList=\App\getcaches($key);
|
|
|
+ if(!$shopAddressList){
|
|
|
+ $shopAddressList = $domain->getShopAddressList();
|
|
|
+ \App\setCaches($key,$shopAddressList,2);
|
|
|
+ }
|
|
|
+
|
|
|
+ $rs['list'] = $shopAddressList;
|
|
|
+
|
|
|
+ return $rs;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 获取二级分类
|
|
|
* @desc 获取一级分类下的二级分类列表
|