Activity.php 622 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace app\common\model;
  3. use think\Cache;
  4. use think\Model;
  5. /**
  6. * 地区数据模型
  7. */
  8. class Activity extends Model
  9. {
  10. protected $name = 'park_activity';
  11. public function getImageAttr($value)
  12. {
  13. return config('site.httpurl').$value;
  14. }
  15. public function getStartTimeAttr($value)
  16. {
  17. return date('Y-m-d H:i',strtotime($value));;
  18. }
  19. public function getEndTimeAttr($value)
  20. {
  21. return date('Y-m-d H:i',strtotime($value));;
  22. }
  23. public function getContentAttr($value)
  24. {
  25. return str_replace('src="','src="'.config('site.httpurl'),$value);
  26. }
  27. }