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
014ba7c4
Commit
014ba7c4
authored
Dec 08, 2017
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
基类
parent
30e1fef5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
11 deletions
+19
-11
Shop.php
application/api/controller/Shop.php
+3
-2
Basic.php
application/api/extend/Basic.php
+9
-7
route.php
application/route.php
+7
-2
No files found.
application/api/controller/Shop.php
View file @
014ba7c4
...
...
@@ -20,7 +20,7 @@ class Shop extends Basic
*/
public
function
getShopList
()
{
$params
=
array
(
/*
$params = array(
"site_area" => 2, //来源 1首页 2搜索
"title" => "尚美",
"carefully_chosen" => 0,
...
...
@@ -30,7 +30,8 @@ class Shop extends Basic
"money_start" => 1000,//租金 price2
"money_end" => 10000,//租金
"shangpu_tags" => "临近地铁,"
);
);*/
$params
=
$this
->
params
;
$field
=
"id,agent_id,title,address,city,disc,disccircles,sales,yetai,room_area2,shangpu_type,is_test,
...
...
application/api/extend/Basic.php
View file @
014ba7c4
...
...
@@ -45,7 +45,7 @@ class Basic extends Controller
$this
->
corsOptionsHandler
();
// 输入对象
$this
->
request
=
is_null
(
$request
)
?
Request
::
instance
()
:
$request
;
if
(
strtoupper
(
$this
->
request
->
method
())
===
"GET"
)
{
$this
->
params
=
$this
->
request
->
param
();
...
...
@@ -63,14 +63,16 @@ class Basic extends Controller
$this
->
phone
=
$result
[
'data'
][
"phone"
];
$this
->
timeStamp_
=
$result
[
"timeStamp_"
];
$this
->
verifyTime
();
}
public
function
verifyTime
(){
$today
=
Time
::
today
();
//authToken有效期为30天
if
((
$today
-
$this
->
timeStamp_
)
>
2592000
){
return
$this
->
response
(
"101"
,
"AuthToken失效,请重新登录!"
);
}
public
function
verifyTime
()
{
$today
=
Time
::
today
();
//authToken有效期为30天
if
((
$today
-
$this
->
timeStamp_
)
>
2592000
)
{
$this
->
response
(
"101"
,
"AuthToken失效,请重新登录!"
);
}
}
...
...
application/route.php
View file @
014ba7c4
...
...
@@ -49,9 +49,13 @@ Route::group('api',[
'index'
=>
[
'api/member/index'
,
[
'method'
=>
'get'
]],
//post
//post
member
'login'
=>
[
'api/member/login'
,[
'method'
=>
'post'
]],
//c端登陆
'invite'
=>
[
'api/member/invite'
,[
'method'
=>
'post'
]],
//邀请注册
'register'
=>
[
'api/member/register'
,[
'method'
=>
'post'
]]
//邀请注册
'register'
=>
[
'api/member/register'
,[
'method'
=>
'post'
]],
//邀请注册
//post shop
'shopList'
=>
[
'api/shop/getShopList'
,
[
'method'
=>
'get'
]],
]);
\ 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