1234567891011121314151617181920212223242526272829303132 |
- <?php
- namespace app\common\model;
- use think\Cache;
- use think\Model;
- /**
- * 地区数据模型
- */
- class Activity extends Model
- {
- protected $name = 'park_activity';
- public function getImageAttr($value)
- {
- return config('site.httpurl').$value;
- }
- public function getStartTimeAttr($value)
- {
- return date('Y-m-d H:i',strtotime($value));;
- }
- public function getEndTimeAttr($value)
- {
- return date('Y-m-d H:i',strtotime($value));;
- }
- public function getContentAttr($value)
- {
- return str_replace('src="','src="'.config('site.httpurl'),$value);
- }
- }
|