Commit 8d3f789a authored by zhuwei's avatar zhuwei

1

parent 525e380e
...@@ -32,9 +32,10 @@ class SquareService ...@@ -32,9 +32,10 @@ class SquareService
* 文章部门 * 文章部门
* @return array * @return array
*/ */
public function getDistrictLable() public function getDistrictLable($type)
{ {
$res[] = ['id' => 0, 'name' => '热帖']; $str = $type == 0 ? '全部' : '热帖';
$res[] = ['id' => 0, 'name' => $str];
$res[] = ['id' => 1, 'name' => '一部']; $res[] = ['id' => 1, 'name' => '一部'];
$res[] = ['id' => 2, 'name' => '二部']; $res[] = ['id' => 2, 'name' => '二部'];
$res[] = ['id' => 3, 'name' => '三部']; $res[] = ['id' => 3, 'name' => '三部'];
......
...@@ -25,7 +25,9 @@ class Square extends Basic ...@@ -25,7 +25,9 @@ class Square extends Basic
*/ */
public function getDistrictLable() public function getDistrictLable()
{ {
$res = $this->s_square->getDistrictLable(); $params = $this->params;
$type = !isset($params['type']) ? 1 : $params['type'];
$res = $this->s_square->getDistrictLable($type);
return $this->response("200", "成功",$res); return $this->response("200", "成功",$res);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment