$b = new Zx_artkey(); $hot_art = $b->select1(); $redis->set('hot_art', $hot_art); $artwhere = ' where hosp_type=2 and displayorder>=0 and (hosp_state=0 or hosp_state=1)'; $jdtjhosp = lists(10, $artwhere, 'RAND(NOW())', 'ID,Name,shortname', 20, 0); $redis->set('jdtjhosp', $jdtjhosp); $artwhere = " where main_sectionid=2 and imagefile<>''"; $roundnum = Allcount($artwhere, 'id'); $docnum = mt_rand(0, $roundnum - 3); $jdtjdoc = listss(3, $docnum, $artwhere, '', 'id,name,imagefile', 50, 0); $redis->set('jdtjdoc', $jdtjdoc); $artwhere = ' where art_isshow=1 and art_istop=1'; $art = new Zx_art();//article表 $arttj=$art->one_list($artwhere,'','art_classid,aid,art_typeid,art_classname,art_typename,art_title,art_picurl,art_desc',90,90); $redis->set('arttj', $arttj); 优化下