修改接口类
This commit is contained in:
+3
-2
@@ -260,9 +260,10 @@ function get_attach($id, $field = false, $is_list = false) {
|
||||
} else {
|
||||
$map[] = ['id', '=', $id];
|
||||
$picture = \app\model\Attach::where($map)->find();
|
||||
$picture['url'] = $basePath . $picture['url'];
|
||||
if ($field == 'path') {
|
||||
if (!empty($picture['url'])) {
|
||||
$picture['path'] = $picture['url'] ? $basePath . $picture['url'] : $basePath . '/static/common/images/default.png';
|
||||
if ($picture['path'] == '') {
|
||||
$picture['path'] = $picture['url'] ? $picture['url'] : $basePath . '/static/common/images/default.png';
|
||||
} else {
|
||||
$picture['path'] = $picture['path'] ? $basePath . $picture['path'] : $basePath . '/static/common/images/default.png';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user