import{t as e}from"./parse-date-BdYTmLpo.mjs";import{t}from"./got-BBDj7u1e.mjs";import{t as n}from"./timezone-keeL11Io.mjs";const r={path:`/fund/:id`,categories:[`finance`],example:`/xueqiu/fund/040008`,parameters:{id:"基金代码, 可在基金主页 URL 中找到. 此路由的数据为场外基金 (`F`开头)"},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},name:`蛋卷基金净值更新`,maintainers:[`HenryQW`,`NathanDai`],handler:i};async function i(r){let i=r.req.param(`id`),a=`https://danjuanapp.com/funding/${i}`,o=await t({method:`get`,url:`https://danjuanapp.com/djapi/fund/${i}`,headers:{Referer:a}}),s=o.data.data.fd_full_name,c=o.data.data.fd_name,l=o.data.data.fd_code,u=o.data.data.fund_derived.unit_nav,d=o.data.data.fund_derived.nav_grtd,f=o.data.data.fund_derived.end_date,p=`基金代码 ${l} <br> 今日净值(${f}) ¥${u} `,m=s;d>0?(p+=`<br> 日涨跌 ${d}%`,m+=`📈 ${d}%`):d<0?(p+=`<br> 日跌跌 ${d}%`,m+=`📉 ${d}%`):d===`0.0000`&&(p+=`无波动`,m+=`持平`);let h={title:m,description:p,pubDate:n(e(f),8),link:a};return{title:c,link:a,description:p,item:[h]}}export{r as route};