作者 刘锟

Merge remote-tracking branch 'origin/develop' into akun

@@ -33,7 +33,7 @@ class BaseController extends Controller @@ -33,7 +33,7 @@ class BaseController extends Controller
33 $this->token = $this->request->header('token'); 33 $this->token = $this->request->header('token');
34 if(!empty($this->token) && !empty(Cache::get($this->token))){ 34 if(!empty($this->token) && !empty(Cache::get($this->token))){
35 $info = Cache::get($this->token); 35 $info = Cache::get($this->token);
36 - Cache::put($this->token, $info, 3600);//更新缓存时间 36 + Cache::put($this->token, $info, 3600 * 12);//更新缓存时间
37 $this->user = $info; 37 $this->user = $info;
38 $this->uid = $info['id']; 38 $this->uid = $info['id'];
39 //参数处理 39 //参数处理
@@ -41,7 +41,11 @@ class KeywordController extends BaseController @@ -41,7 +41,11 @@ class KeywordController extends BaseController
41 if(!empty($data)){ 41 if(!empty($data)){
42 foreach ($data['list'] as &$v){ 42 foreach ($data['list'] as &$v){
43 $v['product_num'] = Product::where('keyword_id','like' ,'%,'.$v['id'].',%')->count(); 43 $v['product_num'] = Product::where('keyword_id','like' ,'%,'.$v['id'].',%')->count();
44 - $v['tdk'] = boolval($v['seo_title']) * boolval($v['seo_keywords']) * boolval($v['seo_description']); 44 + if(!empty($v['seo_title']) || !empty($v['seo_keywords']) || !empty($v['seo_description'])){
  45 + $v['tdk'] = 1;
  46 + }else{
  47 + $v['tdk'] = 0;
  48 + }
45 $v['url'] = $this->user['domain'] . $v['route']; 49 $v['url'] = $this->user['domain'] . $v['route'];
46 } 50 }
47 } 51 }
@@ -82,7 +82,7 @@ class UserLoginLogic @@ -82,7 +82,7 @@ class UserLoginLogic
82 $token = md5(uniqid().$info['id']); 82 $token = md5(uniqid().$info['id']);
83 //存储缓存 83 //存储缓存
84 $info['token'] = $token; 84 $info['token'] = $token;
85 - Cache::add($token,$info,3600 * 6); 85 + Cache::add($token,$info,3600 * 12);
86 //更新用户信息 86 //更新用户信息
87 $rs = $this->model->edit(['token'=>$token],['id'=>$info['id']]); 87 $rs = $this->model->edit(['token'=>$token],['id'=>$info['id']]);
88 if($rs === false){ 88 if($rs === false){
@@ -121,7 +121,7 @@ class UserLoginLogic @@ -121,7 +121,7 @@ class UserLoginLogic
121 //存储缓存 121 //存储缓存
122 $info['token'] = $token; 122 $info['token'] = $token;
123 $info['manager_id'] = $data['manager_id'];//代表自动登录写入日志 123 $info['manager_id'] = $data['manager_id'];//代表自动登录写入日志
124 - Cache::add($token,$info,3600 * 6); 124 + Cache::add($token,$info,3600 * 12);
125 } 125 }
126 Common::set_user_login(['user_id'=>$info['id'],'ip'=>request()->ip(), 126 Common::set_user_login(['user_id'=>$info['id'],'ip'=>request()->ip(),
127 'project_id'=>$info['project_id'], 'type'=>1 ,'remark' => '自动登录,操作管理员为:'.$data['manager_id']]); 127 'project_id'=>$info['project_id'], 'type'=>1 ,'remark' => '自动登录,操作管理员为:'.$data['manager_id']]);