|
|
@@ -316,20 +316,24 @@ class PcIssueService extends BaseService
|
|
|
$pc28Switch = Config::where('field', 'pc28_switch')->first()->val;
|
|
|
$info->status = PcIssue::STATUS_BETTING;
|
|
|
$info->save();
|
|
|
- $replyInfo = KeyboardService::findOne(['button' => '玩法规则']);
|
|
|
- if ($replyInfo) {
|
|
|
- $text = $replyInfo->reply;
|
|
|
- $buttons = json_decode($replyInfo->buttons, true);
|
|
|
- $image = $replyInfo->image;
|
|
|
- if ($image) {
|
|
|
- $image = url($image);
|
|
|
- }
|
|
|
- if (empty($buttons)) {
|
|
|
- $buttons = self::getOperateButton();
|
|
|
+ $wanFaGuiZeTime = Cache::get("玩法规则推送时间");
|
|
|
+ $now = time();
|
|
|
+ if ($now - $wanFaGuiZeTime > (60 * 15)) {
|
|
|
+ $replyInfo = KeyboardService::findOne(['button' => '玩法规则']);
|
|
|
+ if ($replyInfo) {
|
|
|
+ $text = $replyInfo->reply;
|
|
|
+ $buttons = json_decode($replyInfo->buttons, true);
|
|
|
+ $image = $replyInfo->image;
|
|
|
+ if ($image) {
|
|
|
+ $image = url($image);
|
|
|
+ }
|
|
|
+ if (empty($buttons)) {
|
|
|
+ $buttons = self::getOperateButton();
|
|
|
+ }
|
|
|
+ Cache::put('玩法规则推送时间', time());
|
|
|
+ if ($pc28Switch == 1) self::asyncBettingGroupNotice($text, $buttons, $image);
|
|
|
}
|
|
|
- if ($pc28Switch == 1) self::asyncBettingGroupNotice($text, $buttons, $image);
|
|
|
}
|
|
|
-
|
|
|
$replyInfo = KeyboardService::findOne(['button' => '开始下注']);
|
|
|
if ($replyInfo) {
|
|
|
$text = $replyInfo->reply;
|