'引导页', // 2 => '启动页', 3 => '首页轮播图', 4 => '工会', 5 => '帮助反馈' ]; //1纯展示 2文章 3房间 4个人主页 5外站' public $Type = [ 1 => '纯展示', 2 => '文章', 3 => '房间', 4 => '个人主页', 5 => '外站' ]; //l轮播广告位 public function banner_list($type) { $map = [ 'show_status' => 1, 'delete_time' => 0, 'show_type' => $type, ]; $list = db::name('vs_banner')->where($map)->field('bid,aid,type,show_type,image')->order('sort desc')->select(); foreach ($list as $k => &$v) { $v['url'] =""; if ($v['type'] == 2) { $v['image'] = localpath_to_netpath($v['image']); if($v['url']){ $v['url'] = $v['url']; }else{ $v['url'] = get_system_config_value('web_site').'/api/Banner/banner_content_show?id='.$v['bid']; } }elseif ($v['type'] == 3) { $room_info = Db::name('vs_room')->where('rid', $v['aid'])->where('delete_time',0)->find(); $v['image'] = localpath_to_netpath($room_info['room_cover']); }elseif ($v['type'] == 4) { $v['image'] = localpath_to_netpath($v['image']); }elseif ($v['type'] == 5) { $v['image'] = localpath_to_netpath($v['image']); $v['url'] = $v['url']; } } return $list; } }