Ver Fonte

1,列表图片修改

cloud há 1 mês atrás
pai
commit
9fc8203b32
1 ficheiros alterados com 3 adições e 0 exclusões
  1. 3 0
      application/api/controller/Index.php

+ 3 - 0
application/api/controller/Index.php

@@ -49,6 +49,9 @@ class Index extends Api
             }
         });
         $list = $query->order("id","desc")->paginate(['page'=>$page,'list_rows'=>$limit]);
+        foreach ($list as $k=>$v){
+            $list[$k]['image'] = 'https://' . $this->request->host() .$v['image'];
+        }
         $this->success("ok", $list);
     }