import{t as e}from"./got-BBDj7u1e.mjs";const t={path:`/whpj/:format?`,categories:[`other`],example:`/icbc/whpj/zs?filter_title=%E8%8B%B1%E9%95%91`,parameters:{format:`输出的标题格式，默认为标题 + 所有价格。短格式仅包含货币名称。`},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`icbc.com.cn/column/1438058341489590354.html`],target:`/whpj`}],name:`外汇牌价`,maintainers:[`leoleoasd`],handler:n,url:`icbc.com.cn/column/1438058341489590354.html`,description:`| 短格式 | 参考价 | 现汇买卖 | 现钞买卖 | 现汇买入 | 现汇卖出 | 现钞买入 | 现钞卖出 |
| ------ | ------ | -------- | -------- | -------- | -------- | -------- | -------- |
| short  | zs     | xh       | xc       | xhmr     | xhmc     | xcmr     | xcmc     |`};async function n(t){let{data:n}=await e(`http://papi.icbc.com.cn/exchanges/ns/getLatest`),r=t.req.param(`format`);return{title:`中国工商银行外汇牌价`,link:`https://www.icbc.com.cn/column/1438058341489590354.html`,item:n.data.map(e=>{let t=`${e.currencyCHName} ${e.currencyENName}`,n=`现汇买入价：${e.foreignBuy}`,i=`现钞买入价：${e.cashBuy}`,a=`现汇卖出价：${e.foreignSell}`,o=`现钞卖出价：${e.cashSell}`,s=`参考价：${e.reference}`,c=`${n} ${i} ${a} ${o} ${s}`;return{title:(()=>{switch(r){case`short`:return t;case`xh`:return`${t} ${n} ${a}`;case`xc`:return`${t} ${i} ${o}`;case`zs`:return`${t} ${s}`;case`xhmr`:return`${t} ${n}`;case`xhmc`:return`${t} ${a}`;case`xcmr`:return`${t} ${i}`;case`xcmc`:return`${t} ${o}`;default:return`${t} ${c}`}})(),pubDate:new Date(`${e.publishDate} ${e.publishTime}`),description:c.replaceAll(/\s/g,`<br>`),guid:`${t} ${e.publishDate} ${e.publishTime}`}})}}export{t as route};