mirror of https://gitee.com/zorlan/skycaiji
2.5.4
parent
c2d86c6604
commit
ae8a4e554c
|
@ -1511,7 +1511,7 @@ class CpatternColl extends CpatternBase{
|
|||
$ex='页面渲染失败:'.$ex->getMessage().' 请检查<a href="'.url('setting/page_render').'" target="_blank">渲染设置</a>';
|
||||
if(!is_empty(g_sc_c('proxy','open'))){
|
||||
|
||||
$ex.=' <a href="'.url('setting/proxy').'" target="_blank">代理设置</a>';
|
||||
$ex.=' <a href="'.(is_empty(g_sc('c_original','proxy','open'))?url('admin/task/save&id='.$this->collector['task_id']):url('setting/proxy')).'" target="_blank">代理设置</a>';
|
||||
}
|
||||
$this->echo_error($ex);
|
||||
return null;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
|
||||
|
||||
define('SKYCAIJI_VERSION', '2.5.3');
|
||||
define('SKYCAIJI_VERSION', '2.5.4');
|
||||
\think\Loader::addNamespace('plugin', realpath(SKYCAIJI_PATH.'plugin'));
|
||||
\think\Loader::addNamespace('util',realpath(APP_PATH.'extend/util'));
|
||||
|
||||
|
|
|
@ -567,7 +567,7 @@ class ChromeSocket{
|
|||
}
|
||||
|
||||
public function getTabs(){
|
||||
$data=get_html($this->addressUrl.'/json');
|
||||
$data=$this->getHtml('/json');
|
||||
$data=empty($data)?array():json_decode($data,true);
|
||||
return $data;
|
||||
}
|
||||
|
@ -605,20 +605,28 @@ class ChromeSocket{
|
|||
$tabId=$data['result']['targetId'];
|
||||
}else{
|
||||
|
||||
$tabData=get_html($this->addressUrl.'/json/new');
|
||||
$tabData=$this->getHtml('/json/new');
|
||||
$tabData=empty($tabData)?array():json_decode($tabData,true);
|
||||
$tabId=$tabData['id'];
|
||||
}
|
||||
$tabId=$tabId?$tabId:'';
|
||||
$this->tabId=$tabId;
|
||||
}
|
||||
public function getHtml($uri,$timeout=null){
|
||||
$options=array('custom_request'=>'put');
|
||||
if($timeout){
|
||||
$options['timeout']=$timeout;
|
||||
}
|
||||
$data=get_html($this->addressUrl.$uri,null,$options);
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function closeTab($id){
|
||||
get_html($this->addressUrl.'/json/close/'.$id,null,array('timeout'=>3));
|
||||
$this->getHtml('/json/close/'.$id,3);
|
||||
}
|
||||
|
||||
public function getVersion(){
|
||||
$data=get_html($this->addressUrl.'/json/version');
|
||||
$data=$this->getHtml('/json/version');
|
||||
$data=empty($data)?array():json_decode($data,true);
|
||||
return $data;
|
||||
}
|
||||
|
|
|
@ -91,6 +91,10 @@ class Curl{
|
|||
curl_setopt($ch, CURLOPT_RANGE, $options['range_size']);
|
||||
}
|
||||
|
||||
if($options['custom_request']){
|
||||
curl_setopt ( $ch, CURLOPT_CUSTOMREQUEST, $options['custom_request']);
|
||||
}
|
||||
|
||||
if($isPost){
|
||||
|
||||
curl_setopt ( $ch, CURLOPT_POST, 1 );
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue