PageSourceSearch

https://www.ftu.org.hk/_nuxt/NQ1DI-o-.js

js ftu.org.hk collected 2026-10-02 17:36:02 UTC 15,656 bytes, 1 lines download raw bytes

1import{_ as $e}from"./h5DHtQy8.js";import{_ as Re}from"./D_9SX3Ec.js";import{_ as je}from"./BlRCviZe.js";import{_ as ze}from"./BKHbLoIM.js";import{_ as Oe}from"./DnzarRWK.js";import{j as We,d as He,k as Qe,g as Ge,f as Je,l as Ke,e as Xe}from"./Bg3951aB.js";import{S as Ye,_ as Ze}from"./A1fOXLr_.js";import{_ as we,i as u,c as de,S as Ie,k as Se,U as et,l as m,o as r,m as i,y as k,n as Ne,t as S,F as z,x as O,A as tt,s as lt,d as nt,h as ot,I as Le,a4 as at,g as st,b4 as Z,Q as ut,e as ee,b as te,q as be,p as le}from"./rNMPrltl.js";import{_ as it}from"./B_hcZDl3.js";import rt from"./DwPrBUY0.js";import{S as ct,a as dt}from"./WGw-pFz3.js";import{u as vt}from"./boj7xwiX.js";import{I as mt}from"./CROPNIdg.js";import"./DFuLfMiF.js";import"./gpKywMoy.js";import"./kjC7cIBR.js";import"./6PUj6WHy.js";import"./C43kgiy-.js";import"./CXXDZoq4.js";const pt={key:0,class:"dropdown-options"},ft={key:0,class:"dropdown-option",style:{color:"#a8a8a8"}},ht=["onClick"],gt={__name:"DropdownContainer",props:{disabled:{type:Boolean,default:()=>!1},options:{type:Array,default:()=>[]},placeholder:{type:String,default:"请选择"},value:{type:[String,Number],default:null}},emits:["input","change"],setup(D,{emit:I}){const f=D,E=I,L=u(!1),d=u(f.value),N=u(null),U=de(()=>d.value===null||d.value===void 0?f.placeholder:f.options&&f.options[d.value]?f.options[d.value].columnName:f.placeholder),T=de(()=>d.value===null||d.value===void 0?null:f.options[d.value]||null);Ie(()=>f.value,_=>{d.value=_}),Ie(()=>f.options,()=>{L.value=!1,d.value!==null&&d.value!==void 0&&(f.options[d.value]||(d.value=null,E("input",null)))});const x=_=>{N.value&&!(N.value===_.target||N.value.contains(_.target))&&H()},W=()=>{f.disabled||(L.value=!L.value)},H=()=>{L.value=!1},P=(_,y)=>{d.value=y,L.value=!1,E("input",y),E("change",y)};return Se(()=>{document.addEventListener("click",x)}),et(()=>{document.removeEventListener("click",x)}),(_,y)=>(r(),m("div",{class:"dropdown-container",ref_key:"dropdownRef",ref:N},[i("div",{class:"dropdown-display",onClick:W},[i("text",{class:"dropdown-text",style:Ne({color:T.value?"#333333":"#A8A8A8"})},S(U.value),5),y[0]||(y[0]=i("img",{src:it,class:"arrow-down"},null,-1))]),L.value?(r(),m("div",pt,[D.options.length===1&&D.options[0].id===-1?(r(),m("div",ft," 无数据 ")):(r(!0),m(z,{key:1},O(D.options,(v,c)=>(r(),m("div",{key:c,class:lt(["dropdown-option",{selected:c===d.value}]),onClick:tt(b=>P(v,c),["stop"])},S(v.columnName),11,ht))),128))])):k("",!0)],512))}},_t=we(gt,[["__scopeId","data-v-2f77cad7"]]),yt={class:"page-container"},Ct={key:0,class:"content-head"},kt={class:"information-name-title"},It={class:"content-head-slide"},Lt=["src","onClick"],bt={key:1,class:"page-title"},wt={class:"page-title-name"},St={class:"option-section"},Nt={key:1,class:"tag-bar-wrapper"},Tt={class:"tag-bar-container","scroll-x":"true",ref:"subColumnScrollView"},xt={class:"information-section"},Vt={key:0,class:"information-title"},Mt={class:"title-left"},At={class:"title-name"},Pt=["onClick"],Bt={key:1,class:"information-content"},Ft=["onClick"],qt=["src"],Dt=["src"],Et={key:0,src:Oe,class:"hot-icon",alt:""},Ut={class:"content-data"},$t=["onClick"],Rt={class:"content-data-content"},jt={class:"content-data-author"},zt={class:"auth-date"},Ot={key:2,class:"information-list"},Wt=["onClick"],Ht={key:0,class:"information-list-item"},Qt={class:"list-item-title"},Gt={class:"content-data-author"},Jt={class:"auth-date"},Kt={key:1,class:"column-content"},Xt=["innerHTML"],Yt=nt({__name:"indexH5",setup(D){const I=at(),f=ot(),E=u({informationCenter:mt}),L=u(null),d=u(null),N=u(null),U=u(!1),T=u(!0),x=u([]),W=u([]),H=u(!0),P=u(!0),_=u(!1),y=u(!1),v=u([]),c=u([]),b=u([]),h=u(0),Q=u(0),B=u(0),ve=u(!1),{isEnglish:Te,langType:F,isTradChin:q}=vt(),n=Le({columnId:null,pageNo:Number(I.query.pageNo)||1,pageSize:9,total:0}),w={recommend:"info_sub_list_recommended",collection:"info_sub_list_recommended_two",like:"info_sub_list_recommended_three"},me=(e,t)=>String(e)===String(t)?-1:e,xe=(e=!1)=>e&&n.pageNo>1?String(n.pageNo):void 0,$=(e=!1)=>{const t=v.value[h.value],a=c.value[Q.value],o=b.value[B.value],p=(t==null?void 0:t.id)||L.value,l=(a==null?void 0:a.id)===-1?p:a!=null&&a.id?a.id:void 0,s=o!=null&&o.id&&o.id!==-1?o.id:void 0;
1f.replace({path:I.path,query:{...I.query,columnId:p,buttonFlag:l,subColumnId:void 0,thirdColumnId:void 0,selectValueTwo:s,pageNo:xe(e)}})},ne=u([]),C=u([]),G=Le({}),Ve=st(),pe=u(null),oe=Z("ssrColumnIdList",u(null)),J=Z("ssrSecondaryMenuItems",u([])),K=Z("ssrThirdMenuItems",u([])),V=Z("ssrSearchResults",u(null)),X=u(!1),ae=e=>{var o;if(X.value||!((o=V.value)!=null&&o.list))return!1;const t=Number(I.query.pageNo)||1,a=I.query.selectValueTwo||I.query.buttonFlag||I.query.columnId;return n.pageNo===t&&String(e)===String(a)},se=de(()=>Te.value?"All":"全部"),Me=e=>{if(!e)return!1;const t=String(e.secondaryMenu||"");return t==="2"||t==="3"||e.secondaryMenu===2||e.secondaryMenu===3},R=(e=[])=>e.map(t=>({...t,checked:!1}));Se(()=>{pe.value=Ve.userInfo,pe.value&&(U.value=!0);const e=I.query;e!=null&&e.columnId&&(L.value=e.columnId),e!=null&&e.subColumnId?d.value=me(e.subColumnId,e.columnId):e!=null&&e.buttonFlag&&(d.value=me(e.buttonFlag,e.columnId)),e!=null&&e.selectValueTwo?N.value=e.selectValueTwo:e!=null&&e.thirdColumnId&&(N.value=e.thirdColumnId),c.value=[],b.value=[],Fe(),qe(),_e()});const Ae=()=>{T.value=!0,h.value=0,P.value=!0,_.value=!1,y.value=!1,f.replace({path:I.path,query:{}})},Pe=e=>{e.jumpLink&&(e.jumpLink=e.jumpLink.toLowerCase().trim(),e.jumpLink.startsWith("http://")||e.jumpLink.startsWith("https://")?window.open(e.jumpLink,"_blank"):f.push({path:e.jumpLink}))},Be=(e,t="first")=>{typeof e.id=="number"&&e.id<0||Object.values(w).includes(e.id)||(t==="first"&&(P.value=e.firstLevelMenu==="2"||e.firstLevelMenu==="3"),(t==="first"||t==="second")&&(_.value=e.secondaryMenu==="2"||e.secondaryMenu==="3"))},ue=({index:e,item:t},a={})=>{const o=!!a.preservePageNo;if(!v.value||e>=v.value.length||!v.value[e]){console.warn("无效的栏目索引:",e);return}Be(t),h.value=e,c.value=[],b.value=[],$(o),ye();const p=t.id;n.columnId=t.id;const l=o&&_.value&&!!d.value;if(p===w.recommend){_e();return}if(p===w.collection){n.columnId=null,fe();return}if(p===w.like){n.columnId=null,he();return}switch(o||(n.pageNo=1),n.total=0,t.columnAttribute){case"1":_.value&&ie(!1,{preservePageNo:o});break;case"2":case"3":l||M(),_.value&&ie(!1,{preservePageNo:o});break;case"4":ie(!0,{preservePageNo:o});break;case"5":{const s=t.openNewWindow==="1"?"_blank":"_self";window.open(t.externalLinkUrl,s);break}default:console.warn("未知的栏目属性:",t.columnAttribute)}},fe=async()=>{if(ae(w.collection)){X.value=!0,C.value=V.value.list||[],n.total=Number(V.value.total)||C.value.length;return}const e={...n,columnId:n.columnId?n.columnId:"informationCenter",publishPort:"1",langType:F.value},t=await Je(e);t&&t.list?(C.value=t.list,n.total=t.total):(C.value=[],n.total=0)},he=async()=>{if(ae(w.like)){X.value=!0,C.value=V.value.list||[],n.total=Number(V.value.total)||C.value.length;return}const e={...n,columnId:n.columnId?n.columnId:"informationCenter",publishPort:"1",langType:F.value},t=await Ke(e);t&&t.list?(C.value=t.list,n.total=t.total||0):(C.value=[],n.total=0)},ie=async(e=!1,t={})=>{const a=!!t.preservePageNo,o=v.value[h.value],p=R(await ge(o.id));p.forEach(s=>{s.id&&s.columnContent&&(G[s.id]=s.columnContent)});const l=p.filter(Me);if(o.secondaryMenu==="3"&&l.length>0){c.value=R([{columnName:se.value,id:-1},...l]);let s=0;if(e&&c.value.length>1&&(s=1),d.value&&c.value.length>0){const g=c.value.findIndex(A=>String(A.id)===String(d.value));g>-1&&(s=g)}j({index:s,item:c.value[s]},{preservePageNo:a})}else if(o.secondaryMenu==="2")if(c.value=R(l),d.value&&c.value.length>0){const s=c.value.findIndex(g=>String(g.id)===String(d.value));s>-1&&j({index:s,item:c.value[s]},{preservePageNo:a})}else e&&c.value.length>0&&j({index:0,item:c.value[0]},{preservePageNo:a});else e&&o.secondaryMenu==="1"&&(c.value=R(p),c.value.length>0&&j({index:0,item:c.value[0]},{preservePageNo:a}))},j=({index:e,item:t},a={})=>{const o=!!a.preservePageNo;c.value.forEach(l=>{l.checked=!1}),t.checked=!0;const p=t.columnAttribute!=="5";if(y.value=p,b.value=[],Q.value=e,ve.value=t.id===-1||t.thirdLevelMenu==="1",$(o),o||(n.pageNo=1),n.total=0,t.id===-1){n.columnId=v.value[h.value].id,M();return}switch(t.columnAttribute){case"1":y.value&&re(!1,{preservePageNo:o});break;
1case"2":case"3":n.columnId=t.id,y.value&&re(!1,{preservePageNo:o}),M();break;case"4":y.value&&re(!0,{preservePageNo:o});break;case"5":f.push("/about/"+t.externalLinkUrl);break}},re=async(e=!1,t={})=>{const a=!!t.preservePageNo,o=c.value[Q.value],p=R(await ge(o.id));if(p.forEach(l=>{l.id&&l.columnContent&&(G[l.id]=l.columnContent)}),o.thirdLevelMenu==="1")b.value=[];else{const l=p.filter(s=>{var A;const g=String((A=s==null?void 0:s.thirdLevelMenu)!=null?A:"");return g==="2"||g==="3"||(s==null?void 0:s.thirdLevelMenu)===2||(s==null?void 0:s.thirdLevelMenu)===3});o.thirdLevelMenu==="3"?b.value=[{columnName:se.value,id:-1},...l]:b.value=l}if(B.value=0,b.value.length===0){e&&(n.columnId=o.id,a||(n.pageNo=1),n.total=0,$(a),M());return}if(N.value){const l=b.value.findIndex(s=>String(s.id)===String(N.value));l>-1&&Y(l,{preservePageNo:a})}else e&&(b.value[0].id===-1?Y(1,{preservePageNo:a}):Y(0,{preservePageNo:a}))},Y=(e,t={})=>{const a=!!t.preservePageNo;B.value=e;const o=b.value[B.value];if($(a),a||(n.pageNo=1),n.total=0,o.id===-1)n.columnId=c.value[Q.value].id;else{if(o.columnAttribute==="5"){const p=o.openNewWindow==="1"?"_blank":"_self";window.open(o.externalLinkUrl,p);return}n.columnId=o.id}M()},Fe=async()=>{try{const e=await We();x.value=e}catch(e){console.error("获取Banner数据失败:",e)}},qe=async()=>{const e=oe.value&&Array.isArray(oe.value)?oe.value:await He(F.value||"1");W.value=[{columnName:q.value?"搜尋全部":"搜索内容"},...e],U.value?v.value=[{columnName:q.value?"推薦":"推荐",id:w.recommend},{columnName:"已收藏",id:w.collection},{columnName:q.value?"已讚好":"已赞好",id:w.like},...e]:v.value=[{columnName:q.value?"推薦":"推荐",id:w.recommend},...e],h.value>=v.value.length&&(h.value=0),ut(()=>{setTimeout(()=>{if(L.value){T.value=!1;const t=v.value.findIndex(a=>String(a.id)===String(L.value));t>=0?(h.value=t,ue({index:t,item:v.value[t]},{preservePageNo:typeof I.query.pageNo=="string"})):(H.value=!1,P.value=!1,_.value=!1,y.value=!1,n.columnId=L.value,I.query.pageNo||(n.pageNo=1),M())}},50)})},ge=async e=>String(e)===String(L.value)&&J.value&&Array.isArray(J.value)&&J.value.length>0?J.value:String(e)===String(d.value)&&K.value&&Array.isArray(K.value)&&K.value.length>0?K.value:await Xe({parentId:e,langType:F.value}),_e=async()=>{const e=await Qe(F.value);ne.value=e,ne.value.forEach(t=>{if(t.contentListVoList&&t.contentListVoList.length>0){const a=t.contentListVoList[0];if(a.content){const o=document.createElement("div");o.innerHTML=a.content,o.innerText&&(a.contentText=o.innerText.trim())}}})},M=async()=>{if(!n.columnId){console.warn("无效的columnId,跳过加载:",n.columnId);return}if(ae(n.columnId)){X.value=!0,C.value=V.value.list||[],n.total=Number(V.value.total)||C.value.length;return}const e=await Ge({columnId:n.columnId,pageNo:n.pageNo,pageSize:n.pageSize,langType:F.value});e&&e.list?(C.value=e.list,n.total=e.total):(C.value=[],n.total=0)},De=e=>{if(n.pageNo=e,$(!0),!v.value||h.value>=v.value.length){console.warn("无效的栏目索引:",h.value);return}v.value[h.value].id===w.collection?fe():v.value[h.value].id===w.like?he():M(),Ce()},Ee=({keyword:e,type:t})=>{f.push({path:"/informationSearch",query:{columnId:t==null?void 0:t.id,keyword:e}})},Ue=e=>{h.value=v.value.findIndex(t=>t.id===e.id),ye(),ue({index:h.value,item:v.value[h.value]})},ye=()=>{T.value=!1,Ce()},Ce=()=>{window.scrollTo({top:0,behavior:"smooth"})},ce=e=>{f.push({path:"/counselingDetail",query:{id:e.id,type:e.type,columnId:e.columnId,title:e.title}})},ke=()=>n.columnId&&G[n.columnId]||"";return(e,t)=>{var p;const a=$e,o=Re;return r(),m("div",yt,[T.value?(r(),m("div",Ct,[i("div",kt,S(ee(q)?"工聯資訊":"工联咨询"),1),i("div",It,[x.value.length>0?(r(),te(ee(ct),{key:0,class:"swiper","slides-per-view":1,loop:x.value.length>1,autoplay:{delay:3e3,disableOnInteraction:!1,pauseOnMouseEnter:!0}},{default:be(()=>[(r(!0),m(z,null,O(x.value,(l,s)=>(r(),te(ee(dt),{key:s,class:"swiper-item"},{default:be(()=>[i("img",{src:l.imageUrl,onClick:g=>Pe(l),class:"swiper-image"},null,8,Lt)]),_:2},1024))),128))]),_:1},8,["loop"])):k("",!0)])])):k("",!0),T.value?k("",!0):(r(),m("div",bt,[i("img",{src:je,onClick:Ae,class:"w-24px h-24px",alt:""}
1),i("div",wt,S(ee(q)?"資訊目錄":"咨询目录"),1)])),i("div",St,[le(Ye,{class:"search-box","type-list":W.value,onSearch:Ee,"show-clear":""},null,8,["type-list"]),P.value?(r(),te(a,{key:0,class:"type-tab-section","tab-list":v.value,modelValue:h.value,"onUpdate:modelValue":t[0]||(t[0]=l=>h.value=l),onTabChange:ue,"scroll-to-start":!0,"auto-scroll":!0},null,8,["tab-list","modelValue"])):k("",!0),_.value?(r(),m("div",Nt,[i("div",Tt,[le(o,{"tag-list":c.value,"inactive-bg-color":"#FFFFFF","active-bg-color":"linear-gradient(to right, #F98C18, #FB0C45)","inactive-text-color":"#544242","inactive-border-color":"#D9D9D9","font-size":"32rpx",onTagClick:j},null,8,["tag-list"])],512)])):k("",!0),y.value?(r(),te(_t,{key:2,style:{"margin-top":"10rpx"},onChange:Y,options:b.value,placeholder:se.value,modelValue:B.value,"onUpdate:modelValue":t[1]||(t[1]=l=>B.value=l),disabled:ve.value},null,8,["options","placeholder","modelValue","disabled"])):k("",!0)]),i("div",xt,[H.value&&((p=v.value[h.value])==null?void 0:p.id)===w.recommend?(r(!0),m(z,{key:0},O(ne.value,(l,s)=>(r(),m("div",{key:s,class:"information-item"},[l.title?(r(),m("div",Vt,[i("div",Mt,[i("div",{class:"title-dot",style:Ne({backgroundColor:E.value.informationCenter.columnNameTagColor})}
1,null,4),i("div",At,S(l.title),1)]),i("div",{onClick:g=>Ue(l),class:"view-more"},[...t[3]||(t[3]=[i("text",null,"查看更多",-1),i("img",{class:"w-16px h-16px mt-2px align-top",src:ze,alt:""},null,-1)])],8,Pt)])):k("",!0),l.contentListVoList&&l.contentListVoList.length>0?(r(),m("div",Bt,[i("div",{class:"content-img-wrap",onClick:g=>ce(l.contentListVoList[0])},[i("img",{class:"content-img-bg",src:l.contentListVoList[0].imgUrl,alt:""},null,8,qt),i("img",{class:"content-img-fg",src:l.contentListVoList[0].imgUrl,alt:""},null,8,Dt),l.contentListVoList[0].pointTaskId?(r(),m("img",Et)):k("",!0)],8,Ft),i("div",Ut,[i("div",{onClick:g=>ce(l.contentListVoList[0]),class:"content-data-title"},S(l.contentListVoList[0].title),9,$t),i("div",Rt,S(l.contentListVoList[0].contentText),1),i("div",jt,[i("div",zt,S(l.contentListVoList[0].createTime?l.contentListVoList[0].createTime.substring(0,10):""),1)])])])):k("",!0),l.contentListVoList&&l.contentListVoList.length>1?(r(),m("div",Ot,[(r(!0),m(z,null,O(l.contentListVoList,(g,A)=>(r(),m("div",{key:A,onClick:Zt=>ce(g)},[A>0?(r(),m("div",Ht,[i("div",Qt,S(g.title),1),i("div",Gt,[i("div",Jt,S(g.createTime?g.createTime.substring(0,10):""),1)])])):k("",!0)],8,Wt))),128))])):k("",!0)]))),128)):k("",!0),C.value.length>0&&ke()?(r(),m("div",Kt,[i("div",{innerHTML:ke(),class:"column-content"},null,8,Xt)])):k("",!0),(r(!0),m(z,null,O(C.value,(l,s)=>(r(),m("div",{key:s},[le(rt,{"has-login":U.value,info:l,"column-content":G[l.columnId]||""},null,8,["has-login","info","column-content"])]))),128)),le(Ze,{total:n.total,"page-size":n.pageSize,modelValue:n.pageNo,"onUpdate:modelValue":t[2]||(t[2]=l=>n.pageNo=l),onPageChange:De},null,8,["total","page-size","modelValue"])])])}}}),yl=we(Yt,[["__scopeId","data-v-a14503fd"]]);export{yl as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.