ソースを参照

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

xielin 6 年 前
コミット
c38a2bd819
共有1 個のファイルを変更した1 個の追加2 個の削除を含む
  1. 1 2
      app/Http/Controllers/V1/AuthController.php

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

@@ -59,14 +59,13 @@ class AuthController extends Controller {
         if(!$account){
             return $this->response->error('登录失败,请重试', 500);
         }
-        $token = Auth::attempt(['mobile'=>$request->get('mobile'),'password'=>$request->get('password')]);
+        $token = Auth::attempt(['account'=>$request->get('account'),'password'=>$request->get('password')]);
         if(!$token){
             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).config('customer.jwt_secret')],'type'=>2]);
             $payload = $factory->make();
-
             $token = JWTAuth::encode($payload);
             $shopAccount->token = $token;
             $shopAccount->token_ttl = config('jwt.ttl');