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
021e7167
Commit
021e7167
authored
Dec 08, 2017
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
basic类
parent
014ba7c4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
7 deletions
+11
-7
Shop.php
application/api/controller/Shop.php
+0
-2
Basic.php
application/api/extend/Basic.php
+9
-4
route.php
application/route.php
+2
-1
No files found.
application/api/controller/Shop.php
View file @
021e7167
...
@@ -32,8 +32,6 @@ class Shop extends Basic
...
@@ -32,8 +32,6 @@ class Shop extends Basic
"shangpu_tags" => "临近地铁,"
"shangpu_tags" => "临近地铁,"
);*/
);*/
$params
=
$this
->
params
;
$params
=
$this
->
params
;
$field
=
"id,agent_id,title,address,city,disc,disccircles,sales,yetai,room_area2,shangpu_type,is_test,
$field
=
"id,agent_id,title,address,city,disc,disccircles,sales,yetai,room_area2,shangpu_type,is_test,
room_num_left,shangpu_tags,carefully_chosen,price"
;
room_num_left,shangpu_tags,carefully_chosen,price"
;
...
...
application/api/extend/Basic.php
View file @
021e7167
...
@@ -41,28 +41,33 @@ class Basic extends Controller
...
@@ -41,28 +41,33 @@ class Basic extends Controller
*/
*/
public
function
__construct
(
Request
$request
=
null
)
public
function
__construct
(
Request
$request
=
null
)
{
{
ob_start
();
ob_end_flush
();
ob_end_clean
();
ob_get_contents
();
// CORS 跨域 Options 检测响应
// CORS 跨域 Options 检测响应
$this
->
corsOptionsHandler
();
$this
->
corsOptionsHandler
();
// 输入对象
// 输入对象
$this
->
request
=
is_null
(
$request
)
?
Request
::
instance
()
:
$request
;
$this
->
request
=
is_null
(
$request
)
?
Request
::
instance
()
:
$request
;
if
(
strtoupper
(
$this
->
request
->
method
())
===
"GET"
)
{
if
(
strtoupper
(
$this
->
request
->
method
())
===
"GET"
)
{
$this
->
params
=
$this
->
request
->
param
();
$this
->
params
=
$this
->
request
->
param
();
}
elseif
(
strtoupper
(
$this
->
request
->
method
())
===
"POST"
)
{
}
elseif
(
strtoupper
(
$this
->
request
->
method
())
===
"POST"
)
{
$this
->
params
=
json_decode
(
$this
->
request
->
param
());
$this
->
params
=
$this
->
request
->
getContent
()
!=
null
?
json_decode
(
$this
->
request
->
getContent
(),
true
)
:
null
;
}
}
$jwt
=
new
\Firebase\JWT\JWT
();
$jwt
=
new
\Firebase\JWT\JWT
();
$this
->
authToken
=
$this
->
params
[
'AuthToken'
];
/*
$this->authToken = $this->params['AuthToken'];
$result = $jwt->decode($this->authToken, config('jwt_key'), array( 'HS256' )); //解码token
$result = $jwt->decode($this->authToken, config('jwt_key'), array( 'HS256' )); //解码token
$this->userId = $result['data']["userId"];
$this->userId = $result['data']["userId"];
$this->phone = $result['data']["phone"];
$this->phone = $result['data']["phone"];
$this->timeStamp_ = $result["timeStamp_"];
$this->timeStamp_ = $result["timeStamp_"];
$this
->
verifyTime
();
$this->verifyTime();
*/
}
}
...
...
application/route.php
View file @
021e7167
...
@@ -55,7 +55,7 @@ Route::group('api',[
...
@@ -55,7 +55,7 @@ Route::group('api',[
'register'
=>
[
'api/member/register'
,[
'method'
=>
'post'
]],
//邀请注册
'register'
=>
[
'api/member/register'
,[
'method'
=>
'post'
]],
//邀请注册
//post shop
//post shop
'shopList'
=>
[
'api/shop/getShopList'
,
[
'method'
=>
'
ge
t'
]],
'shopList'
=>
[
'api/shop/getShopList'
,
[
'method'
=>
'
pos
t'
]],
]);
]);
\ 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