LotteryActivityGoods.php 560 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace app\model;
  3. use think\Model;
  4. class LotteryActivityGoods extends Model
  5. {
  6. /**
  7. * 图片拼接
  8. */
  9. public function getGoodImgAttr($value)
  10. {
  11. if (empty($value)) return $value;
  12. $ali_oss_bindurl = config('app.ali_oss_bindurl');
  13. $url = 'http://' . $ali_oss_bindurl . '/' . $value;
  14. return $url;
  15. }
  16. /*public function setGoodImgAttr($value)
  17. {
  18. $ali_oss_bindurl = config('app.ali_oss_bindurl');
  19. $url = str_replace($ali_oss_bindurl,'',$value);
  20. return $url;
  21. }*/
  22. }