后台文件修改,修复搜索时分页链接会没有参数的情况

This commit is contained in:
2018-04-01 15:45:10 +08:00
parent fd6bbb7451
commit b97da3e1ac
17 changed files with 112 additions and 43 deletions

View File

@@ -254,9 +254,9 @@ function get_cover($cover_id, $field = null) {
$picture = db('Picture')->where(array('status' => 1, 'id' => $cover_id))->find();
if ($field == 'path') {
if (!empty($picture['url'])) {
$picture['path'] = $picture['url'] ? BASE_PATH . $picture['url'] : BASE_PATH . '/public/images/default.png';
$picture['path'] = $picture['url'] ? BASE_PATH . $picture['url'] : BASE_PATH . '/static/images/default.png';
} else {
$picture['path'] = $picture['path'] ? BASE_PATH . $picture['path'] : BASE_PATH . '/public/images/default.png';
$picture['path'] = $picture['path'] ? BASE_PATH . $picture['path'] : BASE_PATH . '/static/images/default.png';
}
}
return empty($field) ? $picture : $picture[$field];