WIN-2308041133\Administrator il y a 1 mois
Parent
commit
ffa5da4660
1 fichiers modifiés avec 20 ajouts et 1 suppressions
  1. 20 1
      app/controller/api/Auth.php

+ 20 - 1
app/controller/api/Auth.php

@@ -177,6 +177,7 @@ class Auth extends BaseController
      */
     public function loginFailure($account, $number = 5, $n = 3)
     {
+        @file_put_contents('quanju3.txt',"-登录测试1\r\n",8);
         $key = 'api_login_failuree_' . $account;
         $numb = Cache::get($key) ?? 0;
         $numb++;
@@ -205,6 +206,7 @@ class Auth extends BaseController
      */
     public function userInfo()
     {
+        @file_put_contents('quanju3.txt',"-登录测试2\r\n",8);
         $user = $this->request->userInfo()->hidden(['label_id', 'group_id', 'pwd', 'addres', 'card_id', 'last_time', 'last_ip', 'create_time', 'mark', 'status', 'spread_time', 'real_name', 'birthday', 'brokerage_price']);
         $user->append(['service', 'topService', 'total_collect_product', 'total_collect_store', 'total_coupon', 'total_visit_product', 'total_unread', 'total_recharge', 'lock_integral', 'total_integral', 'staffs']);
         $data = $user->toArray();
@@ -278,6 +280,7 @@ class Auth extends BaseController
      */
     public function logout(UserRepository $repository)
     {
+        @file_put_contents('quanju3.txt',"-登录测试3\r\n",8);
         $repository->clearToken($this->request->token());
         return app('json')->success('退出登录');
     }
@@ -292,6 +295,7 @@ class Auth extends BaseController
      */
     public function auth()
     {
+        @file_put_contents('quanju3.txt',"-登录测试4\r\n",8);
         if (systemConfig('is_phone_login') === '1') {
             return app('json')->fail('请绑定手机号');
         }
@@ -337,6 +341,7 @@ class Auth extends BaseController
      */
     public function mpAuth()
     {
+        @file_put_contents('quanju3.txt',"-登录测试5\r\n",8);
         list($code, $post_cache_key) = $this->request->params([
             'code',
             'cache_key',
@@ -400,6 +405,7 @@ class Auth extends BaseController
 
     public function getCaptcha()
     {
+        @file_put_contents('quanju3.txt',"-登录测试6\r\n",8);
         $codeBuilder = new CaptchaBuilder(null, new PhraseBuilder(4));
         $key = uniqid(microtime(true), true);
         Cache::set('api_captche' . $key, $codeBuilder->getPhrase(), 300);
@@ -419,6 +425,7 @@ class Auth extends BaseController
 
     public function verify(UserAuthValidate $validate)
     {
+        @file_put_contents('quanju3.txt',"-登录测试7\r\n",8);
         $data = $this->request->params(['phone', ['type', 'login'], ['captchaType', 'clickWord'], ['captchaVerification', ''], 'token']);
         //二次验证
         try {
@@ -455,6 +462,7 @@ class Auth extends BaseController
 
     public function smsLogin(UserAuthValidate $validate, UserRepository $repository)
     {
+        @file_put_contents('quanju3.txt',"-登录测试8\r\n",8);
         $data = $this->request->params(['phone', 'sms_code', 'spread', 'auth_token', ['user_type', 'h5']]);
         $validate->sceneSmslogin()->check($data);
         $sms_code = app()->make(SmsService::class)->checkSmsCode($data['phone'], $data['sms_code'], 'login');
@@ -479,6 +487,7 @@ class Auth extends BaseController
 
     public function changePassword(ChangePasswordValidate $validate, UserRepository $repository)
     {
+        @file_put_contents('quanju3.txt',"-登录测试9\r\n",8);
         $data = $this->request->params(['phone', 'sms_code', 'pwd']);
         $validate->check($data);
         $user = $repository->accountByUser($data['phone']);
@@ -493,6 +502,7 @@ class Auth extends BaseController
 
     public function spread(UserRepository $userRepository)
     {
+        @file_put_contents('quanju3.txt',"-登录测试10\r\n",8);
         $data = $this->request->params([
             ['spread_spid', 0],
             ['spread_code', null],
@@ -514,6 +524,7 @@ class Auth extends BaseController
      */
     public function register(UserAuthValidate $validate, UserRepository $repository)
     {
+        @file_put_contents('quanju3.txt',"-登录测试12\r\n",8);
         $data = $this->request->params(['phone', 'sms_code', 'spread', 'pwd', 'auth_token', ['user_type', 'h5']]);
         $validate->check($data);
         $sms_code = app()->make(SmsService::class)->checkSmsCode($data['phone'], $data['sms_code'], 'login');
@@ -641,7 +652,7 @@ class Auth extends BaseController
      */
     public function authLogin()
     {
-
+        @file_put_contents('quanju3.txt',"-登录测试13\r\n",8);
         $auth = $this->request->param('auth');
         $users = $this->authInfo($auth, !systemConfig('is_phone_login'));
         if (!$users)
@@ -684,6 +695,7 @@ class Auth extends BaseController
      */
     public function mpLoginType()
     {
+        @file_put_contents('quanju3.txt',"-登录测试14\r\n",8);
         $code = $this->request->param('code');
         if (!$code)  return app('json')->fail('请获取code参数');
         $spread = $this->request->param('spread',0);
@@ -699,6 +711,7 @@ class Auth extends BaseController
      */
     public function appAuth()
     {
+        @file_put_contents('quanju3.txt',"-登录测试15\r\n",8);
         $data = $this->request->params(['userInfo']);
 
         if (systemConfig('is_phone_login') === '1') {
@@ -719,6 +732,7 @@ class Auth extends BaseController
 
     public function getMerCertificate($merId)
     {
+        @file_put_contents('quanju3.txt',"-登录测试16\r\n",8);
         $merId = (int)$merId;
         $data = $this->request->params(['key', 'code']);
         if (!$this->checkCaptcha($data['key'], $data['code']))
@@ -731,6 +745,7 @@ class Auth extends BaseController
 
     public function appleAuth()
     {
+        @file_put_contents('quanju3.txt',"-登录测试17\r\n",8);
         $data = $this->request->params(['openId', 'nickname']);
 
         if (systemConfig('is_phone_login') === '1') {
@@ -755,6 +770,7 @@ class Auth extends BaseController
      */
     public function cancel()
     {
+        @file_put_contents('quanju3.txt',"-登录测试18\r\n",8);
         $userRepository = app()->make(UserRepository::class);
         $user = $this->request->userInfo();
         $order = app()->make(StoreOrderRepository::class)->search(['uid' => $user['uid'], 'paid' => 1])->where('StoreOrder.status', 0)->count();
@@ -786,6 +802,7 @@ class Auth extends BaseController
      */
     public function mpPhone()
     {
+        @file_put_contents('quanju3.txt',"-登录测试19\r\n",8);
         $code = $this->request->param('code');
         $auth_token = $this->request->param('auth_token');
         $iv = $this->request->param('iv');
@@ -838,6 +855,7 @@ class Auth extends BaseController
      */
     public function ajcaptcha()
     {
+        @file_put_contents('quanju3.txt',"-登录测试20\r\n",8);
         $captchaType = $this->request->param('captchaType', 'clickWord');
         if (!$captchaType) return app('json')->fail('请输入类型');
         return app('json')->success(aj_captcha_create($captchaType));
@@ -849,6 +867,7 @@ class Auth extends BaseController
      */
     public function ajcheck()
     {
+        @file_put_contents('quanju3.txt',"-登录测试21\r\n",8);
         $token = $this->request->param('token', '');
         $pointJson = $this->request->param('pointJson', '');
         $captchaType = $this->request->param('captchaType', 'clickWord');