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,6 +89,8 @@ class BusinessDistrict extends Basic
* @return mixed
*/
public function getBusiness() {
if ($this->request->isAjax()) {
$data['status'] = 200;
$data['msg'] = '';
......@@ -99,12 +101,15 @@ class BusinessDistrict extends Basic
$where = 'is_del = 0';
if ($params['name'] != NULL) {
$where .= ' and name like "'.$params['name'].'%"';
$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['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');
}
}
/**
......
......@@ -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