ProposalModel.php 512 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace app\common\model;
  3. use think\Cache;
  4. use think\Model;
  5. /**
  6. * 地区数据模型
  7. */
  8. class ProposalModel extends Model
  9. {
  10. protected $name = 'proposal_type';
  11. public function getImageAttr($value)
  12. {
  13. return config('site.httpurl').$value;
  14. }
  15. public function getIconImageAttr($value)
  16. {
  17. return config('site.httpurl').$value;
  18. }
  19. public function getContentAttr($value)
  20. {
  21. return str_replace('src="','src="'.config('site.httpurl'),$value);
  22. }
  23. }