Commit 67f8fb11 authored by hujun's avatar hujun

商圈修改

parent 20eb54f7
......@@ -16,7 +16,7 @@ use app\model\Regions;
class BusinessDistrict extends Basic
{
public function index() {
return view('business_district/index');
}
public function edit() {
......@@ -89,22 +89,27 @@ class BusinessDistrict extends Basic
* @return mixed
*/
public function getBusiness() {
$data['status'] = 200;
$data['msg'] = '';
if ($this->request->isAjax()) {
$data['status'] = 200;
$data['msg'] = '';
$params = $this->request->param();
$pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
$auth_group = New GBusinessDistrict();
$where = 'is_del = 0';
$params = $this->request->param();
$pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
$auth_group = New GBusinessDistrict();
$where = 'is_del = 0';
if ($params['name'] != NULL) {
$where .= ' and name like "'.$params['name'].'%"';
if ($params['name'] != NULL) {
$where .= ' and name like "' . $params['name'] . '%"';
}
$fields = 'id,name,province,city,disc,status,create_time';
$data['list'] = $auth_group->getList($pageNo, $pageSize, 'id desc', $fields, $where);
$data['total'] = $auth_group->getTotal($where);
return $this->response(200, '', $data);
} else {
return view('business_district/index');
}
$fields = 'id,name,province,city,disc,status,create_time';
$data['list'] = $auth_group->getList($pageNo, $pageSize, 'id desc',$fields, $where);
$data['total'] = $auth_group->getTotal($where);
return $this->response(200, '', $data);
}
/**
......
......@@ -93,14 +93,14 @@ class Basic extends Controller
//判断当前控制器用户是否拥有进入权限
foreach ($session_menu as $v){
//不区分大小写
if(strcasecmp(trim($v['name_all']),$requestPath)==0){
if(strcasecmp(trim($v['name']),$requestPath)==0){
$auth_id = $v['id'];
}
if (!empty($v['_child'])) {
foreach ($v['_child'] as $value) {
//不区分大小写
if(strcasecmp($value['name_all'],$requestPath) == 0){
if(strcasecmp($value['name'],$requestPath) == 0){
$auth_id = $value['id'];
}
}
......
......@@ -140,7 +140,6 @@ Route::group('index', [
'getUserLabel'=>['index/label/getUserLabel',['method' => 'get']], //获取客户状态
//商圈
'BusinessDistrict' => ['index/BusinessDistrict/index', ['method' => 'get']], //商圈列表
'editBusinessDistrict' => ['index/BusinessDistrict/edit', ['method' => 'get | post']], //编辑商圈
'delBusinessDistrict' => ['index/BusinessDistrict/del', ['method' => 'post']], //删除商圈列表
......
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