优化上传组件

This commit is contained in:
2020-04-18 09:58:51 +08:00
parent 09c0c3cc59
commit 37a972592d
4 changed files with 36 additions and 18 deletions

20
app/model/Attach.php Normal file
View File

@@ -0,0 +1,20 @@
<?php
// +----------------------------------------------------------------------
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.tensent.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
// +----------------------------------------------------------------------
namespace app\model;
/**
* 附件模型
*/
class Attach extends \think\Model {
protected function getUrlAttr($value, $data){
return $value ? $value : $data['path'];
}
}