Commit a7043aa3 authored by hujun's avatar hujun

路径修改

parent bf4ff07f
......@@ -74,7 +74,13 @@ class JournalAccounts extends Model
$img = Db::table('houseimgs')->field('imagename')
->where('house_id', $value['house_id'])->where('imgtype',1)->find();
$data[$key]['img'] = $_SERVER['SERVER_NAME'].'/houseImg/'.$img['imagename'];
if ($img['imagename']) {
$data[$key]['img'] = $_SERVER['SERVER_NAME'].'/houseImg/'.$img['imagename'];
} else {
$data[$key]['img'] = $_SERVER['SERVER_NAME'].'/resource/image/pzz_.jpg';
}
}
return $data;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment