Browse Source

固定图片路径,以后需修改(测试)

master
suiyi-effer 2 years ago
parent
commit
19ea8e69b1
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      app/services/system/attachment/SystemAttachmentServices.php

+ 1
- 0
app/services/system/attachment/SystemAttachmentServices.php View File

[$page, $limit] = $this->getPageValue(); [$page, $limit] = $this->getPageValue();
$list = $this->dao->getList($where, $page, $limit); $list = $this->dao->getList($where, $page, $limit);
$site_url = sys_config('site_url'); $site_url = sys_config('site_url');
$site_url='http://192.168.1.120:3302';
foreach ($list as &$item) { foreach ($list as &$item) {
if ($site_url) { if ($site_url) {
$item['satt_dir'] = (strpos($item['satt_dir'], $site_url) !== false || strstr($item['satt_dir'], 'http') !== false) ? $item['satt_dir'] : $site_url . $item['satt_dir']; $item['satt_dir'] = (strpos($item['satt_dir'], $site_url) !== false || strstr($item['satt_dir'], 'http') !== false) ? $item['satt_dir'] : $site_url . $item['satt_dir'];

Loading…
Cancel
Save