Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
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
hujun
tl_estate
Commits
1643e76c
Commit
1643e76c
authored
Mar 05, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合并之后出现的问题解决
parent
4bf33436
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
159 deletions
+27
-159
config.php
application/config.php
+0
-6
Auth.php
application/index/controller/Auth.php
+24
-58
Basic.php
application/index/extend/Basic.php
+0
-15
index.html
application/index/view/auth/index.html
+3
-34
AAgents.php
application/model/AAgents.php
+0
-43
route.php
application/route.php
+0
-3
No files found.
application/config.php
View file @
1643e76c
...
...
@@ -13,16 +13,10 @@ define('IMG_PATH','https://admin.tonglianjituan.com/houseImg/');
define
(
'LOCAL_IMG_HOST'
,
'/resource/lib/Attachments/'
);
define
(
'PAGESIZE'
,
15
);
//分页每页条数
define
(
'ADMIN_URL_TL'
,
'https://admin.tonglianjituan.com/'
);
//B端网址
<<<<<<<
HEAD
//define('TEST_ADMIN_URL_TL','https://dev.tonglianjituan.com/'); //B端网址
define
(
'CURRENT_URL'
,
'http://'
.
$_SERVER
[
'HTTP_HOST'
]
.
DS
);
//取当前域名地址
define
(
'HEADERIMGURL'
,
CURRENT_URL
.
'static'
.
DS
.
'head_portrait/'
);
//头像地址
define
(
'CHAT_IMG_URL'
,
CURRENT_URL
.
'static'
.
DS
.
'chat_image/'
);
//聊天图片地址
=======
define
(
'CURRENT_URL'
,
'http://'
.
$_SERVER
[
'HTTP_HOST'
]
.
'/'
);
//取当前域名地址
define
(
'HEADERIMGURL'
,
CURRENT_URL
.
'static'
.
DS
.
'head_portrait/'
);
//用户头像地址
define
(
'AGENTHEADERIMGURL'
,
CURRENT_URL
.
'static'
.
DS
.
'agent_head_portrait/'
);
//经纪人头像地址
>>>>>>>
test
-
hujun1
.
15
-
111
define
(
'CK_IMG_URL'
,
CURRENT_URL
.
'/resource/lib/Attachments/'
);
//ck 资源文件
define
(
'_POOLKEY'
,
'FC100000022056027'
);
//隐私号码
define
(
'_TLSYPoolKey'
,
'FC100000022056027'
);
//隐私号码池
...
...
application/index/controller/Auth.php
View file @
1643e76c
...
...
@@ -15,9 +15,9 @@ use think\Session;
class
Auth
extends
Basic
{
protected
$authGroupModel
;
protected
$authGroupModel
;
protected
$authRuleModel
;
/**
...
...
@@ -26,7 +26,7 @@ class Auth extends Basic
public
function
index
(){
return
view
(
'index'
);
}
/**
* 权限分配
...
...
@@ -129,7 +129,7 @@ class Auth extends Basic
$group_id
=
$this
->
request
->
param
(
'id'
);
$table
=
New
AuthGroup
();
if
(
$this
->
request
->
isPost
())
{
$data
=
input
(
'post.'
);
...
...
@@ -140,9 +140,9 @@ class Auth extends Basic
]
);
if
(
$err
!=
1
){
return
$this
->
response
(
100
,
$err
);
}
if
(
$err
!=
1
){
return
$this
->
response
(
100
,
$err
);
}
//新增或者编辑数据
if
(
empty
(
$data
[
'id'
])){
$data
[
'create_time'
]
=
date
(
'Y-m-d H:i:s'
,
time
());
...
...
@@ -191,7 +191,7 @@ class Auth extends Basic
return
$menus
;
}
}
/**
* 角色权限分配or查看
...
...
@@ -205,47 +205,12 @@ class Auth extends Basic
* @throws \think\exception\DbException
*/
public
function
accessLook
(){
$table
=
New
AuthGroup
;
$table
=
New
AuthGroup
;
$group_id
=
$this
->
request
->
param
(
'id'
);
$data
[
'title'
]
=
'权限分配'
;
// echo $group_id;
// exit;
if
(
$this
->
request
->
isPost
())
{
=======
public
function
test
(){
// $this->authRuleModel = new AuthRule();
// dump($this->authRuleModel);die;
// $list= $this->authRuleModel->find();
// return $this->response(200, '', $list);
}
/**
* 权限分配
* @param integer $group_id 组ID
* @return [type] [description]
* @date 2018-01-22
* @author zfc
*/
public
function
accessLook
(
$group_id
=
0
){
$table
=
New
AuthGroup
();
$table2
=
New
AuthRule
();
$data
[
'title'
]
=
'权限分配'
;
// echo $group_id;
// exit;
<<<<<<<
HEAD
if
(
IS_POST
&&
$group_id
=
0
)
{
=======
<<<<<<<
HEAD
if
(
IS_POST
&&
$group_id
=
0
)
{
>>>>>>>
8e62
fd6
...
合并test
=======
if
(
IS_POST
&&
$group_id
==
0
)
{
>>>>>>>
cb14688
...
编辑5
>>>>>>>
test
-
hujun1
.
15
-
111
//添加or修改
$data
[
'id'
]
=
$group_id
;
$menu_auth
=
input
(
'post.menu_auth/a'
,
''
);
//获取所有授权菜单id
...
...
@@ -266,7 +231,7 @@ class Auth extends Basic
}
else
{
return
$this
->
response
(
100
,
'失败'
);
}
//}
}
else
{
...
...
@@ -293,7 +258,7 @@ class Auth extends Basic
$table
=
New
AuthGroup
;
$data
=
input
(
'post.'
);
// prt($data);
// prt($data);
$data
[
'rules'
]
=
trim
(
$data
[
'rules'
],
','
);
//提交数据
if
(
$table
->
editData
(
$data
,
$data
[
'id'
]))
{
...
...
@@ -322,8 +287,8 @@ class Auth extends Basic
}
}
/**
/**
* 设置角色的状态
*/
public
function
updateGroup
(){
...
...
@@ -341,7 +306,7 @@ class Auth extends Basic
//权限表界面
public
function
authRuleIndex
(){
return
view
(
'auth_rule_index'
);
return
view
(
'auth_rule_index'
);
}
...
...
@@ -363,7 +328,7 @@ class Auth extends Basic
$params
=
$this
->
request
->
param
();
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
//条件
//条件
$field
=
"a.id,a.name,a.title,a.depend_flag,a.type,a.pid,a.icon,a.sort,if(a.is_menu,'是','否')is_menu,a.status,ifnull(b.title,'顶级') as title2"
;
$where
=
'a.status in(0,1)'
;
$search
=
$params
[
'search'
];
...
...
@@ -373,10 +338,10 @@ class Auth extends Basic
}
$order
=
'a.pid asc,a.sort asc'
;
$join
=
[[
'auth_rule b'
,
' a.pid=b.id'
,
'left'
]];
$data
[
'list'
]
=
$table
->
authRuleList
(
$pageNo
,
$pageSize
,
$order
,
$field
,
$join
,
$where
);
$data
[
'total'
]
=
$table
->
getTotal
(
$where
,
'a'
);
// prt($list);//转化arr
//prt(collection($list)->toArray());//转化arr
$data
[
'list'
]
=
$table
->
authRuleList
(
$pageNo
,
$pageSize
,
$order
,
$field
,
$join
,
$where
);
$data
[
'total'
]
=
$table
->
getTotal
(
$where
,
'a'
);
// prt($list);//转化arr
//prt(collection($list)->toArray());//转化arr
return
$this
->
response
(
200
,
'成功'
,
$data
);
}
...
...
@@ -419,7 +384,7 @@ class Auth extends Basic
public
function
updateAuthRule
(){
$group_id
=
$this
->
request
->
param
(
'id'
);
$table
=
New
AuthRule
;
if
(
$this
->
request
->
isPost
())
{
...
...
@@ -457,13 +422,13 @@ class Auth extends Basic
$order
=
''
;
$join
=
[[
'auth_rule b'
,
' a.pid=b.id'
,
'left'
]];
$info
=
$table
->
authRuleList2
(
$order
,
$field
,
$join
,
$where
);
//echo $table->getLastSql();
//echo $table->getLastSql();
return
$this
->
response
(
200
,
'取值'
,
$info
[
0
]);
}
}
}
}
\ No newline at end of file
application/index/extend/Basic.php
View file @
1643e76c
...
...
@@ -69,21 +69,6 @@ class Basic extends Controller
$this
->
userAuth
(
$requestPath
);
}
/**
* 权限判定
*
* @param $requestPath
* @return Response
*/
public
function
userAuth
(
$requestPath
){
$session
=
Session
::
get
(
"userinfo.nav"
);
$rule
=
0
;
if
(
$session
!=
NULL
)
{
//判断当前控制器用户是否拥有进入权限
foreach
(
$session
as
$v
){
}
/**
* 权限判定
* @param $requestPath
...
...
application/index/view/auth/index.html
View file @
1643e76c
{layout name="global/frame_tpl" /}
<
<<<<<<
HEAD
<
h4
>
权限管理
</h4>
<a
href=
"/index/roleedit"
>
添加角色
</a>
<input
type=
"hidden"
class=
"page-load"
id=
"auth"
/>
<div
id=
"page-content-wrapper"
>
<div
class=
"container"
>
<div
class=
"col-lg-10 col-lg-offset-0"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<thead>
<tr>
<th
class=
"text-center"
>
ID
</th>
<th
class=
"text-center"
>
角色名
</th>
<th
class=
"text-center"
>
描述
</th>
<th
class=
"text-center"
>
状态
</th>
<th
class=
"text-center"
>
操作
</th>
</tr>
</thead>
<tbody
id=
"auth_list"
>
</tbody>
</table>
</div>
<!-- /#page-content-wrapper -->
<div
class=
"text-right pageinfo"
id=
"pagediv"
>
</div>
</div>
</div>
=======
<!--角色管理页面-->
<input
type=
"hidden"
class=
"page-load"
id=
"auth"
/>
<div
id=
"page-content-wrapper"
>
...
...
@@ -63,7 +33,7 @@
<div
class=
"form-group"
>
<div
class=
"input-group search-form"
>
<input
type=
"text"
name=
"search"
class=
"form-control search-input pull-right"
value=
""
placeholder=
"请输入ID/用户名/昵称"
>
<span
class=
"input-group-btn"
>
<span
class=
"input-group-btn"
>
<button
id=
"search"
type=
"button"
class=
"btn btn-success search-btn"
><i
class=
"glyphicon glyphicon-search"
></i></button>
</span>
</div>
...
...
@@ -142,8 +112,8 @@
</h4>
</div>
<div
class=
"modal-body"
>
<div
class=
"auth"
id=
"access_box"
>
</div>
<div
class=
"auth"
id=
"access_box"
>
</div>
</div>
...
...
@@ -157,4 +127,3 @@
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
>>>>>>> test-hujun1.15-111
application/model/AAgents.php
View file @
1643e76c
...
...
@@ -296,46 +296,4 @@ public function saveList(){
->
select
();
return
$data
;
}
/**
*检查重复
*
*/
public
function
repetition
(
$name
,
$key
){
$r
=
$this
->
field
(
$name
)
->
where
(
$name
,
'='
,
$key
)
->
select
();
//$this->getLastSql();
if
(
$r
){
return
true
;
}
else
{
return
false
;
}
}
//更新数据
public
function
saveStatus
(
$name
,
$key
,
$ids
){
$r
=
$this
->
save
([
$name
,
$key
],[
"id"
,
'in'
,
$ids
]);
return
$r
;
}
//删除数据
public
function
delUid
(
$name
,
$ids
){
$this
->
where
(
$name
,
'in'
,
$ids
)
->
delete
();
}
//通过ids批量添加数据
public
function
addAllAccess
(
$ids
,
$data
){
$idarr
=
explode
(
$ids
);
if
(
is_array
(
$idarr
)){
$arr
=
array
();
foreach
(
$idarr
as
$v
){
$data
[
'uid'
]
=
$v
;
$arr
[]
=
$data
;
}
$r
=
$this
->
saveAll
(
$arr
);
}
else
{
$data
[
'uid'
]
=
$ids
;
$r
=
$this
->
save
(
$data
);
}
return
$r
;
}
}
\ No newline at end of file
application/route.php
View file @
1643e76c
...
...
@@ -289,6 +289,4 @@ Route::group('broker', [
'agentsPhone'
=>
[
'api_broker/CellPhone/agentsPhone'
,
[
'method'
=>
'get|post'
]
],
//获取经纪人拨打界面手机号
]);
Route
::
group
(
'task'
,[
//Route::miss('api/index/miss');//处理错误的url
\ No newline at end of file
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