1
0

ActivityMaterial.php 450 B

123456789101112131415161718192021
  1. <?php
  2. namespace app\model;
  3. use think\Model;
  4. class ActivityMaterial extends Model
  5. {
  6. public function getUrlAttr($value)
  7. {
  8. if (empty($value)) return $value;
  9. $ali_oss_bindurl = config('app.ali_oss_bindurl');
  10. $url = 'https://' . $ali_oss_bindurl . '/' . $value;
  11. return $url;
  12. }
  13. public function getAddtimeAttr($value)
  14. {
  15. if (empty($value)) return '';
  16. return date('Y-m-d H:i:s');
  17. }
  18. }