xiaogang 4 gadi atpakaļ
vecāks
revīzija
efccfc1de7
1 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  1. 4 0
      app/Http/Controllers/Api/UserController.php

+ 4 - 0
app/Http/Controllers/Api/UserController.php

xqd
@@ -229,6 +229,10 @@ class UserController extends Controller
         try {
             $res['list'] = VipModel::query()->orderBy('id','asc')->get();
             $res['rights'] = json_decode(VipConfig::query()->where(['id'=>2])->value('rights'),true);
+            $config = config("filesystems.disks.oss");
+            foreach ($res['rights'] as $k=>$v){
+                $res['rights'][$k]['img_url'] = "https://".$config['bucket'].'.'.$config['endpoint'].'/'.$v['img_url'];
+            }
         }catch (\Exception $exception){
             return $this->response->errorForbidden($exception->getMessage());
         }