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
41cdd145
Commit
41cdd145
authored
Oct 24, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
68296667
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
17 deletions
+7
-17
Basic.php
application/api_broker/extend/Basic.php
+0
-1
Basic.php
application/index/extend/Basic.php
+7
-16
No files found.
application/api_broker/extend/Basic.php
View file @
41cdd145
...
@@ -11,7 +11,6 @@ namespace app\api_broker\extend;
...
@@ -11,7 +11,6 @@ namespace app\api_broker\extend;
*/
*/
use
app\extra\RedisExt
;
use
app\extra\RedisExt
;
use
app\model\AAgents
;
use
app\model\AAgents
;
use
app\model\ASite
;
use
app\model\GOperatingRecords
;
use
app\model\GOperatingRecords
;
use
think\Exception
;
use
think\Exception
;
use
UnexpectedValueException
;
use
UnexpectedValueException
;
...
...
application/index/extend/Basic.php
View file @
41cdd145
...
@@ -11,7 +11,6 @@ namespace app\index\extend;
...
@@ -11,7 +11,6 @@ namespace app\index\extend;
*/
*/
use
app\extra\RedisExt
;
use
app\extra\RedisExt
;
use
app\model\AAgents
;
use
app\model\AAgents
;
use
app\model\ASite
;
use
app\model\GHousesToAgents
;
use
app\model\GHousesToAgents
;
use
app\model\GOperatingRecords
;
use
app\model\GOperatingRecords
;
use
app\model\Users
;
use
app\model\Users
;
...
@@ -299,7 +298,7 @@ class Basic extends Controller
...
@@ -299,7 +298,7 @@ class Basic extends Controller
public
function
getCity
(
$agentId
)
public
function
getCity
(
$agentId
)
{
{
try
{
try
{
if
(
empty
(
$
this
->
user
Id
))
{
if
(
empty
(
$
agent
Id
))
{
return
;
//没有登陆
return
;
//没有登陆
}
}
...
@@ -310,21 +309,13 @@ class Basic extends Controller
...
@@ -310,21 +309,13 @@ class Basic extends Controller
}
}
if
(
empty
(
$this
->
city
)
||
empty
(
$this
->
siteId
)){
if
(
empty
(
$this
->
city
)
||
empty
(
$this
->
siteId
)){
$m_agent
=
new
AAgents
();
$m_agent
=
new
AAgents
();
$m_site
=
new
ASite
();
$site_city
=
$m_agent
->
getAgentsSite
([
'a.id'
=>
$agentId
],
'a.site_id,b.city'
);
$site_id
=
$m_agent
->
getAgentsById
(
$agentId
,
'site_id'
);
if
(
empty
(
$site_city
[
'city'
])
||
empty
(
$site_city
[
'site_id'
]))
{
echo
json_encode
(
array
(
"code"
=>
"300"
,
"msg"
=>
'账号位置信息错误,请联系运营'
,
"data"
=>
[],
"type"
=>
"json"
));
if
(
$site_id
)
{
$this
->
siteId
=
$site_id
;
$city
=
$m_site
->
getSiteById
(
$site_id
,
'city'
);
if
(
$city
)
{
$this
->
city
=
$city
;
}
else
{
echo
json_encode
(
array
(
"code"
=>
"300"
,
"msg"
=>
'账号位置信息错误,请联系运营'
,
"data"
=>
[],
"type"
=>
"json"
));
exit
;
}
}
else
{
echo
json_encode
(
array
(
"code"
=>
"300"
,
"msg"
=>
'账号位置信息错误,请联系运营'
,
"data"
=>
[],
"type"
=>
"json"
));
exit
;
exit
;
}
else
{
$this
->
city
=
$site_city
[
'city'
];
$this
->
siteId
=
$site_city
[
'site_id'
];
}
}
}
}
}
catch
(
\Exception
$exception
)
{
}
catch
(
\Exception
$exception
)
{
...
...
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