19 lines
422 B
PHP
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;
|
|
}
|
|
}
|
|
} |