zhangchangchun 6 vuotta sitten
vanhempi
commit
4c0ba59ea5

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

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

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

@@ -100,7 +100,7 @@ class ShopController extends Controller {
         $resource->setPaginator(new IlluminatePaginatorAdapter($shops));
         $data = $fractal->createData($resource)->toArray();
         $data['extra']['filters'] = ['shop_name','status'];
-        $data['extra']['columns'] = ['shop_id','mobile','province_name','city_name','product_count','proportion','status'];
+        $data['extra']['columns'] = ['shop_id','shop_name','mobile','province_name','city_name','product_count','proportion','status'];
         return $data;
     }
     /**