Commit f7d10912 authored by hujun's avatar hujun

首页返回AuthToken参数,修改注册获取验证码时间条件判断

parent 7920ab68
...@@ -13,7 +13,7 @@ namespace app\api\controller; ...@@ -13,7 +13,7 @@ namespace app\api\controller;
use app\api\extend\Basic; use app\api\extend\Basic;
use app\model\BannerModel; use app\model\BannerModel;
use think\Request; use think\Request;
use app\api\untils\JwtUntils;
class Banner extends Basic class Banner extends Basic
{ {
protected $bannerModel; protected $bannerModel;
...@@ -34,6 +34,9 @@ class Banner extends Basic ...@@ -34,6 +34,9 @@ class Banner extends Basic
$params['is_show'] = array( "eq", 0 ); $params['is_show'] = array( "eq", 0 );
$result = $this->bannerModel $result = $this->bannerModel
->getBannerList(1, 15, "sort desc", $field, $params); ->getBannerList(1, 15, "sort desc", $field, $params);
$jwt = new JwtUntils();
$data['is_login'] = '0'; //0未登录
$result['AuthToken'] = $jwt->createToken($data);
return $this->response("200", "request success", $result); return $this->response("200", "request success", $result);
} }
......
...@@ -182,8 +182,8 @@ class Member extends Basic ...@@ -182,8 +182,8 @@ class Member extends Basic
'code'=>$code, 'code'=>$code,
'is_success'=>1 'is_success'=>1
])->find(); ])->find();
if (time()-$note_data->send_time > 18000) { if (time()-strtotime($note_data->send_time)->send_time > 18000) {
return $this->response(101, '请重新获取验证码'); return $this->response(101, '请重新获取验证码');
} }
......
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