Merge remote-tracking branch 'origin/master' into akun
正在显示
8 个修改的文件
包含
53 行增加
和
63 行删除
| @@ -116,29 +116,22 @@ zFePUMXy1bFghAfzNKlrc5XgH4ixeeMh3cDtU97K | @@ -116,29 +116,22 @@ zFePUMXy1bFghAfzNKlrc5XgH4ixeeMh3cDtU97K | ||
| 116 | //平台参数处理 | 116 | //平台参数处理 |
| 117 | $param['idempotencyKey'] = uniqid().time(); | 117 | $param['idempotencyKey'] = uniqid().time(); |
| 118 | $url = $this->path.'/api/post'; | 118 | $url = $this->path.'/api/post'; |
| 119 | - return $this->http_post_ayr($url,$param,$api_key); | ||
| 120 | - } | ||
| 121 | - public function http_post_ayr($url,$param,$api_key){ | ||
| 122 | $curl = curl_init(); | 119 | $curl = curl_init(); |
| 123 | - curl_setopt_array($curl, array( | 120 | + curl_setopt_array($curl, [ |
| 124 | CURLOPT_URL => $url, | 121 | CURLOPT_URL => $url, |
| 125 | CURLOPT_RETURNTRANSFER => true, | 122 | CURLOPT_RETURNTRANSFER => true, |
| 126 | - CURLOPT_ENCODING => '', | ||
| 127 | - CURLOPT_MAXREDIRS => 10, | ||
| 128 | - CURLOPT_TIMEOUT => 0, | ||
| 129 | - CURLOPT_FOLLOWLOCATION => true, | ||
| 130 | - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, | ||
| 131 | - CURLOPT_CUSTOMREQUEST => 'POST', | ||
| 132 | - CURLOPT_POSTFIELDS => http_build_query($param), | ||
| 133 | - CURLOPT_HTTPHEADER => array( | 123 | + CURLOPT_POST => true, |
| 124 | + CURLOPT_POSTFIELDS => json_encode($param), | ||
| 125 | + CURLOPT_HTTPHEADER => [ | ||
| 134 | 'Authorization: Bearer '.$api_key, | 126 | 'Authorization: Bearer '.$api_key, |
| 135 | - 'Accept-Encoding: gzip' | ||
| 136 | - ), | ||
| 137 | - )); | 127 | + 'Content-Type: application/json' |
| 128 | + ], | ||
| 129 | + ]); | ||
| 138 | $response = curl_exec($curl); | 130 | $response = curl_exec($curl); |
| 139 | curl_close($curl); | 131 | curl_close($curl); |
| 140 | return $response; | 132 | return $response; |
| 141 | } | 133 | } |
| 134 | + | ||
| 142 | /** | 135 | /** |
| 143 | * @name :(上传图片或视频到ayr_share)post_media_upload | 136 | * @name :(上传图片或视频到ayr_share)post_media_upload |
| 144 | * @author :lyh | 137 | * @author :lyh |
| @@ -88,7 +88,9 @@ class AyrReleaseController extends BaseController | @@ -88,7 +88,9 @@ class AyrReleaseController extends BaseController | ||
| 88 | } | 88 | } |
| 89 | //发送请求发布社交文章 | 89 | //发送请求发布社交文章 |
| 90 | $res = $ayrShare->post_send_msg($param,$share_info['profile_key']); | 90 | $res = $ayrShare->post_send_msg($param,$share_info['profile_key']); |
| 91 | - $ayrReleaseLogic->release_add($res); | 91 | + if($res){ |
| 92 | + $ayrReleaseLogic->release_add($res); | ||
| 93 | + } | ||
| 92 | //保存返回的内容 | 94 | //保存返回的内容 |
| 93 | $this->response('success',Code::SUCCESS,json_decode($res)); | 95 | $this->response('success',Code::SUCCESS,json_decode($res)); |
| 94 | } | 96 | } |
| @@ -220,7 +220,7 @@ class KeywordController extends BaseController | @@ -220,7 +220,7 @@ class KeywordController extends BaseController | ||
| 220 | 'title.max' => '批量操作不能超过500条数据' | 220 | 'title.max' => '批量操作不能超过500条数据' |
| 221 | ]); | 221 | ]); |
| 222 | $keywordModel = new Keyword(); | 222 | $keywordModel = new Keyword(); |
| 223 | - $rs = $keywordModel->edit(['is_video_keyword'=>$this->param['is_video_keyword']],['title'=>['in',$this->param['title']]]); | 223 | + $rs = $keywordModel->edit(['is_video_keyword'=>$this->param['is_video_keyword'] ?? 0],['title'=>['in',$this->param['title']]]); |
| 224 | if($rs === false){ | 224 | if($rs === false){ |
| 225 | $this->fail('编辑失败,请联系管理员'); | 225 | $this->fail('编辑失败,请联系管理员'); |
| 226 | } | 226 | } |
| @@ -453,30 +453,23 @@ class BTemplateLogic extends BaseLogic | @@ -453,30 +453,23 @@ class BTemplateLogic extends BaseLogic | ||
| 453 | if($info['list_customized'] == BTemplate::IS_VISUALIZATION || $info['detail_customized'] == BTemplate::IS_VISUALIZATION) { | 453 | if($info['list_customized'] == BTemplate::IS_VISUALIZATION || $info['detail_customized'] == BTemplate::IS_VISUALIZATION) { |
| 454 | $data['html'] = $html; | 454 | $data['html'] = $html; |
| 455 | $data['type'] = BTemplate::ALL_HTML; | 455 | $data['type'] = BTemplate::ALL_HTML; |
| 456 | - }else{ | ||
| 457 | - $mainInfo = $this->handleTemplateHtml($html); | ||
| 458 | - $data['main_html'] = $mainInfo['main_html']; | ||
| 459 | - $data['main_css'] = $mainInfo['main_css']; | 456 | + return $this->success($data); |
| 460 | } | 457 | } |
| 461 | - return $this->success($data); | ||
| 462 | - } | ||
| 463 | - $type = $this->getCustomizedType($source, $is_list);//获取定制界面类型 | ||
| 464 | - //查看当前页面是否定制,是否开启可视化 | ||
| 465 | - $page_array = (array)$this->user['is_visualization']->page_array;//获取所有定制界面 | ||
| 466 | - if (in_array($type, $page_array)) {//当前页面是定制界面 | ||
| 467 | - $data['html'] = $html; | ||
| 468 | - $data['type'] = BTemplate::ALL_HTML; | ||
| 469 | }else{ | 458 | }else{ |
| 470 | - $mainInfo = $this->handleTemplateHtml($html); | ||
| 471 | - $data['main_html'] = $mainInfo['main_html']; | ||
| 472 | - $data['main_css'] = $mainInfo['main_css']; | 459 | + $type = $this->getCustomizedType($source, $is_list);//获取定制界面类型 |
| 460 | + //查看当前页面是否定制,是否开启可视化 | ||
| 461 | + $page_array = (array)$this->user['is_visualization']->page_array;//获取所有定制界面 | ||
| 462 | + if (in_array($type, $page_array)) {//当前页面是定制界面 | ||
| 463 | + $data['html'] = $html; | ||
| 464 | + $data['type'] = BTemplate::ALL_HTML; | ||
| 465 | + return $this->success($data); | ||
| 466 | + } | ||
| 473 | } | 467 | } |
| 474 | - }else{ | ||
| 475 | - $mainInfo = $this->handleTemplateHtml($html); | ||
| 476 | - $data['main_html'] = $mainInfo['main_html']; | ||
| 477 | - $data['main_css'] = $mainInfo['main_css']; | ||
| 478 | } | 468 | } |
| 479 | - return $data; | 469 | + $mainInfo = $this->handleTemplateHtml($html); |
| 470 | + $data['main_html'] = $mainInfo['main_html']; | ||
| 471 | + $data['main_css'] = $mainInfo['main_css']; | ||
| 472 | + return $this->success($data); | ||
| 480 | } | 473 | } |
| 481 | 474 | ||
| 482 | /** | 475 | /** |
| @@ -127,6 +127,9 @@ class KeywordLogic extends BaseLogic | @@ -127,6 +127,9 @@ class KeywordLogic extends BaseLogic | ||
| 127 | if(!empty($param['related_blog_ids'])){ | 127 | if(!empty($param['related_blog_ids'])){ |
| 128 | $param['related_blog_ids'] = Arr::arrToSet($param['related_blog_ids'] ?? []); | 128 | $param['related_blog_ids'] = Arr::arrToSet($param['related_blog_ids'] ?? []); |
| 129 | } | 129 | } |
| 130 | + if(!isset($param['is_video_keyword']) || $param['is_video_keyword'] == null){ | ||
| 131 | + $param['is_video_keyword'] = 0; | ||
| 132 | + } | ||
| 130 | return $param; | 133 | return $param; |
| 131 | } | 134 | } |
| 132 | 135 |
| @@ -436,8 +436,8 @@ class ProductLogic extends BaseLogic | @@ -436,8 +436,8 @@ class ProductLogic extends BaseLogic | ||
| 436 | public function setCopyProduct(){ | 436 | public function setCopyProduct(){ |
| 437 | $info = $this->model->read(['id'=>$this->param['id']]); | 437 | $info = $this->model->read(['id'=>$this->param['id']]); |
| 438 | $param = $this->setProductParams($info); | 438 | $param = $this->setProductParams($info); |
| 439 | -// DB::beginTransaction(); | ||
| 440 | -// try { | 439 | + DB::beginTransaction(); |
| 440 | + try { | ||
| 441 | $save_id = $this->model->insertGetId($param); | 441 | $save_id = $this->model->insertGetId($param); |
| 442 | CategoryRelated::saveRelated($save_id, $info['category_id']); | 442 | CategoryRelated::saveRelated($save_id, $info['category_id']); |
| 443 | $route = preg_replace('/-product.*/', '', $param['route']); | 443 | $route = preg_replace('/-product.*/', '', $param['route']); |
| @@ -448,11 +448,11 @@ class ProductLogic extends BaseLogic | @@ -448,11 +448,11 @@ class ProductLogic extends BaseLogic | ||
| 448 | $this->copyTemplate($this->param['id'],$info['project_id'],$save_id); | 448 | $this->copyTemplate($this->param['id'],$info['project_id'],$save_id); |
| 449 | //同步扩展字段 | 449 | //同步扩展字段 |
| 450 | $this->copyExtendInfo($info['id'],$save_id); | 450 | $this->copyExtendInfo($info['id'],$save_id); |
| 451 | -// DB::commit(); | ||
| 452 | -// }catch (\Exception $e){ | ||
| 453 | -// DB::rollBack(); | ||
| 454 | -// $this->fail('复制失败,请联系管理员'); | ||
| 455 | -// } | 451 | + DB::commit(); |
| 452 | + }catch (\Exception $e){ | ||
| 453 | + DB::rollBack(); | ||
| 454 | + $this->fail('复制失败,请联系管理员'); | ||
| 455 | + } | ||
| 456 | return $this->success(['id'=>$save_id]); | 456 | return $this->success(['id'=>$save_id]); |
| 457 | } | 457 | } |
| 458 | 458 |
| @@ -34,7 +34,7 @@ class RatingLogic extends BaseLogic | @@ -34,7 +34,7 @@ class RatingLogic extends BaseLogic | ||
| 34 | */ | 34 | */ |
| 35 | public function getRatingRead(){ | 35 | public function getRatingRead(){ |
| 36 | $data = [ | 36 | $data = [ |
| 37 | - 'company'=>$this->project['company'], | 37 | + 'company'=>$this->project['company'] ?? '', |
| 38 | 'mobile'=>$this->user['mobile'], | 38 | 'mobile'=>$this->user['mobile'], |
| 39 | 'uptime'=>$this->project['uptime'], | 39 | 'uptime'=>$this->project['uptime'], |
| 40 | 'domain'=>$this->user['domain'], | 40 | 'domain'=>$this->user['domain'], |
| @@ -9,21 +9,20 @@ | @@ -9,21 +9,20 @@ | ||
| 9 | return [ | 9 | return [ |
| 10 | // 搜索关键词使用的IP | 10 | // 搜索关键词使用的IP |
| 11 | 'search_ip' => [ | 11 | 'search_ip' => [ |
| 12 | - ["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"], | ||
| 13 | - ["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"], | ||
| 14 | - ["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"], | ||
| 15 | - ["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"], | ||
| 16 | - ["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"], | ||
| 17 | - ["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"], | ||
| 18 | - ["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"], | ||
| 19 | - ["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"], | ||
| 20 | - ["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"], | ||
| 21 | - ["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"], | ||
| 22 | - ["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"], | ||
| 23 | - ["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"], | ||
| 24 | - ["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"], | ||
| 25 | - ["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"], | ||
| 26 | - ["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"], | ||
| 27 | - ["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"] | ||
| 28 | - ] | ||
| 29 | -]; | ||
| 12 | + ["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"], | ||
| 13 | + ["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"], | ||
| 14 | + ["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"], | ||
| 15 | + ["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"], | ||
| 16 | + ["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"], | ||
| 17 | + ["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"], | ||
| 18 | + ["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"], | ||
| 19 | + ["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"], | ||
| 20 | + ["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"], | ||
| 21 | + ["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"], | ||
| 22 | + ["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"], | ||
| 23 | + ["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"], | ||
| 24 | + ["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"], | ||
| 25 | + ["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"], | ||
| 26 | + ["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"], | ||
| 27 | + ["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"]] | ||
| 28 | +]; |
-
请 注册 或 登录 后发表评论