Skip to content

Commit 2b5a7e1

Browse files
committed
update 260122
1 parent b63bae3 commit 2b5a7e1

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

app/dev/index.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,14 @@
2121
/**
2222
* 接收官方消息
2323
*/
24-
$app->Runin("message",explode("|",UTInc::Auth($config["UTCODE"],$config["UTFURL"],"message")));
24+
$webmsg=UTF_ROOT."/log/usualtool.log";
25+
$msgdata=file_exists($webmsg) ? json_decode(file_get_contents($webmsg),true) : null;
26+
if(!$msgdata || time()-strtotime($msgdata["time"])>86400):
27+
$msg=UTInc::Auth($config["UTCODE"],$config["UTFURL"],"message");
28+
file_put_contents($webmsg, json_encode(["time"=>date("Y-m-d"),"message"=>$msg],JSON_UNESCAPED_UNICODE));
29+
else:
30+
$app->Runin("message", explode("|", $msgdata["message"]));
31+
endif;
2532
/**
2633
* 写入底层模块
2734
* 除开UT-FRAME公共模块

0 commit comments

Comments
 (0)