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
a7c7b2ac
Commit
a7c7b2ac
authored
Aug 13, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
6bc77fb7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
Shop.php
application/api/controller/Shop.php
+5
-2
Basic.php
application/api/extend/Basic.php
+4
-3
No files found.
application/api/controller/Shop.php
View file @
a7c7b2ac
...
@@ -66,6 +66,7 @@ class Shop extends Basic
...
@@ -66,6 +66,7 @@ class Shop extends Basic
"shop_type" => 0, //商铺类型(0商场,1街铺)
"shop_type" => 0, //商铺类型(0商场,1街铺)
"address" => "111",
"address" => "111",
"disc" => "黄浦区",
"disc" => "黄浦区",
"city" => "上海市",
"industry_type" => "休闲娱乐",
"industry_type" => "休闲娱乐",
"shop_area_start" => 45,//面积起始范围 街铺start和end面积一样
"shop_area_start" => 45,//面积起始范围 街铺start和end面积一样
"shop_area_end" => 65,//面积结束范围
"shop_area_end" => 65,//面积结束范围
...
@@ -83,11 +84,13 @@ class Shop extends Basic
...
@@ -83,11 +84,13 @@ class Shop extends Basic
if
(
empty
(
$params
[
'site_area'
]))
{
if
(
empty
(
$params
[
'site_area'
]))
{
return
$this
->
response
(
"101"
,
"请求来源不能为空"
);
return
$this
->
response
(
"101"
,
"请求来源不能为空"
);
}
}
if
(
empty
(
$params
[
'city'
])
&&
(
$params
[
'city'
]
==
"杭州市"
||
$params
[
'city'
]
==
"上海市"
))
{
return
$this
->
response
(
"101"
,
"城市不能为空"
);
}
$field
=
"id,external_title as title,external_address as address,city,disc,business_district_id,status,industry_type
$field
=
"id,external_title as title,external_address as address,city,disc,business_district_id,status,industry_type
,shop_area_start,shop_area_end,shop_type,residue_num,shop_sign,is_carefully_chosen,rent_type,rent_price"
;
,shop_area_start,shop_area_end,shop_type,residue_num,shop_sign,is_carefully_chosen,rent_type,rent_price"
;
$conditions
[
"city"
]
=
trim
(
$
this
->
user_city
);
$conditions
[
"city"
]
=
trim
(
$
params
[
'city'
]
);
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
...
...
application/api/extend/Basic.php
View file @
a7c7b2ac
...
@@ -13,6 +13,7 @@ use app\extra\RedisExt;
...
@@ -13,6 +13,7 @@ use app\extra\RedisExt;
use
app\model\Users
;
use
app\model\Users
;
use
think\Controller
;
use
think\Controller
;
use
think\Exception
;
use
think\Exception
;
use
Think\Log
;
use
think\Request
;
use
think\Request
;
use
think\Response
;
use
think\Response
;
use
Qiniu
;
use
Qiniu
;
...
@@ -102,7 +103,7 @@ class Basic extends Controller
...
@@ -102,7 +103,7 @@ class Basic extends Controller
$this
->
timeStamp_
=
$result
->
timeStamp_
;
$this
->
timeStamp_
=
$result
->
timeStamp_
;
}
}
$this
->
getCity
(
$this
->
userId
);
//
$this->getCity($this->userId);
$requestPath
=
$this
->
request
->
routeInfo
()[
"rule"
][
0
]
.
"/"
.
$this
->
request
->
routeInfo
()[
"rule"
][
1
];
$requestPath
=
$this
->
request
->
routeInfo
()[
"rule"
][
0
]
.
"/"
.
$this
->
request
->
routeInfo
()[
"rule"
][
1
];
//过滤掉不需要验证token的接口
//过滤掉不需要验证token的接口
...
@@ -113,7 +114,7 @@ class Basic extends Controller
...
@@ -113,7 +114,7 @@ class Basic extends Controller
/**
/**
* 默认城市选择
* 默认城市选择
* @param $
agent
Id
* @param $
user
Id
*/
*/
public
function
getCity
(
$userId
)
public
function
getCity
(
$userId
)
{
{
...
@@ -125,11 +126,11 @@ class Basic extends Controller
...
@@ -125,11 +126,11 @@ class Basic extends Controller
}
else
{
}
else
{
$this
->
user_city
=
"上海市"
;
$this
->
user_city
=
"上海市"
;
}
}
Log
::
record
(
"-------basic-------"
.
$redis_
->
get
(
"user_city_"
.
$userId
),
"info"
);
}
catch
(
Exception
$exception
)
{
}
catch
(
Exception
$exception
)
{
$this
->
user_city
=
"上海市"
;
$this
->
user_city
=
"上海市"
;
}
}
}
}
/**
/**
...
...
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