作者 刘锟

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

... ... @@ -116,29 +116,22 @@ zFePUMXy1bFghAfzNKlrc5XgH4ixeeMh3cDtU97K
//平台参数处理
$param['idempotencyKey'] = uniqid().time();
$url = $this->path.'/api/post';
return $this->http_post_ayr($url,$param,$api_key);
}
public function http_post_ayr($url,$param,$api_key){
$curl = curl_init();
curl_setopt_array($curl, array(
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => http_build_query($param),
CURLOPT_HTTPHEADER => array(
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode($param),
CURLOPT_HTTPHEADER => [
'Authorization: Bearer '.$api_key,
'Accept-Encoding: gzip'
),
));
'Content-Type: application/json'
],
]);
$response = curl_exec($curl);
curl_close($curl);
return $response;
}
/**
* @name :(上传图片或视频到ayr_share)post_media_upload
* @author :lyh
... ...
... ... @@ -88,7 +88,9 @@ class AyrReleaseController extends BaseController
}
//发送请求发布社交文章
$res = $ayrShare->post_send_msg($param,$share_info['profile_key']);
$ayrReleaseLogic->release_add($res);
if($res){
$ayrReleaseLogic->release_add($res);
}
//保存返回的内容
$this->response('success',Code::SUCCESS,json_decode($res));
}
... ...
... ... @@ -220,7 +220,7 @@ class KeywordController extends BaseController
'title.max' => '批量操作不能超过500条数据'
]);
$keywordModel = new Keyword();
$rs = $keywordModel->edit(['is_video_keyword'=>$this->param['is_video_keyword']],['title'=>['in',$this->param['title']]]);
$rs = $keywordModel->edit(['is_video_keyword'=>$this->param['is_video_keyword'] ?? 0],['title'=>['in',$this->param['title']]]);
if($rs === false){
$this->fail('编辑失败,请联系管理员');
}
... ...
... ... @@ -453,30 +453,23 @@ class BTemplateLogic extends BaseLogic
if($info['list_customized'] == BTemplate::IS_VISUALIZATION || $info['detail_customized'] == BTemplate::IS_VISUALIZATION) {
$data['html'] = $html;
$data['type'] = BTemplate::ALL_HTML;
}else{
$mainInfo = $this->handleTemplateHtml($html);
$data['main_html'] = $mainInfo['main_html'];
$data['main_css'] = $mainInfo['main_css'];
return $this->success($data);
}
return $this->success($data);
}
$type = $this->getCustomizedType($source, $is_list);//获取定制界面类型
//查看当前页面是否定制,是否开启可视化
$page_array = (array)$this->user['is_visualization']->page_array;//获取所有定制界面
if (in_array($type, $page_array)) {//当前页面是定制界面
$data['html'] = $html;
$data['type'] = BTemplate::ALL_HTML;
}else{
$mainInfo = $this->handleTemplateHtml($html);
$data['main_html'] = $mainInfo['main_html'];
$data['main_css'] = $mainInfo['main_css'];
$type = $this->getCustomizedType($source, $is_list);//获取定制界面类型
//查看当前页面是否定制,是否开启可视化
$page_array = (array)$this->user['is_visualization']->page_array;//获取所有定制界面
if (in_array($type, $page_array)) {//当前页面是定制界面
$data['html'] = $html;
$data['type'] = BTemplate::ALL_HTML;
return $this->success($data);
}
}
}else{
$mainInfo = $this->handleTemplateHtml($html);
$data['main_html'] = $mainInfo['main_html'];
$data['main_css'] = $mainInfo['main_css'];
}
return $data;
$mainInfo = $this->handleTemplateHtml($html);
$data['main_html'] = $mainInfo['main_html'];
$data['main_css'] = $mainInfo['main_css'];
return $this->success($data);
}
/**
... ...
... ... @@ -127,6 +127,9 @@ class KeywordLogic extends BaseLogic
if(!empty($param['related_blog_ids'])){
$param['related_blog_ids'] = Arr::arrToSet($param['related_blog_ids'] ?? []);
}
if(!isset($param['is_video_keyword']) || $param['is_video_keyword'] == null){
$param['is_video_keyword'] = 0;
}
return $param;
}
... ...
... ... @@ -436,8 +436,8 @@ class ProductLogic extends BaseLogic
public function setCopyProduct(){
$info = $this->model->read(['id'=>$this->param['id']]);
$param = $this->setProductParams($info);
// DB::beginTransaction();
// try {
DB::beginTransaction();
try {
$save_id = $this->model->insertGetId($param);
CategoryRelated::saveRelated($save_id, $info['category_id']);
$route = preg_replace('/-product.*/', '', $param['route']);
... ... @@ -448,11 +448,11 @@ class ProductLogic extends BaseLogic
$this->copyTemplate($this->param['id'],$info['project_id'],$save_id);
//同步扩展字段
$this->copyExtendInfo($info['id'],$save_id);
// DB::commit();
// }catch (\Exception $e){
// DB::rollBack();
// $this->fail('复制失败,请联系管理员');
// }
DB::commit();
}catch (\Exception $e){
DB::rollBack();
$this->fail('复制失败,请联系管理员');
}
return $this->success(['id'=>$save_id]);
}
... ...
... ... @@ -34,7 +34,7 @@ class RatingLogic extends BaseLogic
*/
public function getRatingRead(){
$data = [
'company'=>$this->project['company'],
'company'=>$this->project['company'] ?? '',
'mobile'=>$this->user['mobile'],
'uptime'=>$this->project['uptime'],
'domain'=>$this->user['domain'],
... ...
... ... @@ -9,21 +9,20 @@
return [
// 搜索关键词使用的IP
'search_ip' => [
["23.228.125.2", "23.228.125.3", "23.228.125.4", "23.228.125.5", "23.228.125.6", "23.228.125.7", "23.228.125.8", "23.228.125.9", "23.228.125.10", "23.228.125.11", "23.228.125.12", "23.228.125.13", "23.228.125.14"],
["104.148.17.98", "104.148.17.99", "104.148.17.100", "104.148.17.101", "104.148.17.102", "104.148.17.103", "104.148.17.104", "104.148.17.105", "104.148.17.106", "104.148.17.107", "104.148.17.108", "104.148.17.109", "104.148.17.110"],
["104.148.36.50", "104.148.36.51", "104.148.36.52", "104.148.36.53", "104.148.36.54", "104.148.36.55", "104.148.36.56", "104.148.36.57", "104.148.36.58", "104.148.36.59", "104.148.36.60", "104.148.36.61", "104.148.36.62"],
["157.52.236.34", "157.52.236.35", "157.52.236.36", "157.52.236.37", "157.52.236.38", "157.52.236.39", "157.52.236.40", "157.52.236.41", "157.52.236.42", "157.52.236.43", "157.52.236.44", "157.52.236.45", "157.52.236.46"],
["104.148.99.98", "104.148.99.99", "104.148.99.100", "104.148.99.101", "104.148.99.102", "104.148.99.103", "104.148.99.104", "104.148.99.105", "104.148.99.106", "104.148.99.107", "104.148.99.108", "104.148.99.109", "104.148.99.110"],
["23.228.118.210", "23.228.118.211", "23.228.118.212", "23.228.118.213", "23.228.118.214", "23.228.118.215", "23.228.118.216", "23.228.118.217", "23.228.118.218", "23.228.118.219", "23.228.118.220", "23.228.118.221", "23.228.118.222"],
["104.148.2.18", "104.148.2.19", "104.148.2.20", "104.148.2.21", "104.148.2.22", "104.148.2.23", "104.148.2.24", "104.148.2.25", "104.148.2.26", "104.148.2.27", "104.148.2.28", "104.148.2.29", "104.148.2.30"],
["104.148.80.114", "104.148.80.115", "104.148.80.116", "104.148.80.117", "104.148.80.118", "104.148.80.119", "104.148.80.120", "104.148.80.121", "104.148.80.122", "104.148.80.123", "104.148.80.124", "104.148.80.125", "104.148.80.126"],
["107.179.34.82", "107.179.34.83", "107.179.34.84", "107.179.34.85", "107.179.34.86", "107.179.34.87", "107.179.34.88", "107.179.34.89", "107.179.34.90", "107.179.34.91", "107.179.34.92", "107.179.34.93", "107.179.34.94"],
["107.179.73.82", "107.179.73.83", "107.179.73.84", "107.179.73.85", "107.179.73.86", "107.179.73.87", "107.179.73.88", "107.179.73.89", "107.179.73.90", "107.179.73.91", "107.179.73.92", "107.179.73.93", "107.179.73.94"],
["157.52.146.82", "157.52.146.83", "157.52.146.84", "157.52.146.85", "157.52.146.86", "157.52.146.87", "157.52.146.88", "157.52.146.89", "157.52.146.90", "157.52.146.91", "157.52.146.92", "157.52.146.93", "157.52.146.94"],
["104.223.166.226", "104.223.166.227", "104.223.166.228", "104.223.166.229", "104.223.166.230", "104.223.166.231", "104.223.166.232", "104.223.166.233", "104.223.166.234", "104.223.166.235", "104.223.166.236", "104.223.166.237", "104.223.166.238"],
["23.247.20.18", "23.247.20.19", "23.247.20.20", "23.247.20.21", "23.247.20.22", "23.247.20.23", "23.247.20.24", "23.247.20.25", "23.247.20.26", "23.247.20.27", "23.247.20.28", "23.247.20.29", "23.247.20.30"],
["134.73.134.226", "134.73.134.227", "134.73.134.228", "134.73.134.229", "134.73.134.230", "134.73.134.231", "134.73.134.232", "134.73.134.233", "134.73.134.234", "134.73.134.235", "134.73.134.236", "134.73.134.237", "134.73.134.238"],
["134.73.184.226", "134.73.184.227", "134.73.184.228", "134.73.184.229", "134.73.184.230", "134.73.184.231", "134.73.184.232", "134.73.184.233", "134.73.184.234", "134.73.184.235", "134.73.184.236", "134.73.184.237", "134.73.184.238"],
["134.73.149.98", "134.73.149.99", "134.73.149.100", "134.73.149.101", "134.73.149.102", "134.73.149.103", "134.73.149.104", "134.73.149.105", "134.73.149.106", "134.73.149.107", "134.73.149.108", "134.73.149.109", "134.73.149.110"]
]
];
\ No newline at end of file
["64.34.216.4","64.34.216.5","64.34.216.29","64.34.216.30","64.34.216.37","64.34.216.69","64.34.216.70","64.34.216.71","64.34.216.109","64.34.216.125","64.34.216.126","64.34.216.127","64.34.216.148"],
["64.34.217.7","64.34.217.21","64.34.217.37","64.34.217.46","64.34.217.84","64.34.217.96","64.34.217.97","64.34.217.98","64.34.217.99","64.34.217.164","64.34.217.252","64.34.217.253","64.34.217.254"],
["64.34.204.86","64.34.204.87","64.34.204.89","64.34.204.220","64.34.204.221","64.34.204.222","64.34.204.223","64.34.204.224","64.34.204.225","64.34.204.226","64.34.204.227","64.34.204.228","64.34.204.229"],
["64.34.253.17","64.34.253.18","64.34.253.21","64.34.253.22","64.34.253.64","64.34.253.125","64.34.253.163","64.34.253.164","64.34.253.230","64.34.253.231","64.34.253.232","64.34.253.240","64.34.253.241"],
["70.33.250.75","70.33.250.76","70.33.250.77","70.33.250.96","70.33.250.97","70.33.250.98","70.33.250.99","70.33.250.138","70.33.250.139","70.33.250.140","70.33.250.179","70.33.250.180","70.33.250.181"],
["69.172.211.65","69.172.211.66","69.172.211.67","69.172.211.68","69.172.211.69","69.172.211.70","69.172.211.71","69.172.211.72","69.172.211.73","69.172.211.74","69.172.211.169","69.172.211.170","69.172.211.171"],
["69.172.214.66","69.172.214.67","69.172.214.68","69.172.214.69","69.172.214.70","69.172.214.71","69.172.214.72","69.172.214.73","69.172.214.74","69.172.214.75","69.172.214.76","69.172.214.77","69.172.214.78"],
["69.90.188.140","69.90.188.141","69.90.188.142","69.90.188.143","69.90.188.144","69.90.188.145","69.90.188.146","69.90.188.147","69.90.188.181","69.90.188.182","69.90.188.183","69.90.188.184","69.90.188.185"],
["104.255.171.225","104.255.171.228","104.255.171.229","104.255.171.230","104.255.171.231","104.255.171.232","104.255.171.235","104.255.171.236","104.255.171.237","104.255.171.238","104.255.171.239","104.255.171.240","104.255.171.253"],
["104.255.172.79","104.255.172.80","104.255.172.81","104.255.172.82","104.255.172.83","104.255.172.84","104.255.172.85","104.255.172.86","104.255.172.87","104.255.172.88","104.255.172.89","104.255.172.90","104.255.172.91"],
["69.172.210.90","69.172.210.91","69.172.210.92","69.172.210.93","69.172.210.94","69.172.210.95","69.172.210.96","69.172.210.97","69.172.210.98","69.172.210.99","69.172.210.100","69.172.210.101","69.172.210.102"],
["69.172.213.206","69.172.213.207","69.172.213.208","69.172.213.209","69.172.213.210","69.172.213.211","69.172.213.212","69.172.213.213","69.172.213.214","69.172.213.215","69.172.213.216","69.172.213.217","69.172.213.218"],
["69.172.229.12","69.172.229.13","69.172.229.14","69.172.229.15","69.172.229.16","69.172.229.36","69.172.229.59","69.172.229.60","69.172.229.61","69.172.229.62","69.172.229.63","69.172.229.64","69.172.229.65"],
["69.172.233.75","69.172.233.76","69.172.233.77","69.172.233.78","69.172.233.79","69.172.233.80","69.172.233.81","69.172.233.82","69.172.233.83","69.172.233.84","69.172.233.85","69.172.233.86","69.172.233.87"],
["76.74.220.18","76.74.220.19","76.74.220.20","76.74.220.21","76.74.220.22","76.74.220.23","76.74.220.24","76.74.220.25","76.74.220.26","76.74.220.27","76.74.220.28","76.74.220.29","76.74.220.30"],
["64.34.205.152","64.34.205.170","64.34.205.171","64.34.205.172","64.34.205.173","64.34.205.174","64.34.205.210","64.34.205.211","64.34.205.212","64.34.205.213","64.34.205.214","64.34.205.215","64.34.205.216"]]
];
... ...