Skip to content

Commit

Permalink
2.5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
skycaiji committed Jul 29, 2023
1 parent ae8a4e5 commit 31bb709
Show file tree
Hide file tree
Showing 68 changed files with 2,760 additions and 797 deletions.
Empty file added data/files/index.html
Empty file.
Empty file.
80 changes: 45 additions & 35 deletions plugin/skycaiji.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,51 @@
* 使用:\plugin\skycaiji::方法名(参数)
*/
class skycaiji{
/**
* 调试输出内容
* @param mixed $data 任何数据
* @param bool $goOn 继续运行,默认终止
*/
public static function output($data,$goOn=false){
$data=print_r($data,true);
$data='<p>调试输出内容'.($goOn?'':'并终止运行').':</p><textarea style="width:100%;margin:5px 0;" rows="'.($goOn?5:20).'">'.htmlspecialchars($data).'</textarea>';
\util\Tools::collect_output($data,'black',$goOn?false:true);
}
/**
* 请求网址
* @param string $url 网址
* @param mixed $post (bool)post模式 或者 (array)post数据
* @param string $charset 网页编码,默认自动识别
* @param array $headers 头信息
* @param array $options 选项:timeout超时秒数,curlopts附加curl的选项值
* @return array 返回数组:(bool)success抓取成功,(int)code页面状态码,(string)header头信息,(string)content页面内容,(array)error错误,(array)info资源信息
*/
public static function curl($url,$post=null,$charset=null,$headers=array(),$options=array()){
$charset=$charset?$charset:'auto';//默认auto自动识别
$options=is_array($options)?$options:array();
$options['timeout']=$options['timeout']?:30;//超时时间(秒)
$options['return_info']=$options['return_info']?:1;//返回curl句柄信息
$options['return_body']=$options['return_body']?:1;//返回非成功状态的页面内容
$options['curlopts']=is_array($options['curlopts'])?$options['curlopts']:array();//curl的选项值列表,以CURLOPT_XXX为键名
$data=get_html($url,$headers,$options,$charset,$post,true);
$data=is_array($data)?$data:array();
$data=array(
'success'=>$data['ok']?true:false,
'code'=>intval($data['code']),
'header'=>$data['header']?:'',
'content'=>$data['html']?:'',
'error'=>$data['error']?:array(),
'info'=>$data['info']?:array(),
);
return $data;
}
/**
* 数据库对象
* @return \think\db\Query
*/
public static function db(){
return db();
}
/**
* 蓝天采集器的根目录
* @param string $filename 附加的文件名称
Expand Down Expand Up @@ -60,39 +105,4 @@ public static function app_url($url=''){
$url=isset($url)?$url:'';
return self::root_url('app/'.$url);
}
/**
* 请求网址
* @param string $url 网址
* @param mixed $post (bool)post模式 或者 (array)post数据
* @param string $charset 网页编码,默认自动识别
* @param array $headers 头信息
* @param array $options 选项:timeout超时秒数,curlopts附加curl的选项值
* @return array 返回数组:(bool)success抓取成功,(int)code页面状态码,(string)header头信息,(string)content页面内容,(array)error错误,(array)info资源信息
*/
public static function curl($url,$post=null,$charset=null,$headers=array(),$options=array()){
$charset=$charset?$charset:'auto';//默认auto自动识别
$options=is_array($options)?$options:array();
$options['timeout']=$options['timeout']?:30;//超时时间(秒)
$options['return_info']=$options['return_info']?:1;//返回curl句柄信息
$options['return_body']=$options['return_body']?:1;//返回非成功状态的页面内容
$options['curlopts']=is_array($options['curlopts'])?$options['curlopts']:array();//curl的选项值列表,以CURLOPT_XXX为键名
$data=get_html($url,$headers,$options,$charset,$post,true);
$data=is_array($data)?$data:array();
$data=array(
'success'=>$data['ok']?true:false,
'code'=>intval($data['code']),
'header'=>$data['header']?:'',
'content'=>$data['html']?:'',
'error'=>$data['error']?:array(),
'info'=>$data['info']?:array(),
);
return $data;
}
/**
* 数据库对象
* @return \think\db\Query
*/
public static function db(){
return db();
}
}
22 changes: 11 additions & 11 deletions public/addon/adminlte/jquery-ui.min.js

Large diffs are not rendered by default.

17 changes: 12 additions & 5 deletions public/static/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ div.in-line-mg{display:inline;margin-right:5px;}
.wrapper-not-enable .tab-content{background:#f1f1f1;opacity:0.7;}
.wrapper-not-enable .panel-collapse{background:#f1f1f1;opacity:0.7;}

.box-not-enable{background:#f1f1f1;opacity:0.7;}
.box-enable-wrapper{margin-top:15px;display:block;padding:5px 0 5px 15px;border-left:3px solid #eee;border-radius:3px;}
.box-not-enable .box-enable-wrapper{display:none;}

#confirm_right .cr-msg p:last-child{margin-bottom:0;}

Expand Down Expand Up @@ -220,10 +221,10 @@ table.table thead .sorting_desc:after {
border-bottom:0;
}
/*请求头信息*/
.c-p-request-headers table,.c-p-request-headers-img table{margin-bottom:0}
.c-p-request-headers .delete-request-header,.c-p-request-headers-img .delete-request-header-img{margin-top:8px;}
.c-p-request-headers td:first-child,.c-p-request-headers-img td:first-child{width:200px;}
.c-p-request-headers td:last-child,.c-p-request-headers-img td:last-child{width:50px;text-align:center;}
.c-p-request-headers table,.c-p-request-headers-img table,.c-p-request-headers-file table{margin-bottom:0}
.c-p-request-headers .delete-request-header,.c-p-request-headers-img .delete-request-header-img,.c-p-request-headers-file .delete-request-header-file{margin-top:8px;}
.c-p-request-headers td:first-child,.c-p-request-headers-img td:first-child,.c-p-request-headers-file td:first-child{width:200px;}
.c-p-request-headers td:last-child,.c-p-request-headers-img td:last-child,.c-p-request-headers-file td:last-child{width:50px;text-align:center;}
/*内容标签*/
.c-p-url-content-signs{
width:auto;
Expand Down Expand Up @@ -327,6 +328,7 @@ table.table thead .sorting_desc:after {
.p-m-api-table table,.p-m-api-header-table table{margin-bottom:0;}
.p-m-api-table td:first-child,.p-m-api-header-table td:first-child{width:200px;}
.p-m-api-table td:last-child,.p-m-api-header-table td:last-child{width:50px;text-align:center;}
.p-m-api-rule-module{display:none;}

.p-m-html-tags{}
.p-m-html-tags a{font-size:12px;font-weight:normal;cursor:pointer;margin-right:5px;}
Expand All @@ -335,6 +337,8 @@ table.table thead .sorting_desc:after {
.p-m-if-val-func a.input-group-addon{border-left:0;}
.p-m-if-val-func .input-group-btn>select{border-left:0;width:auto;padding:0;padding-left:5px;text-align:center;}
.p-m-if-op{width:70px;padding:15px 0 0 8px!important;font-size:11px;}

.p-m-download-op{display:none;margin-top:15px;}
/*发布设置*/
.rele-db-error{margin-top:10px;color:red;font-weight:bold;}
.db-table-bind-params{padding:0;margin-bottom:0;border:0;}
Expand All @@ -358,6 +362,8 @@ table.table thead .sorting_desc:after {
.toapi-param-table table,.toapi-header-table table{margin-bottom:0;}
.toapi-param-table td:first-child,.toapi-header-table td:first-child{width:200px;}
.toapi-param-table td:last-child,.toapi-header-table td:last-child{width:50px;text-align:center;}

#toapi_resp_module_help .help-block{display:none;margin:0;}
/*步骤条*/
.steps-bar{width:100%;overflow:hidden;color:#999;}
.steps-bar a{color:#999;}
Expand Down Expand Up @@ -481,6 +487,7 @@ table.table thead .sorting_desc:after {
/*开发*/
.deve-editor-left{padding-right:0px;}
.deve-editor-right{padding-left:1px;}
.deve-editor-apps-nav{margin-bottom:0;}

.deve-editor-apps{padding-left:5px;list-style:none;}
.deve-editor-apps li{padding:2px 0;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
Expand Down
Loading

0 comments on commit 31bb709

Please sign in to comment.