| 1 |
- import{d as C,r as c,B as R,o as S,s as j,t as I,b as n,e as r,c as a,h as u,y as T,f as e,F as A,z as F,k as M,A as P}from"./index-db0c0d5a.js";import{P as U,B as W}from"./index-9450cb4f.js";import{S as D}from"./index-dc279de7.js";import{C as E}from"./index-d5db21cd.js";import{I as q}from"./index-df5449db.js";import{F as G}from"./index-280051ec.js";import{p as H}from"./index-3eb62d94.js";import{_ as J}from"./CusNavigation-ff1327c9.js";import{I as K}from"./index-14c6b81f.js";import{L as O}from"./index-40c01fa6.js";import"./index-f062c63e.js";import"./use-scope-id-3c16c0b7.js";import"./constant-eba5e2d8.js";import"./on-popup-reopen-7d6e9f67.js";import"./use-route-cd72a795.js";import"./axios-9cbf0d09.js";import"./function-call-d48f373b.js";const Q={style:{display:"flex","flex-direction":"column",height:"100vh"}},X={style:{display:"flex","align-items":"center"}},Y={style:{"background-color":"#eee","border-radius":"2.5rem","margin-left":"10px","flex-grow":"1"}},Z={style:{"line-height":"0px","padding-top":"2px","margin-left":"6px"}},$={style:{height:"80px",display:"flex"}},ee={style:{"margin-right":"18px"}},oe=e("div",{style:{width:"0px","flex-grow":"1",display:"flex","flex-direction":"column","justify-content":"space-between"}},[e("div",{style:{"font-weight":"bold","text-align":"left",color:"#000"}},[e("span",null,"公务员考试笔试,政审都过了,单位叫我去上班我要去吗?")]),e("div",{style:{display:"flex","justify-content":"space-between",color:"#969799"}},[e("div",null,"河南新闻"),e("div",null,"2024-06-11")])],-1),te={key:0},le={key:1,style:{"text-align":"center",padding:"20px",color:"#ccc"}},ae=e("span",null,"暂无数据",-1),ne=[ae],se={key:2,style:{"text-align":"center",padding:"20px"}},ie={key:3,style:{"text-align":"center",padding:"20px",color:"#ccc"}},ce=e("span",null,"没有更多了",-1),re=[ce],de={key:4,style:{"text-align":"center",padding:"20px"}},Ce=C({__name:"Index",setup(pe){const y=()=>{console.log("jjj"),console.log(_),h()},_=c(""),t=R({total:0,pageNum:1,pageSize:10,pages:0}),d=c([]),s=c(!1),p=c(!1),k=c(!1),v=()=>{console.log("onload....."),H({url:"/device/search",data:{size:t.pageSize,page:t.pageNum,sort:"createtime",order:"desc",keyWord:_.value,mac:""}}).then(o=>{if(console.log(o),p.value=!1,s.value=!1,o.code==0){const l=o.data,i=o.total,g=Math.ceil(i/t.pageSize);console.log(g),console.log(l),t.pageNum==1&&d.value.splice(0,d.value.length),d.value.push(...l),t.pages=g,t.total=i,console.log(d.value,g)}},o=>{console.log(o),p.value=!1,s.value=!1}).catch(o=>{console.log(o),p.value=!1,s.value=!1})},h=()=>{console.log("onrefresh..."),console.log(s.value),t.pageNum=1,k.value=!1,p.value=!0,v()};S(()=>{console.log("onMounted")});const f=c(null),x=c(0);j(()=>{console.log("onActived..."),P(()=>{f.value.scrollTop=x.value})}),I((o,l,i)=>{console.log(o,l),console.log("onBeforeRouteLeave..."),x.value=f.value.scrollTop,i()});const b=()=>{console.log("clickLoading"),t.pageNum++,p.value=!0,v()};return(o,l)=>{const i=K,g=G,w=q,B=E,L=D,z=O,N=U,V=W;return n(),r("div",Q,[a(T(J),{gobackabled:""},{default:u(()=>[e("div",X,[e("div",Y,[a(g,{style:{padding:"6px 16px","align-items":"center"},modelValue:_.value,"onUpdate:modelValue":l[0]||(l[0]=m=>_.value=m),size:"normal",clearable:""},{"right-icon":u(()=>[e("div",null,[a(i,{name:"scan",size:"1.5rem"})])]),_:1},8,["modelValue"])]),e("div",Z,[a(i,{name:"static/images/icon-search-black.png",size:"2.5rem",onClick:y})])])]),_:1}),e("div",{ref_key:"scrollRef",ref:f,class:"container",style:{"overflow-y":"auto","flex-grow":"1"}},[a(N,{style:{"min-height":"100%"},modelValue:s.value,"onUpdate:modelValue":l[1]||(l[1]=m=>s.value=m),onRefresh:h},{default:u(()=>[(n(!0),r(A,null,F(d.value,m=>(n(),M(L,{style:{"background-color":"#fff","margin-bottom":"10px"}},{default:u(()=>[a(B,{clickable:"",to:"/article/detail/"+m.mac},{default:u(()=>[e("div",$,[e("div",ee,[a(w,{width:"80",height:"80",radius:"6",src:"static/images/banner.png"})]),oe])]),_:2},1032,["to"])]),_:2},1024))),256)),e("div",null,[s.value?(n(),r("div",te)):d.value.length==0?(n(),r("div",le,ne)):p.value?(n(),r("div",se,[a(z,{type:"spinner",color:"#1989fa"})])):t.pages<=t.pageNum?(n(),r("div",ie,re)):(n(),r("div",de,[e("span",{onClick:b},"点击加载")]))])]),_:1},8,["modelValue"]),a(V,{target:".container",right:"5vw",bottom:"80px"})],512)])}}});export{Ce as default};
|