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
892537fb
Commit
892537fb
authored
Apr 12, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
基类
parent
857ec264
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
Basic.php
application/index/extend/Basic.php
+19
-3
No files found.
application/index/extend/Basic.php
View file @
892537fb
...
...
@@ -9,6 +9,8 @@ namespace app\index\extend;
* Time: 9:35
* 基类
*/
use
app\api_broker\service\RedisCacheService
;
use
app\extra\RedisExt
;
use
app\model\AAgents
;
use
app\model\GHousesToAgents
;
...
...
@@ -144,7 +146,7 @@ class Basic extends Controller
public
function
userAuth
(
$requestPath
){
$session_menu
=
Session
::
get
(
"user_info.menu"
);
$session_auth
=
Session
::
get
(
"user_info.auth"
);
$auth_id
=
0
;
$auth_id
=
$is_auth
=
0
;
//去除管理验证
if
(
$this
->
userId
!=
1
)
{
...
...
@@ -174,7 +176,19 @@ class Basic extends Controller
$agents
=
new
AAgents
();
$is_auth
=
$agents
->
agentsAuth
(
$auth_id
,
$this
->
userId
);
$is_auth
=
empty
(
$is_auth
[
'id'
])
?
0
:
1
;
$agent_house
=
new
GHousesToAgents
();
$redis_cache
=
new
RedisCacheService
();
$agent_data
=
$redis_cache
->
getRedisCache
(
2
,
$this
->
userId
);
if
(
$agent_data
[
'auth_group_id'
])
{
$group_data
=
$redis_cache
->
getRedisCache
(
3
,
$agent_data
[
'auth_group_id'
]);
if
(
$group_data
[
'rules'
])
{
$rules_arr
=
explode
(
','
,
$group_data
[
'rules'
]);
if
(
in_array
(
$auth_id
,
$rules_arr
))
{
$is_auth
=
1
;
}
}
}
if
(
$is_auth
==
0
)
{
//处理盘方编辑商铺
if
(
$requestPath
==
'index/houseEdit'
&&
isset
(
$this
->
params
[
'id'
]))
{
...
...
@@ -204,7 +218,8 @@ class Basic extends Controller
}
if
(
!
empty
(
$store_id
))
{
$is_
=
$agents
->
getTotal
([
'store_id'
=>
$store_id
,
'id'
=>
$this
->
userId
,
'level'
=>
20
]);
$agents
=
new
AAgents
();
$is_
=
$agents
->
getTotal
([
'store_id'
=>
[
'in'
,
$store_id
],
'id'
=>
$this
->
userId
,
'level'
=>
20
]);
$is_auth
=
$is_
>
0
?
1
:
0
;
}
}
...
...
@@ -232,6 +247,7 @@ class Basic extends Controller
//没有独家方编辑权限处理
if
(
$requestPath
==
'index/editExclusive'
&&
isset
(
$this
->
params
[
'exclusive_id'
]))
{
//独家方
$agent_house
=
new
GHousesToAgents
();
$exclusive_num
=
$agent_house
->
getAgentHouseNum
(
$this
->
params
[
'exclusive_id'
],
$this
->
params
[
'id'
],
3
);
if
(
$exclusive_num
>
0
)
{
$is_auth
=
1
;
...
...
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