作者 李宇航

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

修改A端遗留问题



查看合并请求 !1389
... ... @@ -71,6 +71,7 @@ class GeneratePage extends Command
}
$this->output(' taskID: ' . $noticeInfo['id'] . ' end');
} catch (\Exception $e) {
$noticeModel->edit(['status'=>3],['id'=>$noticeInfo['id']]);
$this->output(' taskID: ' . $noticeInfo['id'] . ', error: ' . $e->getMessage());
}
sleep(2);
... ...
... ... @@ -71,8 +71,8 @@ class AutoTaskController extends BaseController
}
// 映射信息 以及解析信息
$val['type'] = $type[$val['type']] ?? '';
$val['route'] = $route[$val['route']];
$val['status'] = $status[$val['status']];
$val['route'] = $route[$val['route']] ?? '';
$val['status'] = $status[$val['status']] ?? '';
$val['project_title'] = $projects[$val['project_id']] ?? '';
$val['domain'] = $data['domain'] ?? '';
$val['url'] = FALSE == empty($data['url']) ? $data['url'] : [];
... ...
... ... @@ -411,8 +411,6 @@ class ComController extends BaseController
$data[] = ['project_id'=>$v['id'],'company'=>$v['company']];
}
}
//登录选择项目的有效时间
Cache::add('login-project-'.$this->user['mobile'],1,300);
$this->response('success',Code::SUCCESS,$data);
}
... ...
... ... @@ -35,7 +35,7 @@ class LoginController extends BaseController
{
/**
* @remark :登录
* @remark :登录返回所属项目
* @name :login
* @author :lyh
* @method :post
... ...
... ... @@ -22,10 +22,8 @@ class UserLoginLogic
public function __construct()
{
//验证账号密码
$this->param = request()->all();
$this->model = new User();
}
/**
... ... @@ -86,7 +84,6 @@ class UserLoginLogic
if(isset($info['token']) && !empty($info['token'])){
//清除上一次用户缓存
Cache::pull($info['token']);
Cache::pull('login-project-'.$this->param['mobile']);
}
//生成新token
$token = md5(uniqid().$info['id']);
... ... @@ -178,7 +175,7 @@ class UserLoginLogic
/**
* @remark :组装返回数据
* @name :getProjectInfo
* @name :assembleParam
* @author :lyh
* @method :post
* @time :2023/8/29 15:26
... ... @@ -343,10 +340,7 @@ class UserLoginLogic
public function wechatLogin($wechat){
$info = $this->model->read(['wechat'=>$wechat]);
if($info === false){
$data = [
'code'=>0,
'message'=>'当前用户未绑定账户,请绑定后登录',
];
$data = ['code'=>0, 'message'=>'当前用户未绑定账户,请绑定后登录',];
}else {
//获取项目详情
$info = $this->autoAssembleParam($info,User::LOGIN_PASSWORD_SOURCE);
... ... @@ -366,8 +360,7 @@ class UserLoginLogic
'message'=>'登陆成功',
'data'=>$info
];
Common::set_user_login(['user_id'=>$info['id'],'ip'=>request()->ip(),
'project_id'=>$info['project_id'], 'type'=>2 ,'remark' => '自动登录,用户微信扫码']);
Common::set_user_login(['user_id'=>$info['id'],'ip'=>request()->ip(), 'project_id'=>$info['project_id'], 'type'=>2 ,'remark' => '自动登录,用户微信扫码']);
}
return $this->success($data);
}
... ...