$where = [];
$table = [];$i = 0;$firstable='';
foreach($tableArr as $key => $val){
if($i==0) $firstable = $key;
else $table[] = Db::name($key)->field('id,"'.$key.'" as site')->where($where)->buildSql();
$i++;
}
$list = Db::name($firstable)->field('id,"'.$firstable.'" as site')->where($where)->union($table)->order('id desc')->limit(10)->select();