浏览代码

Merge branch 'develop' of http://git.caihongxingqiu.net/rainbow/shop-manage into develop

zhangchangchun 6 年之前
父节点
当前提交
6373794851
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 0
      app/Console/Commands/apollo.php
  2. 1 1
      app/Http/Controllers/V1/AuthController.php

+ 1 - 0
app/Console/Commands/apollo.php

@@ -80,6 +80,7 @@ class Apollo extends Command
             if ($error) {
                 Log::info("Apollo Hand error :" . $error);
             }
+            sleep(60);
         } while ($error && $restart);
     }
 }

+ 1 - 1
app/Http/Controllers/V1/AuthController.php

@@ -64,7 +64,7 @@ class AuthController extends Controller {
             return $this->response->error('登陆失败', 500);
         }else{
             $shopAccount = Auth::user();
-            $factory = JWTFactory::customClaims(['shop'=>['uid'=>$shopAccount->id,'username'=>$shopAccount->account,'shop_id'=>$shopAccount->shop_id,'sign'=>md5($shopAccount->id).env('JWT_SECRET')],'type'=>2]);
+            $factory = JWTFactory::customClaims(['shop'=>['uid'=>$shopAccount->id,'username'=>$shopAccount->account,'shop_id'=>$shopAccount->shop_id,'sign'=>md5($shopAccount->id).config('customer.jwt_secret')],'type'=>2]);
             $payload = $factory->make();
             $token = JWTAuth::encode($payload);
             $shopAccount->token = $token;