作者 李宇航

合并分支 'master-server' 到 'master'

修改A端遗留问题



查看合并请求 !1389
@@ -71,6 +71,7 @@ class GeneratePage extends Command @@ -71,6 +71,7 @@ class GeneratePage extends Command
71 } 71 }
72 $this->output(' taskID: ' . $noticeInfo['id'] . ' end'); 72 $this->output(' taskID: ' . $noticeInfo['id'] . ' end');
73 } catch (\Exception $e) { 73 } catch (\Exception $e) {
  74 + $noticeModel->edit(['status'=>3],['id'=>$noticeInfo['id']]);
74 $this->output(' taskID: ' . $noticeInfo['id'] . ', error: ' . $e->getMessage()); 75 $this->output(' taskID: ' . $noticeInfo['id'] . ', error: ' . $e->getMessage());
75 } 76 }
76 sleep(2); 77 sleep(2);
@@ -71,8 +71,8 @@ class AutoTaskController extends BaseController @@ -71,8 +71,8 @@ class AutoTaskController extends BaseController
71 } 71 }
72 // 映射信息 以及解析信息 72 // 映射信息 以及解析信息
73 $val['type'] = $type[$val['type']] ?? ''; 73 $val['type'] = $type[$val['type']] ?? '';
74 - $val['route'] = $route[$val['route']];  
75 - $val['status'] = $status[$val['status']]; 74 + $val['route'] = $route[$val['route']] ?? '';
  75 + $val['status'] = $status[$val['status']] ?? '';
76 $val['project_title'] = $projects[$val['project_id']] ?? ''; 76 $val['project_title'] = $projects[$val['project_id']] ?? '';
77 $val['domain'] = $data['domain'] ?? ''; 77 $val['domain'] = $data['domain'] ?? '';
78 $val['url'] = FALSE == empty($data['url']) ? $data['url'] : []; 78 $val['url'] = FALSE == empty($data['url']) ? $data['url'] : [];
@@ -411,8 +411,6 @@ class ComController extends BaseController @@ -411,8 +411,6 @@ class ComController extends BaseController
411 $data[] = ['project_id'=>$v['id'],'company'=>$v['company']]; 411 $data[] = ['project_id'=>$v['id'],'company'=>$v['company']];
412 } 412 }
413 } 413 }
414 - //登录选择项目的有效时间  
415 - Cache::add('login-project-'.$this->user['mobile'],1,300);  
416 $this->response('success',Code::SUCCESS,$data); 414 $this->response('success',Code::SUCCESS,$data);
417 } 415 }
418 416
@@ -35,7 +35,7 @@ class LoginController extends BaseController @@ -35,7 +35,7 @@ class LoginController extends BaseController
35 { 35 {
36 36
37 /** 37 /**
38 - * @remark :登录 38 + * @remark :登录返回所属项目
39 * @name :login 39 * @name :login
40 * @author :lyh 40 * @author :lyh
41 * @method :post 41 * @method :post
@@ -22,10 +22,8 @@ class UserLoginLogic @@ -22,10 +22,8 @@ class UserLoginLogic
22 22
23 public function __construct() 23 public function __construct()
24 { 24 {
25 - //验证账号密码  
26 $this->param = request()->all(); 25 $this->param = request()->all();
27 $this->model = new User(); 26 $this->model = new User();
28 -  
29 } 27 }
30 28
31 /** 29 /**
@@ -86,7 +84,6 @@ class UserLoginLogic @@ -86,7 +84,6 @@ class UserLoginLogic
86 if(isset($info['token']) && !empty($info['token'])){ 84 if(isset($info['token']) && !empty($info['token'])){
87 //清除上一次用户缓存 85 //清除上一次用户缓存
88 Cache::pull($info['token']); 86 Cache::pull($info['token']);
89 - Cache::pull('login-project-'.$this->param['mobile']);  
90 } 87 }
91 //生成新token 88 //生成新token
92 $token = md5(uniqid().$info['id']); 89 $token = md5(uniqid().$info['id']);
@@ -178,7 +175,7 @@ class UserLoginLogic @@ -178,7 +175,7 @@ class UserLoginLogic
178 175
179 /** 176 /**
180 * @remark :组装返回数据 177 * @remark :组装返回数据
181 - * @name :getProjectInfo 178 + * @name :assembleParam
182 * @author :lyh 179 * @author :lyh
183 * @method :post 180 * @method :post
184 * @time :2023/8/29 15:26 181 * @time :2023/8/29 15:26
@@ -343,10 +340,7 @@ class UserLoginLogic @@ -343,10 +340,7 @@ class UserLoginLogic
343 public function wechatLogin($wechat){ 340 public function wechatLogin($wechat){
344 $info = $this->model->read(['wechat'=>$wechat]); 341 $info = $this->model->read(['wechat'=>$wechat]);
345 if($info === false){ 342 if($info === false){
346 - $data = [  
347 - 'code'=>0,  
348 - 'message'=>'当前用户未绑定账户,请绑定后登录',  
349 - ]; 343 + $data = ['code'=>0, 'message'=>'当前用户未绑定账户,请绑定后登录',];
350 }else { 344 }else {
351 //获取项目详情 345 //获取项目详情
352 $info = $this->autoAssembleParam($info,User::LOGIN_PASSWORD_SOURCE); 346 $info = $this->autoAssembleParam($info,User::LOGIN_PASSWORD_SOURCE);
@@ -366,8 +360,7 @@ class UserLoginLogic @@ -366,8 +360,7 @@ class UserLoginLogic
366 'message'=>'登陆成功', 360 'message'=>'登陆成功',
367 'data'=>$info 361 'data'=>$info
368 ]; 362 ];
369 - Common::set_user_login(['user_id'=>$info['id'],'ip'=>request()->ip(),  
370 - 'project_id'=>$info['project_id'], 'type'=>2 ,'remark' => '自动登录,用户微信扫码']); 363 + Common::set_user_login(['user_id'=>$info['id'],'ip'=>request()->ip(), 'project_id'=>$info['project_id'], 'type'=>2 ,'remark' => '自动登录,用户微信扫码']);
371 } 364 }
372 return $this->success($data); 365 return $this->success($data);
373 } 366 }