2 lines
8.1 KiB
JavaScript
2 lines
8.1 KiB
JavaScript
import{t as i,v as n,x as t,y as a,L as h,B as _,H as A,a1 as D,C as b,D as T,r as g,$ as O,a2 as N,o as M,a3 as Y,S as K,a0 as j,u as F,z as k,A as Q,Y as P,Z as W,J as X}from"./entry.0126ff01.js";import{h as Z,_ as $,H as ee,T as te,a as se,b as oe}from"./eye-icon.c458fdac.js";import{_ as H}from"./_plugin-vue_export-helper.c27b6911.js";import{v as ie,E as L,o as ae}from"./cross-icon.73dba08e.js";import"./vue.f36acd1f.63a663d2.js";const ne=""+new URL("time-icon.fef65a83.svg",import.meta.url).href,ce=""+new URL("time-white-icon.805d0e12.svg",import.meta.url).href,Ae=""+new URL("like-no.23054eaf.svg",import.meta.url).href,le="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAQKADAAQAAAABAAAAQAAAAABGUUKwAAAD30lEQVR4AeVa7XXaMBSVDANkBDxB6QRxJmg6QVmANp2gZAOaDBCYoGwQugGZAGUD+F9Q7zPIxxAZy7ZkG0vn5Ejoy/fe954+7HDWgrRbf/8FGPeMySFyIRmf9MOneR3QeB0PufQMkJ+AOAlwlvgqYMEdD6ebswarPwOrs5WaTP7QD5PDPdu/6tvs1bZAAHaTTUcODx6S3aNqS6MhINcP0Z7tcq0csF6IUBBVyerGt8EDdLhO6iASFkg3qVEBEOORGS3+zaxf8V6NCmAOVw4RLhfWCvOZzns2KoBkMjoHdOH38EJb6abGBCCLYgW+NUW+Y7uBad8i/RoTACCjIkA544Mi/U37NiYALDoyBemyXyMCwP0HcP8vLomZzt2IANj+JqYAXferXQCyPi4/zvb1ooLVLgBi/6UoSOqPLVOUGZc3plYBYP17xH6UB0rX3mM9oauvWlebAOT6ONOXsv6R5KYqWd342gQ4un7p4yxugysdgap1/aoTmIzfrcdk+cikb0aft4z6ytXOPeDfejwCSvqrkLgT6xMgpwIQeSx6VeJeiSZUwXbuTACL5GGlYGmbuJoPBrKfbJIndL3w2QlOmtu6B9gmLxn7S0BdpRNl5Xp8a/ogHj5/AIa9/gZ7/RpzlN7uNM+fwUozTX3pqjT2WAA6oR0PKQWA81UvfPqcRnGc50+6rqVlgTfNX+lsEQA0PkDsCHQB8kQrfk8XUUkl3PKGqtzynE6lr+A+CHBCm7QcrCt4CNf9JEAMGMe9KyQNzvuJdoGCrt8gXOuPlpwEeLc+79VMiC/Q2GfF1eC1DlTiE7zHCVvhCosgF75qgHPAkjzASwEQ+vFJ1tsQgOcvyfOxCLp520qTtznhir0ifIGrt61tJn/EtqTcyxCg+McCuFECCCr4lFT8E+cASgifyMekWbBQnH0MgS2MHi+ABzEOUnh0H+CJ9RMBfLoPYPv7KICKBw/yLTgu0zzjNcCf+wBfqO1PiaAWQaEqupyfuz9xVQJ0mbfiRqv/SfwnAvhxH+AzpUQ6jz3Ah/sA3H+aJq7KvoTAW9aJVwkglCJdzHHO0VqfuMYCZKnTETG2/fB5lsVFeUBWewfqeab1iVxagE7eB7D4zS5ZMRGgm/cBPs8L70SASypda1vW1pfmkwjQtfvA8bXXKk1WV04EQKPQdbjWOhzuHkywJwJ06zjMHxH7udYngRIBoNgSv+m+fOWJz/GvOxNTEokAtFoibozcJjX5JlWGmoePDem6GstkvJ8gPyryzEQAGkQnJnwxvaMFJGeS+GHnbobfC8b475yxNpvfD1j5I3AP8P+E06KT/wdPOffX7me6UQAAAABJRU5ErkJggg==",de=""+new URL("comment-icon.f7b16ad3.svg",import.meta.url).href;const u=e=>(b("data-v-0d09629d"),e=e(),T(),e),me=["href"],re=["src"],ue={class:"content flexflex"},ve={class:"name"},fe={class:"list flexflex"},_e={key:0,class:"item flexacenter"},ge=u(()=>t("div",{class:"item-name"},"专业",-1)),he={class:"item-value ellipsis"},ye={key:1,class:"item flexacenter"},ke=u(()=>t("div",{class:"item-name"},"项目",-1)),xe={class:"item-value ellipsis"},we={key:2,class:"item flexacenter"},Ee=u(()=>t("div",{class:"item-name"},"时间",-1)),pe={class:"item-value ellipsis"},Be={class:"text-box"},Ce={class:"text"},Qe={class:"time flexacenter"},Pe=u(()=>t("img",{class:"time-icon time-black-icon",src:ne},null,-1)),Le=u(()=>t("img",{class:"time-icon time-white-icon",src:ce},null,-1)),be={class:"data-list flexacenter"},Te={class:"data-item flexacenter"},He=u(()=>t("img",{class:"data-item-icon",src:$},null,-1)),Ie={key:0,class:"data-item-icon",src:Ae},Se={key:1,class:"data-item-icon",src:le},Ve={class:"data-item flexacenter"},qe=u(()=>t("img",{class:"data-item-icon",src:de},null,-1)),Ge={__name:"Item",props:{item:Object},emits:["childEvent"],setup(e,{emit:E}){const p=E,y=(m,c)=>{p("handleLike",c)};return(m,c)=>(i(),n("a",{class:"box flexflex",target:"_blank",href:`./details/${e.item.uniqid}`},[t("img",{class:"img",src:e.item.schoolimage},null,8,re),t("div",ue,[t("div",ve,a(e.item.school),1),t("div",fe,[e.item.profession?(i(),n("div",_e,[ge,t("div",he,a(e.item.profession),1)])):h("",!0),e.item.project?(i(),n("div",ye,[ke,t("div",xe,a(e.item.project),1)])):h("",!0),e.item.interviewtime?(i(),n("div",we,[Ee,t("div",pe,a(e.item.interviewtime),1)])):h("",!0)]),t("div",Be,[t("div",Ce,a(e.item.message),1),t("div",Qe,[Pe,Le,_(" "+a(("handleDate"in m?m.handleDate:A(Z))(e.item.releasetime))+"发布 ",1)])]),t("div",be,[t("div",Te,[He,_(" "+a(e.item.views||0),1)]),t("div",{class:"data-item flexacenter",onClick:c[0]||(c[0]=D(r=>y(e.item.uniqid,e.item.token),["prevent"]))},[e.item.islike==0?(i(),n("img",Ie)):(i(),n("img",Se)),_(" "+a(e.item.likenum||0),1)]),t("div",Ve,[qe,_(" "+a(e.item.commentnum||0),1)])])])],8,me))}},Re=H(Ge,[["__scopeId","data-v-0d09629d"]]),Je="data:image/png;base64,iVBORw0KGg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N7WL0cxa4bwCPQlI1As2coKczBJAf2WWWNIPnETB2bpwoIBPujyjTTlBD8DyBTp8KqHBPQZhcOSonBISfqNN/0dJCphX8VVsyc7dBEmm3y4Ke9Dg1PIGewecyzyTvwwe6TiYXkNx2kZkdfj/g8s8CCSvPqke+NiatixeYsPd0AAq5hBTEqH6aj/Zgs7TFMOJn/pYsf9yYVFCAhg4ibECr2QLZ06CgnFKody0b9xPA+RkbaLALugT7AGvDbp5SRY1tFEonIY8F7UKVY56L/QG6mjn5mhkRrwjapatk7VWiocUq+4KSkK6KPvl6lzBc+xUhWcfZR+0+TZ4rISUGJIFEJiBLVeY9f0l6rPbf2xBA8KE5Qw1iOje36Wbm1c2x63cnPYk4A58QjVouvqVRm2l4TMAsQfZRZcXExOBCzQVXQjyWuYpAhpf+Gr6Pqnm2U3Jvx7brH/ZbYd+APZxM/2zgvhdQAAAABJRU5ErkJggg==";const I=e=>(b("data-v-8afe84d1"),e=e(),T(),e),Ue={key:0,class:"search-result flexacenter"},ze=I(()=>t("img",{class:"keyword-icon",src:Je},null,-1)),De=I(()=>t("div",{class:"halving-line"},null,-1)),Oe={class:"total"},Ne={key:0,class:"empty-box flexcenter"},Me={key:1,class:"in-end"},Ye={__name:"index",async setup(e){let E,p;const y=g(null);let m=null;const c=O();let r=g("");r.value=c.query.keyword,N(()=>{r.value!=c.query.keyword&&(d.value=[],l.value=1,r.value=c.query.keyword,w(c.query.keyword))}),M(async()=>{let s=await Y(()=>import("./masonry.0a31e906.js").then(o=>o.m),["./masonry.0a31e906.js","./cross-icon.73dba08e.js","./entry.0126ff01.js","./entry.8609db93.css","./cross-icon.a9c3a5f3.css"],import.meta.url);m=new s.default(y.value,{itemSelector:".box",gutter:22.5}),window.addEventListener("scroll",B)});const B=()=>{const s=document.documentElement.scrollTop||document.body.scrollTop,o=document.documentElement.scrollHeight,v=document.documentElement.clientHeight;s+v>=o-40&&w()};let l=g(1),C=g(0),d=g([]),x=!1;const w=()=>{l.value==0||x||(x=!0,ie({page:l.value,keyword:r.value}).then(s=>{if(s.code!=200){l.value=0,L({message:s.message,type:"error"});return}let o=s.data;d.value=d.value.concat(o.data||[]),o.count>d.value.length?l.value++:l.value=0,C.value=o.count,K(()=>{m.reloadItems(),m.layout()})}).finally(()=>x=!1))};w();const S=s=>{ae({token:s}).then(o=>{if(o.code!=200)return;let v=o.data;d.value.forEach(f=>{console.log(f,"element"),f.token==s&&(f.islike=v.status,f.likenum=v.count)}),L({message:o.message,type:"success"})})};j(()=>{window.removeEventListener("scroll",B)});const V=F(),q=()=>{V.push("/index.html")};try{}catch{}return(s,o)=>{const v=te,f=ee,G=se,R=oe,J=Re;return i(),n(P,null,[k(f,null,{default:Q(()=>[k(v,null,{default:Q(()=>[_("寄托面经")]),_:1})]),_:1}),k(G),A(r)?(i(),n("div",Ue,[t("div",{class:"keyword flexacenter",onClick:q},[_(a(A(r))+" ",1),ze]),De,t("div",Oe,"共 "+a(A(C))+" 条搜索数据",1)])):h("",!0),t("div",{class:"content",ref_key:"gridContainer",ref:y},[A(d).length==0&&A(l)==0?(i(),n("div",Ne,[k(R,{hint:"没有找到相关结果,请更换搜索关键词"})])):(i(!0),n(P,{key:1},W(A(d),(U,z)=>(i(),X(J,{key:z,item:U,onHandleLike:S},null,8,["item"]))),128))],512),A(l)==0&&A(d).length>0?(i(),n("div",Me,"- 到底了 -")):h("",!0)],64)}}},$e=H(Ye,[["__scopeId","data-v-8afe84d1"]]);export{$e as default};
|