Commit f7d10912 authored by hujun's avatar hujun

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

parent 7920ab68
......@@ -13,7 +13,7 @@ namespace app\api\controller;
use app\api\extend\Basic;
use app\model\BannerModel;
use think\Request;
use app\api\untils\JwtUntils;
class Banner extends Basic
{
protected $bannerModel;
......@@ -34,6 +34,9 @@ class Banner extends Basic
$params['is_show'] = array( "eq", 0 );
$result = $this->bannerModel
->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);
}
......
......@@ -183,7 +183,7 @@ class Member extends Basic
'is_success'=>1
])->find();
if (time()-$note_data->send_time > 18000) {
if (time()-strtotime($note_data->send_time)->send_time > 18000) {
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