🍄蘑菇丁自动签到|打卡组件
交流群 ID: 253228619
PHP 需要 8.0 或以上版本
composer require laradocs/moguding
composer update laradocs/moguding
use Laradocs\Moguding\Moguding;
use Laradocs\Moguding\Params\LoginParam;
use Laradocs\Moguding\Params\Login;
$moguding = new Moguding();
$user = $mogiding->getUserProfile(new LoginParam(
new Login('操作系统(android/ios)', '手机号码', '密码')
));
var_dump($user); // 见 返回示例
返回示例(重要数据):
[
"token" => 'xxxxxx',
"userId" => '用户ID',
"userType" => 'student',
.
.
.
]
use Laradocs\Moguding\Moguding;
use Laradocs\Moguding\Params\UserParam;
use Laradocs\Moguding\Params\User;
$moguding = new Moguding();
$plans = $moguding->getPlanList(new UserParam(
new User($user['token'], $user['userId'], $user['userType'])
));
var_dump($plans); // 见 返回示例
返回示例(重要数据):
[
[
"planId" => "xxxxxx",
.
.
.
]
]
📍 不知道自己所在的经纬度点击👉 经纬度查询 - 坐标拾取系统
use Laradocs\Moguding\Moguding;
use Laradocs\Moguding\Params\SaveParam;
use Laradocs\Moguding\Params\Save;
use Laradocs\Moguding\Params\User;
use Laradocs\Moguding\Params\Address;
$moguding = new Moguding();
$save = $moguding->getSaveInfo(new SaveParam(
new Save(
new User($user['token'], $user['userId'], $user['userType']),
new Address('所在省份', '所在城市(直辖市的同学传 null 就行)', '详细地址', '经度', '纬度', '所在国家(默认:**)'),
$plans[0]['planId'],
'操作系统(android/ios)',
'打卡类型(START/END)', // START: 上班 END: 下班
'备注(非必填)'
)
))
var_dump($save); // 见 返回示例
返回示例(重要数据):
[
"createTime" => "2022-01-15 07:08:49",
"attendanceId" => "xxxxxxxxxxxxxxxxxxx",
.
.
.
]
在使用此功能之前,你需要去 Server 酱 注册账号,然后获取 SendKey。
use Laradocs\Moguding\Plugins\ServerChan;
$message = new ServerChan('SendKey');
$message->title('推送标题') // 必须
->desp('推送正文') // 非必须
->channel(['推送通道']) // 非必须
->send(); // 发送通知
如果您想参与此项目,请点击右上角的 Fork
按钮,我们共同维护此项目。
Many thanks to Jetbrains for kindly providing a license for me to work on this and other open-source projects.