This commit is contained in:
Gitea 2021-01-14 15:27:52 +08:00
parent 6a138cf45f
commit dce5aa8528
6 changed files with 1932 additions and 655 deletions

2
.gitignore vendored
View File

@ -1,3 +1,3 @@
.idea .idea
uploader/* uploader

View File

@ -1 +1 @@
{"games":["\u98ce\u66b4\u5947\u5175","\u6b4c\u624bCOCOS","\u4e2d\u53e4\u6218\u9524","\u5996\u7075\u6218\u59ec","\u751f\u5316\u7eaa\u5143","\u8bd9\u8c10\u4e09\u56fd","\u50cf\u7d20\u9879\u76ee","\u5b64\u5c9b\u5947\u5175","\u90e8\u843d\u6218\u9b42","\u90e8\u843d\u7e41\u4f53\u7248","\u90e8\u843d\u97e9\u6587\u7248","\u90e8\u843d\u8d8a\u5357\u7248","\u90e8\u843d\u82f1\u6587\u7248","\u90e8\u843d\u6cf0\u6587\u7248","\u90e8\u843dH5\u7248","\u66d9\u5149\u4e4b\u5883","\u9b54\u6cd5\u95e8H5","\u6b63\u7248\u9b54\u6cd5\u95e8\u539f\u751f","3D\u963f\u51e1\u8fbe","\u5927\u6218\u56fd","\u5927\u4e09\u56fd","\u5927\u4e09\u56fd\u97e9\u6587","\u5766\u514b\u7a81\u88ad","\u5251\u5723\u6302\u673a","\u7cbe\u7075\u7eaa\u5143","\u9b54\u6cd5\u65e0\u654c","\u4e50\u8c37\u519b\u5e08","X\u7cbe\u7075","\u5730\u4ea7\u5927\u4ea8","\u4e50\u8c37MT","\u8d85\u7ea7\u6536\u85cf\u5bb6","\u4e71\u4e16\u957f\u6b4c","\u6b4c\u624b2019","\u6218\u56fd\u4e89\u9e23","\u6697\u9ed1\u5730\u4e0b\u57ce\u7e41\u4f53","\u5c71\u6d77\u7ecf","3D\u751f\u5316","\u5176\u4ed6"],"roles":[""],"gxvroles":[""],"gxyyeroles":["\u9b4f\u6676","\u67f3\u94b0\u6ce2","\u6c60\u6e90","\u9093\u6770","\u5434\u660a","\u7f57\u677e\u67cf"],"gxcperoles":["\u9093\u5b9a\u946b","\u9976\u677e","\u91d1\u5143\u5143","\u7f57\u68a6\u83f2","\u9676\u4e39","\u5ed6\u5b50\u9f99"],"gxyferoles":["\u8212\u5c55","\u9093\u5b9a\u658c","\u5510\u51ef","\u55bb\u987a\u745e","\u5218\u601d\u654f"],"xfvroles":["\u8212\u5c55","\u9093\u5b9a\u658c","\u5510\u51ef","\u55bb\u987a\u745e","\u5218\u601d\u654f","\u9b4f\u6676","\u67f3\u94b0\u6ce2","\u6c60\u6e90","\u9093\u6770","\u674e\u4fca","\u9ec4\u6653","\u9093\u5b9a\u946b","\u9976\u677e","\u91d1\u5143\u5143","\u7f57\u68a6\u83f2","\u9676\u4e39","\u5ed6\u5b50\u9f99","\u9093\u5b9a\u5764"],"xfyyeroles":["\u67f3\u94b0\u6ce2","\u6c60\u6e90","\u9093\u6770","\u9b4f\u6676","\u5434\u660a","\u7f57\u677e\u67cf"],"dbyyeroles":["\u7f57\u677e\u67cf"],"sxyyeroles":["\u7f57\u677e\u67cf"],"dbvroles":[""],"sxaroles":["\u7f57\u677e\u67cf"]} {"games":["\u98ce\u66b4\u5947\u5175","\u6b4c\u624bCOCOS","\u4e2d\u53e4\u6218\u9524","\u5996\u7075\u6218\u59ec","\u751f\u5316\u7eaa\u5143","\u90e8\u843d\u6218\u9b42","\u8bd9\u8c10\u4e09\u56fd","\u50cf\u7d20\u9879\u76ee","\u5b64\u5c9b\u5947\u5175","\u90e8\u843d\u7e41\u4f53\u7248","\u90e8\u843d\u97e9\u6587\u7248","\u90e8\u843d\u8d8a\u5357\u7248","\u90e8\u843d\u82f1\u6587\u7248","\u90e8\u843d\u6cf0\u6587\u7248","\u90e8\u843dH5\u7248","\u66d9\u5149\u4e4b\u5883","\u9b54\u6cd5\u95e8H5","\u6b63\u7248\u9b54\u6cd5\u95e8\u539f\u751f","3D\u963f\u51e1\u8fbe","\u5927\u6218\u56fd","\u5927\u4e09\u56fd","\u5927\u4e09\u56fd\u97e9\u6587","\u5766\u514b\u7a81\u88ad","\u5251\u5723\u6302\u673a","\u7cbe\u7075\u7eaa\u5143","\u9b54\u6cd5\u65e0\u654c","\u4e50\u8c37\u519b\u5e08","X\u7cbe\u7075","\u5730\u4ea7\u5927\u4ea8","\u4e50\u8c37MT","\u8d85\u7ea7\u6536\u85cf\u5bb6","\u4e71\u4e16\u957f\u6b4c","\u6b4c\u624b2019","\u6218\u56fd\u4e89\u9e23","\u6697\u9ed1\u5730\u4e0b\u57ce\u7e41\u4f53","\u5c71\u6d77\u7ecf","3D\u751f\u5316","\u5176\u4ed6"],"roles":["\u8212\u5c55"],"gxvroles":[""],"gxyyeroles":["\u9b4f\u6676","\u67f3\u94b0\u6ce2","\u6c60\u6e90","\u9093\u6770","\u674e\u4fca","\u9ec4\u6653","\u674e\u5b9c\u6cfd","\u9a6c\u5929\u5e73","\u53f6\u664f\u6587"],"gxcperoles":["\u9093\u5b9a\u946b","\u9976\u677e","\u91d1\u5143\u5143","\u7f57\u68a6\u83f2","\u9676\u4e39","\u5ed6\u5b50\u9f99"],"gxyferoles":["\u8212\u5c55","\u9093\u5b9a\u658c","\u5510\u51ef","\u55bb\u987a\u745e","\u5218\u601d\u654f"],"xfvroles":["\u8212\u5c55","\u9093\u5b9a\u658c","\u5510\u51ef","\u55bb\u987a\u745e","\u5218\u601d\u654f","\u9b4f\u6676","\u67f3\u94b0\u6ce2","\u6c60\u6e90","\u9093\u6770","\u674e\u4fca","\u9ec4\u6653","\u9093\u5b9a\u946b","\u9976\u677e","\u91d1\u5143\u5143","\u7f57\u68a6\u83f2","\u9676\u4e39","\u5ed6\u5b50\u9f99","\u6556\u957f\u521a","\u5218\u601d\u79cb","\u6885\u5bb6\u8d35","\u674e\u5b9c\u6cfd","\u9a6c\u5929\u5e73","\u53f6\u664f\u6587","\u9093\u5b9a\u5764"],"xfyyeroles":["\u67f3\u94b0\u6ce2","\u6c60\u6e90","\u9093\u6770","\u9b4f\u6676","\u674e\u4fca","\u9ec4\u6653","\u674e\u5b9c\u6cfd","\u9a6c\u5929\u5e73","\u53f6\u664f\u6587","\u8212\u5c55"],"dbvroles":[""],"dbyferoles":["\u8212\u5c55","\u9093\u5b9a\u658c","\u5510\u51ef","\u55bb\u987a\u745e","\u5218\u601d\u654f","\u6556\u957f\u521a","\u5218\u601d\u79cb","\u6885\u5bb6\u8d35"],"dbyyeroles":["\u9b4f\u6676","\u67f3\u94b0\u6ce2","\u6c60\u6e90","\u9093\u6770","\u674e\u4fca","\u9ec4\u6653","\u674e\u5b9c\u6cfd","\u9a6c\u5929\u5e73","\u53f6\u664f\u6587"],"dbcperoles":["\u9093\u5b9a\u946b","\u9976\u677e","\u91d1\u5143\u5143","\u7f57\u68a6\u83f2","\u9676\u4e39","\u5ed6\u5b50\u9f99"],"sxyyeroles":["\u67f3\u94b0\u6ce2","\u6c60\u6e90","\u9093\u6770","\u9b4f\u6676","\u674e\u4fca","\u9ec4\u6653","\u674e\u5b9c\u6cfd","\u9a6c\u5929\u5e73","\u53f6\u664f\u6587"],"sxaroles":["\u9b4f\u6676","\u67f3\u94b0\u6ce2","\u6c60\u6e90","\u9093\u6770","\u674e\u4fca","\u9ec4\u6653","\u674e\u5b9c\u6cfd","\u9a6c\u5929\u5e73","\u53f6\u664f\u6587"]}

44
ddsender.php Normal file
View File

@ -0,0 +1,44 @@
<?php
function request_by_curl($remote_server, $post_string) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $remote_server);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($ch, CURLOPT_HTTPHEADER, array ('Content-Type: application/json;charset=utf-8'));
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// 线下环境不用开启curl证书验证, 未调通情况可尝试添加该代码
curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
$data = curl_exec($ch);
curl_close($ch);
echo $data;
return $data;
}
//今天设置过菜单
$webhook = "https://oapi.dingtalk.com/robot/send?access_token=3acdb7313882f20c2f6cbc91c83719bea16667e244fa8a9eb0103aa893a1815f";
$data = array(
'msgtype'=>'actionCard',
'actionCard'=>array(
'title'=>'Event新增了上线节点',
"text"=> "**【妖灵战姬】上线:买量测试**\n\n日期2021-01-13.",
'hideAvatar'=>'0',
'btnOrientation'=>'0',
'btns' => array(
array(
'title'=>'查看详情',
'actionURL'=>'http://10.0.0.5/leguevent/',
)
)
),
"at"=>array(
"isAtAll"=>true
)
);
$data_string = json_encode($data);
$result = request_by_curl($webhook, $data_string);
echo $result;
?>

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,55 @@
<?php <?php
function request_by_curl($remote_server, $post_string) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $remote_server);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($ch, CURLOPT_HTTPHEADER, array ('Content-Type: application/json;charset=utf-8'));
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// 线下环境不用开启curl证书验证, 未调通情况可尝试添加该代码
curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
function sendNotice($title,$text){
//今天设置过菜单
$webhook = "https://oapi.dingtalk.com/robot/send?access_token=1a9389969a7b6decc779c86c0969c23cfd7c3d4bf02fe3bb78da348fb526e227";
$data = array(
'msgtype'=>'actionCard',
'actionCard'=>array(
'title'=>$title,
"text"=> $text,
'hideAvatar'=>'0',
'btnOrientation'=>'0',
'btns' => array(
array(
'title'=>'查看详情',
'actionURL'=>'http://10.0.0.5/leguevent/',
)
)
),
"at"=>array(
"isAtAll"=>true
)
);
$data_string = json_encode($data);
$result = request_by_curl($webhook, $data_string);
}
function getOneEvent($id){
$rs = DB::getOne("select * from calendar where id='{$id}'");
return $rs;
}
$user = SESS::get('EVENTUserInfo'); $user = SESS::get('EVENTUserInfo');
// if(isn($user))exit(); // if(isn($user))exit();
$user = json_decode($user, true); $user = json_decode($user, true);
@ -27,6 +78,8 @@ function fix2($v)
return substr($x, -2); return substr($x, -2);
} }
//we(getOneEvent(7442));
$act = r('act'); $act = r('act');
$type = r('type'); $type = r('type');
if ($act == 'newevent') { if ($act == 'newevent') {
@ -37,6 +90,11 @@ if ($act == 'newevent') {
} }
$sql = DB::insert('calendar', $dict); $sql = DB::insert('calendar', $dict);
DB::exe($sql); DB::exe($sql);
if($dict['event'] == '上线'){
sendNotice('Event新增了上线节点',"**Event新增了上线节点**\n\n{$dict['game']}{$dict['title']}\n\n时间:{$dict['start']}");
}
we('1'); we('1');
} else if ($act == 'edityunying') { } else if ($act == 'edityunying') {
$id = r('id'); $id = r('id');
@ -49,6 +107,12 @@ if ($act == 'newevent') {
$sql = DB::update('calendar', $dict, "id='{$id}'"); $sql = DB::update('calendar', $dict, "id='{$id}'");
DB::exe($sql); DB::exe($sql);
$info = getOneEvent($id);
if($info['event'] == '上线'){
sendNotice('Event上线节点',"**Event上线节点信息补充**\n\n{$info['game']}{$info['title']}\n\n时间:{$info['start']}\n\n{$data_array['msg']}");
}
we('1'); we('1');
} else if ($act == 'edityanfa') { } else if ($act == 'edityanfa') {
$id = r('id'); $id = r('id');

1
uploader/.gitignore vendored
View File

@ -0,0 +1 @@