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
8adc3e53
Commit
8adc3e53
authored
Apr 22, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
有VIP盘权限处理
parent
56a0777c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
3 deletions
+23
-3
Houses.php
application/index/controller/Houses.php
+8
-1
Basic.php
application/index/extend/Basic.php
+15
-2
No files found.
application/index/controller/Houses.php
View file @
8adc3e53
...
...
@@ -418,6 +418,7 @@ class Houses extends Basic
$m_agent
=
new
AAgents
();
$s_house
=
new
HouseService
();
$collect_house
=
new
ACollectHouse
();
$check_auth
=
new
VipService
();
foreach
(
$list
as
$k
=>
$v
)
{
$list
[
$k
][
"is_look"
]
=
$look_shop
->
isLooked
(
$this
->
userId
,
$v
[
"id"
]);
...
...
@@ -463,11 +464,17 @@ class Houses extends Basic
}
}
$list
[
$k
][
'auth_edit_house'
]
=
0
;
//盘方对自己的商铺有编辑权限
if
(
in_array
(
$v
[
'id'
],
$house_id_arr
))
{
$list
[
$k
][
'auth_edit_house'
]
=
1
;
}
else
{
$list
[
$k
][
'auth_edit_house'
]
=
0
;
if
(
$v
[
'is_vip'
])
{
$is_check
=
$check_auth
->
checkRule
(
$this
->
userId
,
'index/vipHouse'
);
if
(
$is_check
)
{
$list
[
$k
][
'auth_edit_house'
]
=
1
;
}
}
}
//独家方
...
...
application/index/extend/Basic.php
View file @
8adc3e53
...
...
@@ -13,6 +13,7 @@ namespace app\index\extend;
use
app\api_broker\service\RedisCacheService
;
use
app\extra\RedisExt
;
use
app\model\AAgents
;
use
app\model\GHouses
;
use
app\model\GHousesToAgents
;
use
app\model\GOperatingRecords
;
use
app\model\Users
;
...
...
@@ -190,7 +191,7 @@ class Basic extends Controller
if
(
$is_auth
==
0
)
{
//处理盘方编辑商铺
if
(
$requestPath
==
'index/houseEdit'
&&
isset
(
$this
->
params
[
'id'
]))
{
$agent_house
=
new
GHousesToAgents
();
if
(
empty
(
$this
->
params
[
'id'
]))
{
$is_auth
=
1
;
}
else
{
...
...
@@ -205,7 +206,6 @@ class Basic extends Controller
//处理店长权限
if
(
!
$is_auth
)
{
$agent_house
=
new
GHousesToAgents
();
$where_agent
[
'a.houses_id'
]
=
$this
->
params
[
'id'
];
$where_agent
[
'a.type'
]
=
2
;
$where_agent
[
'a.is_del'
]
=
0
;
...
...
@@ -221,6 +221,19 @@ class Basic extends Controller
$is_auth
=
$is_
>
0
?
1
:
0
;
}
}
//有VIP盘权限处理
if
(
!
$is_auth
)
{
$m_house
=
new
GHouses
();
$is_vip
=
$m_house
->
getHouseValue
(
'is_vip'
,
[
'id'
=>
$this
->
params
[
'id'
]]);
if
(
$is_vip
)
{
$check_auth
=
new
VipService
();
$check_rule
=
$check_auth
->
checkRule
(
$this
->
userId
,
'index/vipHouse'
);
if
(
!
$check_rule
)
{
$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