laowu 2 недель назад
Родитель
Сommit
14aeda344f

+ 1 - 1
app/Http/Controllers/Game/LoginController.php

@@ -88,7 +88,7 @@ class LoginController extends Controller
             return apiReturnFail(['web.verify.code_incorrect_or_expired', 'O código está incorreto ou o tempo passou']);
         }
         if($onlyVerify)return true;
-
+        GamePhoneVerityCode::clearPhoneCode($Phone);
         $config = RouteService::getChannelConfig($request);
         $user = GlobalUserInfo::query()->where('RegionID', $config->isRegionUnique())->where("Phone", $Phone)->first();
         if ($user) {

+ 7 - 0
app/Models/GamePhoneVerityCode.php

@@ -92,4 +92,11 @@ class GamePhoneVerityCode extends Model
             return $first->Code;
         }
     }
+
+    public static function clearPhoneCode($phone)
+    {
+        DB::connection('write')->table('QPTreasureDB.dbo.GamePhoneVerityCode')
+            ->where('PhoneNum', $phone)
+            ->update(['Code' => '']);
+    }
 }