bianjunhui 1 неделя назад
Родитель
Сommit
51f8e60410
1 измененных файлов с 8 добавлено и 2 удалено
  1. 8 2
      application/api/controller/Index.php

+ 8 - 2
application/api/controller/Index.php

@@ -34,10 +34,16 @@ class Index extends Api
         $where['fid']=$list['id'];
         $where['status']='normal';
         $domain2 = $this->request->domain();
-        $list['image']=$domain2.$list['image'];
+        if($list['image']){
+            $list['image']=$domain2.$list['image'];
+        }
+
         $list['details']=Db::name('functional_del')->where($where)->select();
         foreach ($list['details'] as $k=>$v){
-            $list['details'][$k]['image']=$domain2.$v['image'];
+            if($v['image']){
+                $list['details'][$k]['image']=$domain2.$v['image'];
+            }
+
         }
         $this->success('请求成功',$list);
     }