Ken 2 hari lalu
induk
melakukan
f0ff873f67
2 mengubah file dengan 14 tambahan dan 4 penghapusan
  1. 13 3
      app/Services/ActivityRewardService.php
  2. 1 1
      app/Services/KeyboardService.php

+ 13 - 3
app/Services/ActivityRewardService.php

@@ -5,6 +5,7 @@ namespace App\Services;
 use App\Constants\HttpStatus;
 use App\Constants\Util;
 use App\Models\ActivityReward;
+use App\Models\Config;
 use App\Models\Role;
 use Exception;
 
@@ -99,9 +100,18 @@ class ActivityRewardService extends BaseService
     }
 
 
-    public static function promotionalActivity(): array
+    public static function promotionalActivity($chatId): array
     {
-
-        return [];
+        $keyboard = [];
+        $url = Config::where('field','activity_home_url ')->first()->val;
+        $keyboard[] = [
+            ['text'=>'活动首页','url'=>$url]
+        ];
+        $msg = [];
+        $msg['chat_id'] = $chatId;
+        $msg['text'] = "点击下方按钮进入活动首页";
+        $msg['reply_markup'] = json_encode(['inline_keyboard' => $keyboard]);
+
+        return $msg;
     }
 }

+ 1 - 1
app/Services/KeyboardService.php

@@ -203,7 +203,7 @@ class KeyboardService extends BaseService
             case "":
                 // 删除个人缓存
                 Util::delCache($chatId);
-                return ActivityRewardService::promotionalActivity();
+                return ActivityRewardService::promotionalActivity($chatId);
             case 'recentBets': // 近期注单
                 // 删除个人缓存
                 Util::delCache($chatId);