Commit c5f455c3 authored by hujun's avatar hujun

楼盘标签

parent d2822e56
<?php
/**
* Created by PhpStorm.
* User: fuju
* User: fu ju
* Date: 2018/2/6
* Time: 15:03
*/
namespace app\index\controller;
namespace app\api_broker\controller;
use app\index\extend\Basic;
use app\api_broker\extend\Basic;
use app\model\GLabels;
use think\Session;
......@@ -54,6 +53,9 @@ class Label extends Basic
* 获取打电话的标签
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getLabelsList() {
$result['code'] = 200;
......@@ -67,4 +69,24 @@ class Label extends Basic
return $this->response($result['code'], $result['msg'], $result['data']);
}
/**
* 楼盘标签
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getLabelsShopList() {
$result['code'] = 200;
$result['msg'] = '';
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$labels = new GLabels();
$field = 'id,name,create_time';
$where['type'] = 0;
$result['data']['list'] = $labels->getList($pageNo, $pageSize, 'id DESC', $field, $where);
$result['data']['total'] = $labels->getTotal($where);
return $this->response($result['code'], $result['msg'], $result['data']);
}
}
\ No newline at end of file
......@@ -323,9 +323,8 @@ Route::group('broker', [
'center' => ['api_broker/MyCenter/center', [ 'method' => 'get|post' ] ],
'houseEdit' => ['api_broker/shop/edit', ['method' => 'get|post']], //编辑商铺
'getLabelsShopList' => ['api_broker/label/getLabelsShopList', ['method' => 'get']], //编辑商铺
]);
//Route::miss('api/index/miss');//处理错误的url
\ No newline at end of file
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