作者 李宇航

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

修改询盘导出脱敏问题



查看合并请求 !853
... ... @@ -168,7 +168,7 @@ class InquiryController extends BaseController
$data = $data['list'] ?? [];
foreach ($data as &$item){
//非正常登录的
if($this->param['login_source']??0 != 2){
if($this->user['login_source']??0 != 2){
//脱敏
!empty($item['email']) && $item['email'] = email_desensitize($item['email']);
!empty($item['phone']) && $item['phone'] = substr($item['phone'], 0, -4) . '****';
... ...
... ... @@ -195,6 +195,13 @@ class ProductController extends BaseController
$this->map['title'] = str_replace('+',' ',$this->map['title']);
$query = $query->where('title','like','%'.$this->map['title'].'%');
}
if(isset($this->map['keyword_title']) && !empty($this->map['keyword_title'])){
$keywordModel = new Keyword();
$keywordInfo = $keywordModel->read(['title'=>$this->map['keyword_title']],['id']);
if(!empty($keywordInfo)){
$query = $query->where('keyword_id','like','%,'.$keywordInfo['id'].',%');
}
}
if(isset($this->map['status'])){
if($this->map['status'] == 0){
$query = $query->whereIn('status',[0,3]);
... ...
... ... @@ -207,6 +207,9 @@ class CustomTemplateLogic extends BaseLogic
public function handleSaveParam(){
$this->param['url'] = str_replace_url($this->param['url']);
$this->param['operator_id'] = $this->user['id'];
if(empty($this->project)){
$this->fail('登录已过期,请重新登录');
}
if(($this->project['deploy_build']['is_search'] == 0) && ($this->param['url'] == 'search')){
$this->fail('请先开启搜索页可视化');
}
... ...
... ... @@ -175,6 +175,9 @@ class BaseLogic extends Logic
$str = http_build_query($data);
$url = $this->user['domain'].'api/delHtml/?'.$str;
$serverIpModel = new ServersIp();
if(empty($this->project)){
$this->fail('登录已过期,请重新登录');
}
$serversIpInfo = $serverIpModel->read(['id'=>$this->project['serve_id']],['servers_id']);
if($serversIpInfo && ($serversIpInfo['servers_id'] == ServerConfig::SELF_SITE_ID)){
//自建站服务器直接返回
... ...
... ... @@ -163,49 +163,29 @@ class UserLoginLogic
if($project['site_status'] != 0){//关闭站点
$this->fail('当前网站已过期,请联系管理员及时续费。');
}
$info['title'] = $project['title'] ?? '';
$info['company'] = $project['company'] ?? '';
$info['from_order_id'] = $project['from_order_id'] ?? '';
$info['aicc'] = $project['aicc'] ?? '';
$info['hagro'] = $project['hagro'] ?? '';
$info['plan'] = Project::planMap()[$project['deploy_build']['plan']];
$info['test_domain'] = $project['deploy_build']['test_domain'] ?? '';
$info['domain'] = (!empty($project['deploy_optimize']['domain']) ? ((new DomainInfo())->getDomain($project['deploy_optimize']['domain'])) : ($project['deploy_build']['test_domain'] ?? ''));
$info['is_customized'] = $project['is_customized'];
$info['is_upload_manage'] = $project['is_upload_manage'];
$info['is_upgrade'] = $project['is_upgrade'];
$info['is_show_blog'] = $project['is_show_blog'];
$info['upload_config'] = $project['upload_config'];
$info['main_lang_id'] = $project['main_lang_id'];
$info['image_max'] = $project['image_max'];
$info['uptime_type'] = $this->getHistory($project);
$info['uptime'] = $project['uptime'];
$info['storage_type'] = $project['storage_type'];
$info['project_location'] = $project['project_location'];
$info['open_export_product'] = $project['open_export_product'];
$info['is_update_language'] = $project['is_update_language'];
$info['is_watermark'] = $project['is_watermark'];
$project['deploy_build']['configuration']['is_product'] = $project['deploy_build']['configuration']['is_news'] = $project['deploy_build']['configuration']['is_blogs'] = $project['deploy_build']['configuration']['is_module'] = "1";
$info['configuration'] = $project['deploy_build']['configuration'];
$info['file_cdn'] = $project['deploy_build']['file_cdn'];
$info['project_type'] = $project['type'];
$info['service_duration'] = $project['deploy_build']['service_duration'];
$info['remain_day'] = $project['remain_day'];
if($info['is_customized'] == 1){
$info['is_visualization'] = json_decode($project['is_visualization']);
$info = $this->handleInfo($info,$project);
$info['login_source'] = $login_source;
//保存项目缓存
Cache::put('user-'.$info['project_id'],$project,12 * 3600);
return $this->success($info);
}
$info['is_comment'] = $project['deploy_build']['is_comment'] ?? 0;
$info['is_visualization_authority'] = $project['deploy_build']['is_visualization_authority'];
$info['is_inquiry_country'] = $project['is_inquiry_country'];
$info['is_subscribe'] = $project['is_subscribe'];
//是否开通AMP
$is_amp = 0;
if(!empty($project['deploy_optimize']['domain'])){
$amp_info = (new DomainInfo())->read(['id'=>$project['deploy_optimize']['domain']],['amp_status']);
$is_amp = $amp_info ? $amp_info['amp_status'] : 0;
/**
* @remark :组装返回数据
* @name :getProjectInfo
* @author :lyh
* @method :post
* @time :2023/8/29 15:26
*/
public function assembleParam($mobile,$project_id){
$info = $this->model->read(['mobile'=>$mobile,'project_id'=>$project_id],['id','mobile','status','role_id','token','name','wechat','project_id']);
//获取项目详情
$project = $this->getProjectInfo($project_id);
if($project['site_status'] != 0){//关闭站点
$this->fail('当前网站已过期,请联系管理员及时续费。');
}
$info['is_amp'] = $is_amp;
$info['login_source'] = $login_source;
$info = $this->handleInfo($info,$project);
$info['login_source'] = User::LOGIN_PASSWORD_SOURCE;//账号密码登录返回
//保存项目缓存
Cache::put('user-'.$info['project_id'],$project,12 * 3600);
return $this->success($info);
... ... @@ -260,19 +240,13 @@ class UserLoginLogic
}
/**
* @remark :组装返回数据
* @name :getProjectInfo
* @remark :登录返回数据处理
* @name :handleInfo
* @author :lyh
* @method :post
* @time :2023/8/29 15:26
* @time :2024/11/5 16:51
*/
public function assembleParam($mobile,$project_id){
$info = $this->model->read(['mobile'=>$mobile,'project_id'=>$project_id],['id','mobile','status','role_id','token','name','wechat','project_id']);
//获取项目详情
$project = $this->getProjectInfo($project_id);
if($project['site_status'] != 0){//关闭站点
$this->fail('当前网站已过期,请联系管理员及时续费。');
}
public function handleInfo($info,$project){
$info['title'] = $project['title'] ?? '';
$info['company'] = $project['company'] ?? '';
$info['from_order_id'] = $project['from_order_id'] ?? '';
... ... @@ -309,6 +283,7 @@ class UserLoginLogic
$info['is_visualization_authority'] = $project['deploy_build']['is_visualization_authority'];
$info['is_inquiry_country'] = $project['is_inquiry_country'];
$info['is_subscribe'] = $project['is_subscribe'];
$info['is_news'] = $project['is_news'] ?? 0;
//是否开通AMP
$is_amp = 0;
if(!empty($project['deploy_optimize']['domain'])){
... ... @@ -316,13 +291,9 @@ class UserLoginLogic
$is_amp = $amp_info ? $amp_info['amp_status'] : 0;
}
$info['is_amp'] = $is_amp;
$info['login_source'] = User::LOGIN_PASSWORD_SOURCE;//账号密码登录返回
//保存项目缓存
Cache::put('user-'.$info['project_id'],$project,12 * 3600);
return $this->success($info);
return $info;
}
/**
* @remark :获取项目数据详情
* @name :getProjectInfo
... ...