import{r as c,bv as ae,_ as ne,U as oe,ak as le,u as ie,c as l,a as e,b as i,w as p,q as L,g as o,F as v,s as g,I as ce,x as $,X as re,H as _e,aF as de,D as ue,a3 as pe,o as n,h as N,y as W,v as P,t as d,p as ve,d as D,O as he,aE as me,N as ge,a0 as ye,a7 as fe,a4 as Ce}from"./MO51Zmud.js";import{_ as ke}from"./DNsCrQRt.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{u as be}from"./DC-05UmA.js";import{g as we,a as xe,b as B}from"./BPZV0L7C.js";import{b as X}from"./C8IlHzzW.js";import"./Rnqz9YaS.js";const ze=S=>{const C=c([]),y=c([]),k=c(!1),h=ae({page:0,size:10,total:0});return{tableData:C,loading:k,selectData:y,pageParameter:h,handleCurrentChange:_=>{h.page=_-1,S()},handleSizeChange:_=>{h.size=_,h.page=0,S()},selectionChange:_=>{y.value=_}}},De={class:"information"},Se={class:"context-width"},Ee={class:"advertising_icon"},Ie={class:"info-wrap"},Te={class:"article"},Ve=["onClick"],Le={key:0,class:"line line_first"},$e={key:1,class:"line line_last"},Ne={key:2,class:"line"},Pe={style:{flex:"1"}},Be={class:"article-content"},je=["onClick"],Fe={class:"article-right"},Oe={class:"title"},Ue={class:"sub-title"},Ae={class:"article-right-footer"},He={class:"f-1"},Re={class:"f-1"},qe={class:"pagination"},We={class:"avg-context"},Xe={class:"advertising_icon"},Ge={class:"today-hot"},Je={class:"header"},Ke={class:"content"},Me=["onClick"],Qe={class:"today-hot"},Ye={class:"header like"},Ze={class:"content"},et=["onClick"],tt={__name:"news",async setup(S){let C,y;const k=c({}),h=async()=>{re({code:"home,sfCollege,news"}).then(s=>{k.value={title:s.data.title,meta:[{hid:"keywords",name:"keywords",content:s.data.keywords},{hid:"description",name:"description",content:s.data.description}]}}).catch(s=>{})};be(k);const m=c("2"),E=c([]),I=c([]);h(),we({type:4}).then(a=>{I.value=X(a.result["sf-adv-20"]),E.value=X(a.result["sf-adv-21"])});const _=c([]),j=c(""),b=c(!1),w=async()=>{b.value=!0,B({page:u.page,limit:u.size,get_type:m.value,form_type:2,form_id:j.value}).then(a=>{_.value=a.result.list,u.total=a.result.total,b.value=!1}).catch(()=>{b.value=!1})},{tableData:st,pageParameter:u,handleCurrentChange:G,handleSizeChange:J}=ze(w);[C,y]=oe(()=>w()),await C,y();const x=c(""),f=c([]);xe({form_type:2,is_group:0,form_level:2}).then(a=>{f.value=a.result,w()}),le([()=>m.value,()=>x.value],a=>{var s;j.value=(s=f.value[a[1]])==null?void 0:s.id,u.page=0,w()});const K=()=>{x.value=""},F=c([]);B({page:0,limit:10,get_type:4,form_type:2}).then(a=>{F.value=a.result.list});const O=c([]);B({page:0,limit:10,get_type:3,form_type:2}).then(a=>{O.value=a.result.list});const U=a=>{window.open(a)},M=ie(),T=a=>{M.push("/school/details?id="+a.id)};return(a,s)=>{const A=he,H=_e,V=me,Q=de,Y=Ce,R=ue,Z=ge,z=ke,ee=ye,te=fe,se=pe;return n(),l("div",De,[e("div",null,[e("div",Se,[i(H,{height:"280px",arrow:"never",class:"my-carousel",interval:5e3},{default:p(()=>[(n(!0),l(v,null,g(o(I),t=>(n(),N(A,{key:t.id,onClick:r=>U(t.jump_url)},{default:p(()=>[e("div",{class:"carousel-bg cur-pointer hover_css_bg",style:L({backgroundImage:"url("+t.pic+")"})},null,4),$(e("div",Ee,s[1]||(s[1]=[e("span",null,"广告",-1)]),512),[[W,t.show_ad_tag==1]])]),_:2},1032,["onClick"]))),128))]),_:1})])]),e("div",Ie,[e("div",Te,[e("div",{class:"fixed-left",style:L({height:o(f).length*54+"px"})},[(n(!0),l(v,null,g(o(f),(t,r)=>(n(),l("div",{class:P(["fixed-item",{active:r===o(x)}]),key:t.name,onClick:q=>x.value=r},[r==0?(n(),l("div",Le)):r+1==o(f).length?(n(),l("div",$e)):(n(),l("div",Ne)),s[2]||(s[2]=e("span",{class:"dot"},null,-1)),e("span",null,d(t.name),1)],10,Ve))),128))],4),e("div",Pe,[i(Q,{modelValue:o(m),"onUpdate:modelValue":s[0]||(s[0]=t=>ce(m)?m.value=t:null),class:"demo-tabs",onTabClick:K},{default:p(()=>[i(V,{label:"全部",name:"2"}),i(V,{label:"热门",name:"1"}),i(V,{label:"推荐",name:"7"})]),_:1},8,["modelValue"]),e("div",Be,[i(R,null,{default:p(()=>[o(_).length===0?(n(),N(Y,{key:0})):ve("",!0)]),_:1}),$((n(),l("div",null,[(n(!0),l(v,null,g(o(_),t=>(n(),l(v,{key:t.id},[e("div",{class:"article-item cur-pointer hover_img",onClick:r=>T(t)},[i(Z,{lazy:"",src:t.image,class:"article-img"},null,8,["src"]),e("div",Fe,[e("h2",Oe,d(t.title),1),e("div",Ue,d(t.abstract),1),e("div",Ae,[e("div",He,[i(z,{style:{"vertical-align":"text-bottom"},color:"#9D9D9D",name:"sTime"}),D(" "+d(t.publish_date),1)]),e("div",Re,[i(z,{style:{"vertical-align":"text-bottom"},color:"#9D9D9D",name:"sView"}),D(" "+d(t.view_count),1)])])])],8,je),i(ee)],64))),128))])),[[se,o(b)]]),i(R,null,{default:p(()=>[e("div",qe,[i(te,{background:"",layout:"prev, pager, next","current-page":o(u).page+1,"page-size":o(u).size,total:o(u).total,onSizeChange:o(J),onCurrentChange:o(G)},null,8,["current-page","page-size","total","onSizeChange","onCurrentChange"])])]),_:1})])])]),e("div",We,[i(H,{height:"300px",arrow:"never",class:"my-carousel",interval:5e3},{default:p(()=>[(n(!0),l(v,null,g(o(E),t=>(n(),N(A,{key:t.id,onClick:r=>U(t.jump_url)},{default:p(()=>[e("div",{class:"carousel-bg cur-pointer hover_css_bg",style:L({backgroundImage:"url("+t.pic+")"})},null,4),$(e("div",Xe,s[3]||(s[3]=[e("span",null,"广告",-1)]),512),[[W,t.show_ad_tag==1]])]),_:2},1032,["onClick"]))),128))]),_:1}),e("div",Ge,[e("div",Je,[i(z,{name:"information_hot_icon",style:{width:"22px",height:"22px"}}),s[4]||(s[4]=e("span",{class:"name"},"今日热榜",-1))]),e("div",Ke,[(n(!0),l(v,null,g(o(F),(t,r)=>(n(),l("div",{class:"new-item nowrap",key:t.id,onClick:q=>T(t)},[e("span",{class:P(["num","num-"+(r+1)])},d(r+1),3),D(" "+d(t.title),1)],8,Me))),128))])]),e("div",Qe,[e("div",Ye,[i(z,{name:"information_like_icon",style:{width:"22px",height:"22px"}}),s[5]||(s[5]=e("span",{class:"name"},"猜你喜欢",-1))]),e("div",Ze,[(n(!0),l(v,null,g(o(O),(t,r)=>(n(),l("div",{class:"new-item nowrap",key:t.id,onClick:q=>T(t)},[e("span",{class:P(["num","num-"+(r+1)])},d(r+1),3),D(" "+d(t.title),1)],8,et))),128))])])])])])}}},ft=ne(tt,[["__scopeId","data-v-316bb0b6"]]);export{ft as default};