PageSourceSearch

https://uniapp-starter.netlify.app/assets/pages-home-detail.D_VmoLj2.js

js uniapp-starter.netlify.app collected 2026-10-03 11:33:45 UTC 3,864 bytes, 1 lines download raw bytes

1import{d as a,r as t,a5 as e,a9 as l,f as s,j as r,U as o,o as c,z as d,g as u,a7 as n,X as i,t as f,D as x,A as g,B as b,aa as m,_ as p}from"./index-CURU2Bb7.js";import{a as h}from"./apiPicsum._0GuCHnL.js";const y=p(a({__name:"detail",setup(a){const p=t({author:"",avatar:"",comments:0,content:"",cover:"",desc:"",id:"",likes:0,title:""}),y=t(0),_=t(!0);e(async a=>{const t=a.id||"0";try{const a=await h(t);p.value={author:a.author,avatar:`https://api.dicebear.com/7.x/avataaars/svg?seed=${a.author}`,comments:Math.floor(100*Math.random()),content:`由 ${a.author} 拍摄,原始尺寸 ${a.width}×${a.height}。`,cover:a.download_url,desc:`Photo #${a.id} · ${a.width}×${a.height}`,id:a.id,likes:Math.floor(500*Math.random()),title:a.author}}catch{l({icon:"none",title:"加载失败"})}finally{_.value=!1}});const v=a=>{const{scrollTop:t}=a.detail,e=Math.min(t/150,1);y.value=e};return(a,t)=>{const e=n,l=f,h=x,_=u,w=m,k=i,$=o("layout-custom-uni");return c(),s($,null,{default:r(()=>[d(_,{class:"h-screen relative overflow-hidden"},{default:r(()=>[d(e,{class:"fixed top-0 left-0 right-0 z-50 transition-colors duration-300","is-go-back":"","is-need-left":"","base-props":{backgroundColor:`rgba(255, 255, 255, ${y.value})`,border:!1,fixed:!0,title:y.value>.5?"详情":""},placeholder:!1},null,8,["base-props"]),d(k,{class:"h-full","scroll-y":"",onScroll:v},{default:r(()=>[d(_,{class:"bg-gray-50 pb-20 min-h-full"},{default:r(()=>[d(l,{class:"w-full h-80 bg-gray-200 block",mode:"aspectFill",src:p.value.cover},null,8,["src"]),d(_,{class:"relative -mt-6 bg-white rounded-t-3xl px-5 pt-6 pb-8 shadow-sm"},{default:r(()=>[d(_,{class:"flex items-center justify-between mb-4"},{default:r(()=>[d(_,{class:"flex items-center gap-3"},{default:r(()=>[d(l,{class:"w-10 h-10 rounded-full bg-gray-100",src:p.value.avatar},null,8,["src"]),d(h,{class:"text-base font-medium text-gray-800"},{default:r(()=>[g(b(p.value.author),1)]),_:1})]),_:1}),d(w,{class:"m-0 px-4 text-sm text-white bg-blue-500 rounded-full border-none leading-normal",type:"button"},{default:r(()=>[g(" 关注 ")]),_:1})]),_:1}),d(h,{class:"block text-2xl font-bold text-gray-900 mb-2"},{default:r(()=>[g(b(p.value.title),1)]),_:1}),d(h,{class:"block text-base text-gray-500 mb-6 leading-relaxed"},{default:r(()=>[g(b(p.value.desc),1)]),_:1}),d(_,{class:"text-gray-700 text-base leading-loose"},{default:r(()=>[d(h,null,{default:r(()=>[g(b(p.value.content),1)]),_:1}),d(h,{class:"block mt-4"},{default:r(()=>[g("更多精彩内容,敬请期待...")]),_:1})]),_:1}),d(_,{class:"flex flex-wrap gap-2 mt-6"},{default:r(()=>[d(h,{class:"px-3 py-1 bg-gray-100 text-gray-600 text-xs rounded-full"},{default:r(()=>[g(" # 摄影 ")]),_:1}),d(h,{class:"px-3 py-1 bg-gray-100 text-gray-600 text-xs rounded-full"},{default:r(()=>[g(" # 生活 ")]),_:1}),d(h,{class:"px-3 py-1 bg-gray-100 text-gray-600 text-xs rounded-full"},{default:r(()=>[g(" # 随手拍 ")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),d(_,{class:"fixed bottom-0 left-0 right-0 bg-white border-t border-gray-100 px-5 py-3 flex items-center justify-between pb-safe z-50"},{default:r(()=>[d(_,{class:"flex-1 bg-gray-100 rounded-full px-4 py-2 mr-4"},{default:r(()=>[d(h,{class:"text-gray-400 text-sm"},{default:r(()=>[g("说点什么...")]),_:1})]),_:1}),d(_,{class:"flex items-center gap-4"},{default:r(()=>[d(_,{class:"flex items-center gap-1"},{default:r(()=>[d(_,{class:"i-carbon-favorite text-xl text-gray-600"}),d(h,{class:"text-sm text-gray-600"},{default:r(()=>[g(b(p.value.likes),1)]),_:1})]),_:1}),d(_,{class:"flex items-center gap-1"},{default:r(()=>[d(_,{class:"i-carbon-chat text-xl text-gray-600"}),d(h,{class:"text-sm text-gray-600"},{default:r(()=>[g(b(p.value.comments),1)]),_:1})]),_:1}),d(_,{class:"i-carbon-share text-xl text-gray-600"})]),_:1})]),_:1})]),_:1})]),_:1})}}}),[["__scopeId","data-v-a9116400"]]);export{y 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.