naichaduoyibei / moguding-solution Goto Github PK
View Code? Open in Web Editor NEW🍄蘑菇丁/工学云自动签到解决方案,支持 GitHub Actions 部署。
License: MIT License
🍄蘑菇丁/工学云自动签到解决方案,支持 GitHub Actions 部署。
License: MIT License
无法通过 https、ssh 协议克隆 https://github.com/laradocs/php-moguding-sdk.git,中止。
https://github.com/laradocs/php-moguding-sdk.git 克隆到裸仓库 '/home/runner/.cache/composer/vcs/https---github.com-laradocs-php-moguding-sdk.git'...
remote:已于 2021 年 8 月 13 日移除对密码身份验证的支持。
remote:有关当前推荐的身份验证模式的信息,请参阅 https://docs.github.com/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls。
fatal:“https://github.com/laradocs/php-moguding-sdk.git/”身份验证失败
[email protected]:laradocs/php-moguding-sdk.git
克隆到裸仓库“/home/runner/.cache/composer/vcs/https---github.com-laradocs-php-moguding-sdk.git”...
[email protected]:权限被拒绝(公钥)。
fatal:无法从远程存储库读取。
请确保您拥有正确的访问权限
并且存储库存在。
// 使经纬度值偏移
function skew($a){
$num = floatval ($a);
$num += floatval('0.00000'.rand(0,9)); // 添加随机数
$str = strval($num);
// 设置为小数点6位
$dian = explode('.',$str)[1];
$len = 6-strlen($dian);
if(0 != $len){
if(0 > $len){
// 去除多余的小数
$str = str_split($str,strlen($str)+$len)[0];
}else{
// 精度不够,在后面用 0 补位
$str .= implode("0",array_pad([],$len+1,''));
}
}
return $str;
}
// 微调经纬度
$longitude = skew(env('MOGUDING_LONGITUDE', ''));
$latitude = skew(env('MOGUDING_LATITUDE', ''));
Error: Process completed with exit code 1.
还是出现这个重新执行也不管
rt 感谢!
环境:WSL1-Ubuntu20.04
使用Github中的Actions部署也为此错误
Exception
Undefined array key "data"
at app/Console/Commands/MogudingCommand.php:70
66▕ ->getBody()
67▕ ->getContents();
68▕ $user = Json::decode($data)['data'];
69▕ } catch (Exception $e) {
➜ 70▕ throw new Exception($e->getMessage() ?: '请求超时', $e->getCode(), $e);
71▕ }
72▕
73▕ $this->info('登录成功!');
74▕
1 app/Console/Commands/MogudingCommand.php:68
ErrorException::("Undefined array key "data"")
2 app/Console/Commands/MogudingCommand.php:68
Illuminate\Foundation\Bootstrap\HandleExceptions::Illuminate\Foundation\Bootstrap{closure}()
more about: PR#7 failed.
我也是个小白,边百度边写的。
钉钉可用在不运行钉钉的时候发送离线通知,消息比较及时,感觉可用加一下。
<?php
class Push{
// 钉钉-加签
protected static function ding_url($str = ''){
// 钉钉给出的密钥(加签用的)
$secret='xxxxxxxxx'; //要自己添加
// 钉钉给的token
$token='xxxxxxxxx'; //要自己添加
// 获取微秒数时间戳
$Temptime = explode(' ', microtime());
// 转换成毫秒数时间戳
$msectime = (float)sprintf('%.0f', (floatval($Temptime[0]) + floatval($Temptime[1])) * 1000);
// 拼装成待加密字符串
// 格式:毫秒数+"\n"+密钥
$stringToSign=$msectime."\n".$secret;
// 进行加密操作 并输出二进制数据
$sign=hash_hmac('sha256', $stringToSign,$secret,true);
// 加密后进行base64编码 以及url编码
$sign=urlencode(base64_encode($sign));
// 拼接url
$url='https://oapi.dingtalk.com/robot/send?access_token='.$token;
$url.='×tamp='.$msectime; // 拼接时间戳
$url.='&sign='.$sign; // 拼接加密签名
return $url;
}
//发送post请求
protected static function post($url,$arr=[]) {
$data = json_encode($arr);
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-type: application/json"));
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_exec($curl);
curl_close($curl);
}
public static function send_text($text="发送了空白消息"){
$data = [
"text"=> [
"content"=>$text
],
"msgtype" => "text"
];
Push::post(Push::ding_url(),$data);
}
}
如题.
增加server酱,通过微信通知,删除邮件通知
最近几天不管是上班还是下班都没办法自动签到了,是不是被封了?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.