Ken 1 day ago
parent
commit
5bdcb1f83b
1 changed files with 19 additions and 12 deletions
  1. 19 12
      app/Services/BetService.php

+ 19 - 12
app/Services/BetService.php

@@ -355,13 +355,17 @@ class BetService extends BaseService
         $lastStr = self::hideMiddleDigits($userInfo->member_id, 4);
 
         $issueNo = $issueInfo->issue_no;
+
+        $lang = App::getLocale();
+        $group_language = Config::where('field', 'group_language')->first()->val;
+        App::setLocale($group_language);
         $groupText = lang("会员下注") . " 【" . $lastStr . "】 \n";
         $groupText .= lang('下注期数') . ":{$issueInfo->issue_no} \n";
         $groupText .= lang("下注内容") . ": \n";
         $groupText .= "----------- \n";
         $groupText .= "{$keywords}{$amount} \n";
         $groupText .= "----------- \n";
-
+        App::setLocale($lang);
 
         $inlineButton = self::getOperateButton();
 
@@ -462,13 +466,16 @@ class BetService extends BaseService
                             $fake_bet_list[] = $item;
 
                             $lastStr = self::hideMiddleDigits($item['member_id'], 4);
-                            $groupText = "会员下注 【" . $lastStr . "】 \n";
-                            $groupText .= "下注期数:{$issueInfo->issue_no} \n";
-                            $groupText .= "下注内容: \n";
+                            $lang = App::getLocale();
+                            $group_language = Config::where('field', 'group_language')->first()->val;
+                            App::setLocale($group_language);
+                            $groupText = lang('会员下注') . " 【" . $lastStr . "】 \n";
+                            $groupText .= lang('下注期数') . ":{$issueInfo->issue_no} \n";
+                            $groupText .= lang('下注内容') . ": \n";
                             $groupText .= "----------- \n";
                             $groupText .= "{$input} \n";
                             $groupText .= "----------- \n";
-
+                            App::setLocale($lang);
 
                             if (strtotime($issueInfo['end_time']) - strtotime($now_date) < 22) {
                                 $fake_bet_count = Cache::get("fake_bet_count_{$issueInfo->issue_no}", 0);
@@ -977,13 +984,13 @@ class BetService extends BaseService
                 $lang = App::getLocale();
                 $group_language = Config::where('field', 'group_language')->first()->val;
                 App::setLocale($group_language);
-                $text .= lang("用户ID").":{$v['lastStr']} \n";
-                $text .= lang("下注类型").":[" . implode(',', $v['keywords']) . "] \n";
-                $text .= lang('中奖类型').":[" . $openKeyword . "] \n";
-                $text .= lang('投注金额').":{$amount} \n";
-                $text .= lang('中奖金额').":{$v['win_amount']} \n";
-                $text .= lang('派彩金额').":{$profit} \n";
-                $text .= lang("盈亏金额").":{$yl} \n";
+                $text .= lang("用户ID") . ":{$v['lastStr']} \n";
+                $text .= lang("下注类型") . ":[" . implode(',', $v['keywords']) . "] \n";
+                $text .= lang('中奖类型') . ":[" . $openKeyword . "] \n";
+                $text .= lang('投注金额') . ":{$amount} \n";
+                $text .= lang('中奖金额') . ":{$v['win_amount']} \n";
+                $text .= lang('派彩金额') . ":{$profit} \n";
+                $text .= lang("盈亏金额") . ":{$yl} \n";
                 $text .= "-------------------------------- \n";
                 App::setLocale($lang);
             }