laowu 5 giorni fa
parent
commit
a775e9297c
1 ha cambiato i file con 15 aggiunte e 1 eliminazioni
  1. 15 1
      app/Http/Controllers/Game/WithDrawInfoController.php

+ 15 - 1
app/Http/Controllers/Game/WithDrawInfoController.php

@@ -138,6 +138,17 @@ class WithDrawInfoController
             ->where('State', 2)
             ->exists();
         $retval['has_success_withdraw'] = $hasSuccessWithdraw;
+
+        
+        if (Redis::exists('withdraw_info_time_' . $UserID)) {
+            $lastTime = Redis::get('withdraw_info_time_' . $UserID);
+            $retval['withdraw_info_update_by_phone'] = true;
+            $retval['withdraw_info_update_time_pass'] = time() - $lastTime;
+        } else {
+            $retval['withdraw_info_update_by_phone'] = false;
+            $retval['withdraw_info_update_time_pass'] = 0;
+        }
+        
         return apiReturnSuc($retval);
     }
     public function GoWithDraw(Request $request)
@@ -568,7 +579,6 @@ class WithDrawInfoController
             }
 
             $phone = DB::table(TableName::QPAccountsDB() . 'AccountPhone')->where('UserID', $UserID)->value('PhoneNum');
-            $phone = trim(env('COUNTRY_CODE',1) . $phone);
             if (empty($phone)) {
                 return apiReturnFail(['web.verify.phone_not_bound', 'Phone number not bound']);
             }
@@ -579,6 +589,10 @@ class WithDrawInfoController
             }
             // 验证通过,清除验证码
             \App\Models\GamePhoneVerityCode::clearPhoneCode($phone);
+            // 设置标识,下次修改时弹窗
+            Redis::setex('withdraw_info_time_' . $UserID, 30 * 24 * 3600, time());
+        } else {
+            Redis::del('withdraw_info_time_' . $UserID);
         }
 
 //        $UserID = (int)$request->globalUser->UserID;//$request->input('UserID');