Commit 014ba7c4 authored by clone's avatar clone

基类

parent 30e1fef5
...@@ -20,7 +20,7 @@ class Shop extends Basic ...@@ -20,7 +20,7 @@ class Shop extends Basic
*/ */
public function getShopList() public function getShopList()
{ {
$params = array( /* $params = array(
"site_area" => 2, //来源 1首页 2搜索 "site_area" => 2, //来源 1首页 2搜索
"title" => "尚美", "title" => "尚美",
"carefully_chosen" => 0, "carefully_chosen" => 0,
...@@ -30,7 +30,8 @@ class Shop extends Basic ...@@ -30,7 +30,8 @@ class Shop extends Basic
"money_start" => 1000,//租金 price2 "money_start" => 1000,//租金 price2
"money_end" => 10000,//租金 "money_end" => 10000,//租金
"shangpu_tags" => "临近地铁," "shangpu_tags" => "临近地铁,"
); );*/
$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,
......
...@@ -45,7 +45,7 @@ class Basic extends Controller ...@@ -45,7 +45,7 @@ class Basic extends Controller
$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();
...@@ -63,14 +63,16 @@ class Basic extends Controller ...@@ -63,14 +63,16 @@ class Basic extends Controller
$this->phone = $result['data']["phone"]; $this->phone = $result['data']["phone"];
$this->timeStamp_ = $result["timeStamp_"]; $this->timeStamp_ = $result["timeStamp_"];
$this->verifyTime(); $this->verifyTime();
} }
public function verifyTime(){ public function verifyTime()
$today = Time::today(); {
//authToken有效期为30天 $today = Time::today();
if(($today - $this->timeStamp_) > 2592000){ //authToken有效期为30天
return $this->response("101","AuthToken失效,请重新登录!"); if (($today - $this->timeStamp_) > 2592000) {
} $this->response("101", "AuthToken失效,请重新登录!");
}
} }
......
...@@ -49,9 +49,13 @@ Route::group('api',[ ...@@ -49,9 +49,13 @@ Route::group('api',[
'index' => ['api/member/index', ['method' => 'get']], 'index' => ['api/member/index', ['method' => 'get']],
//post //post member
'login' => ['api/member/login',['method' => 'post']], //c端登陆 'login' => ['api/member/login',['method' => 'post']], //c端登陆
'invite' => ['api/member/invite',['method'=> 'post']], //邀请注册 '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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment