Ken před 3 dny
rodič
revize
8e412c6f64

+ 1 - 1
app/Http/Controllers/admin/ActivityUser.php

@@ -29,7 +29,7 @@ class ActivityUser extends Controller
                 'id' => ['required', 'integer', 'min:1'],
             ]);
             $id = request()->input('id');
-            $params['action'] = request()->action;
+            $params['action'] = request()->route()->getActionName();
             $amount = request()->input('amount');
             $remark = request()->input('remark');
             $changeType = request()->input('change_type');

+ 4 - 4
app/Http/Controllers/api/ActivityReward.php

@@ -32,10 +32,10 @@ class ActivityReward extends BaseController
                 'ip' => request()->ip(),
                 'action' => request()->route()->getActionName(),
             ];
-//            $key = 'api_request_' . md5(json_encode($keys));
-//            if (Cache::has($key)) throw new Exception("请求太频繁,请稍后再试。", HttpStatus::CUSTOM_ERROR);
-//            Cache::put($key, true, 60);
-//            $code = SmsService::sendPhoneCode($params['phone']);
+            $key = 'api_request_' . md5(json_encode($keys));
+            if (Cache::has($key)) throw new Exception("请求太频繁,请稍后再试。", HttpStatus::CUSTOM_ERROR);
+            Cache::put($key, true, 60);
+            $code = SmsService::sendPhoneCode($params['phone']);
 
 
         } catch (ValidationException $e) {