Box.php 673 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace app\api\controller;
  3. use app\common\controller\Api;
  4. /**
  5. * 盲盒接口
  6. */
  7. class Box extends Api
  8. {
  9. protected $noNeedLogin = ['*'];
  10. protected $noNeedRight = ['*'];
  11. /**
  12. * 获取盲盒底部图片
  13. */
  14. public function getFootImages(){
  15. $list = db('box')->where('switch','1')->where('box_foot_images','neq','')->column('box_foot_images');
  16. $arr = [];
  17. foreach ($list as $v){
  18. if (strstr($v,',')) {
  19. $arr = array_merge($arr,explode(',',$v));
  20. } else {
  21. $arr[] = $v;
  22. }
  23. }
  24. $this->success('查询成功',$arr);
  25. }
  26. }