Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sunac-quanmin
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HTML5-李恒逸
sunac-quanmin
Commits
3d3983b2
Commit
3d3983b2
authored
Jun 28, 2017
by
HTML5-侯张振
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.okayapps.com/lihengyi/sunac-quanmin
parents
a453ef1b
9d4a8da6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
9 deletions
+16
-9
channeladmin.php
html/application/controllers/admin/channeladmin.php
+16
-9
No files found.
html/application/controllers/admin/channeladmin.php
View file @
3d3983b2
...
@@ -91,9 +91,9 @@ class Channeladmin extends CI_Controller
...
@@ -91,9 +91,9 @@ class Channeladmin extends CI_Controller
}
}
//获取地区数据列表
//获取地区数据列表
public
function
get_region
(){
public
function
get_region
(
$where
=
'is_deleted = 0'
){
$this
->
load
->
model
(
'region_model'
,
'region'
);
$this
->
load
->
model
(
'region_model'
,
'region'
);
$regions
=
$this
->
region
->
get_all
(
array
(
'is_deleted ='
=>
0
)
);
$regions
=
$this
->
region
->
get_all
(
$where
);
if
(
empty
(
$regions
)){
if
(
empty
(
$regions
)){
return
false
;
return
false
;
}
}
...
@@ -105,9 +105,9 @@ class Channeladmin extends CI_Controller
...
@@ -105,9 +105,9 @@ class Channeladmin extends CI_Controller
}
}
//获取楼盘数据列表
//获取楼盘数据列表
public
function
get_building
(){
public
function
get_building
(
$where
=
'is_deleted = 0'
){
$this
->
load
->
model
(
'building_model'
,
'building'
);
$this
->
load
->
model
(
'building_model'
,
'building'
);
$buildings
=
$this
->
building
->
get_all
(
array
(
'is_deleted ='
=>
0
)
);
$buildings
=
$this
->
building
->
get_all
(
$where
);
if
(
empty
(
$buildings
)){
if
(
empty
(
$buildings
)){
return
false
;
return
false
;
}
}
...
@@ -128,11 +128,15 @@ class Channeladmin extends CI_Controller
...
@@ -128,11 +128,15 @@ class Channeladmin extends CI_Controller
$this
->
data
[
'manager_name'
]
=
urldecode
(
$channelName
);
$this
->
data
[
'manager_name'
]
=
urldecode
(
$channelName
);
$this
->
data
[
'parents'
]
=
$this
->
channel
->
get_parent_channel
(
$channelId
);
$this
->
data
[
'parents'
]
=
$this
->
channel
->
get_parent_channel
(
$channelId
);
$this
->
data
[
'type'
]
=
$this
->
get_roles
();
$this
->
data
[
'type'
]
=
$this
->
get_roles
();
$manager_ins
=
$this
->
manager
->
get
(
array
(
'manager_name'
=>
$this
->
u_name
));
$region_where
=
'region_code in ('
.
$manager_ins
[
'region_id'
]
.
') and is_deleted = 0'
;
$building_where
=
'id in ('
.
$manager_ins
[
'building_id'
]
.
') and is_deleted = 0'
;
//获取地区数据
//获取地区数据
$this
->
data
[
'region'
]
=
$this
->
get_region
();
$this
->
data
[
'region'
]
=
$this
->
get_region
(
$region_where
);
//获取楼盘数据列表
//获取楼盘数据列表
$this
->
data
[
'building'
]
=
$this
->
get_building
();
$this
->
data
[
'building'
]
=
$this
->
get_building
(
$building_where
);
// echo '<pre>';
// print_r($this->data);die;
//修改当前渠道的上级
//修改当前渠道的上级
$parentId
=
$this
->
input
->
post
();
$parentId
=
$this
->
input
->
post
();
$edit_channel
=
$this
->
channel
->
get
(
array
(
'id'
=>
$channelId
));
$edit_channel
=
$this
->
channel
->
get
(
array
(
'id'
=>
$channelId
));
...
@@ -217,10 +221,13 @@ class Channeladmin extends CI_Controller
...
@@ -217,10 +221,13 @@ class Channeladmin extends CI_Controller
//角色类型
//角色类型
$this
->
data
[
'type'
]
=
$this
->
get_roles
();
$this
->
data
[
'type'
]
=
$this
->
get_roles
();
$manager_ins
=
$this
->
manager
->
get
(
array
(
'manager_name'
=>
$this
->
u_name
));
$region_where
=
'region_code in ('
.
$manager_ins
[
'region_id'
]
.
') and is_deleted = 0'
;
$building_where
=
'id in ('
.
$manager_ins
[
'building_id'
]
.
') and is_deleted = 0'
;
//获取地区数据
//获取地区数据
$this
->
data
[
'region'
]
=
$this
->
get_region
();
$this
->
data
[
'region'
]
=
$this
->
get_region
(
$region_where
);
//获取楼盘数据列表
//获取楼盘数据列表
$this
->
data
[
'building'
]
=
$this
->
get_building
();
$this
->
data
[
'building'
]
=
$this
->
get_building
(
$building_where
);
$this
->
load
->
view
(
'admin/channel/channelAdd'
,
$this
->
data
);
$this
->
load
->
view
(
'admin/channel/channelAdd'
,
$this
->
data
);
return
;
return
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment