Files
accountbook/frontend/.next/cache/webpack/client-production/10.pack
T

1 line
12 KiB
Plaintext
Raw Normal View History

2026-03-12 11:24:10 +08:00
wpcG.§webpack/lib/cache/PackFileCacheStrategyPackContentItems ÆTerserWebpackPlugin|static/chunks/pages/categories-0208c5ae4a3933c9.jsÐRealContentHashPlugin|analyse|static/chunks/pages/categories-0208c5ae4a3933c9.js†source«webpack/lib/util/registerExternalSerializer™webpack-sources/RawSource-(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[161],{5461:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/categories",function(){return t(2874)}])},6248:function(e,n,t){"use strict";t.d(n,{Z:function(){return u}});var a=t(5893),c=t(7294),s=t(1163),r=t(9415);let i=[{href:"/",label:"首页",icon:"home"},{href:"/stats",label:"统计",icon:"chart"},{href:"/recurring",label:"周期",icon:"repeat"},{href:"/categories",label:"分类",icon:"tags"}];function u(e){let{title:n,subtitle:t,actions:u,headerContent:o,children:l,contentClassName:D="",hideNav:d=!1,compactHeader:h=!1}=e,m=(0,s.useRouter)(),p=(0,c.useMemo)(()=>{let e=i.find(e=>e.href===m.pathname);return(null==e?void 0:e.href)||null},[m.pathname]),f=o||(n?(0,a.jsxs)("div",{className:"app-header__text",children:[(0,a.jsx)("h1",{children:n}),t?(0,a.jsx)("p",{children:t}):null]}):null),y=["app-header",h?"app-header--compact":"",f?"app-header--with-content":"app-header--actions-only",u?"app-header--with-actions":""].filter(Boolean).join(" ");return(0,a.jsxs)("div",{className:"app-shell".concat(d?" app-shell--standalone":""),children:[(0,a.jsx)("header",{className:y,children:(0,a.jsxs)("div",{className:"app-shell__container app-header__inner",children:[f?(0,a.jsx)("div",{className:"app-header__main",children:f}):(0,a.jsx)("div",{className:"app-header__spacer","aria-hidden":"true"}),u?(0,a.jsx)("div",{className:"app-header__actions",children:u}):null]})}),(0,a.jsx)("main",{className:"app-content ".concat(D).trim(),children:(0,a.jsx)("div",{className:"app-shell__container app-content__inner",children:l})}),d?null:(0,a.jsx)("nav",{className:"bottom-nav","aria-label":"主导航",children:(0,a.jsx)("div",{className:"app-shell__container bottom-nav__inner",children:i.map(e=>{let n=p===e.href;return(0,a.jsxs)("button",{type:"button",className:"bottom-nav__item".concat(n?" is-active":""),onClick:()=>m.push(e.href),"aria-current":n?"page":void 0,children:[(0,a.jsx)(r.J,{name:e.icon,size:20}),(0,a.jsx)("span",{children:e.label})]},e.href)})})})]})}},610:function(e,n,t){"use strict";async function a(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=await fetch("".concat("").concat(e),{...n,headers:{"Content-Type":"application/json",...function(){let e=localStorage.getItem("token");return e?{Authorization:"Bearer ".concat(e)}:{}}(),...n.headers}}),a=await t.json();if(!t.ok)throw Error(a.error||"请求失败");return a}async function c(e,n){let t=await a("/api/auth/login",{method:"POST",body:JSON.stringify({username:e,password:n})});return localStorage.setItem("token",t.token),t}async function s(e,n){let t=await a("/api/auth/register",{method:"POST",body:JSON.stringify({username:e,password:n})});return localStorage.setItem("token",t.token),t}function r(){localStorage.removeItem("token")}function i(){return!!localStorage.getItem("token")}async function u(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all",t="/api/records?month=".concat(e);return"all"!==n&&(t+="&type=".concat(n)),a(t)}async function o(e){return a("/api/stats?month=".concat(e))}async function l(e){return a("/api/records",{method:"POST",body:JSON.stringify(e)})}async function D(e,n){return a("/api/records/".concat(e),{method:"PUT",body:JSON.stringify(n)})}async function d(e){return a("/api/records/".concat(e),{method:"DELETE"})}async function h(e){return a("/api/records/search?q=".concat(encodeURIComponent(e)))}async function m(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"month",n=arguments.length>1?arguments[1]:void 0,t="/api/stats/trend?period=".concat(e);return n&&(t+="&month=".concat(n)),a(t)}async function p(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all",t="/api/stats/category?type=".concat(n);return e&&(t+="&mon