dlh_test_server/app/common/model/BusinessSchoolFile.php
2024-09-23 16:01:50 +08:00

19 lines
422 B
PHP

<?php
namespace app\common\model;
use app\common\basics\Models;
use app\common\server\UrlServer;
use think\facade\Config;
class BusinessSchoolFile extends Models
{
public function getSrcAttr($value, $data)
{
if ($data['type'] == 1) {
return UrlServer::getFileUrl($value);
} else if ($data['type'] == 2) {
return Config::get('aliyunoss.domain') . $value;
}
}
}