四端上传

This commit is contained in:
tianmo committed 2026-09-29 15:25:40 +08:00
1 parent 25bbb5f9c8
commit c6e2cb4d5b
276 files changed
+17812 -3

No files matched your search

@@ -0,0 +1,2 @@
(()=>{var a={};a.id=572,a.ids=[572],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},1025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},1547:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>i});var d=c(3910),e=c(8823),f=c(702),g=c(4939);let h={1:"订单购买",2:"历史数据",3:"后台发放"};function i(){let[a,b]=(0,e.useState)([]),[c,i]=(0,e.useState)(0),[j,k]=(0,e.useState)(1),[l,m]=(0,e.useState)(""),[n,o]=(0,e.useState)(""),[p,q]=(0,e.useState)(null),[r,s]=(0,e.useState)({nickname:"",headicon_id:"0",status:"1"}),[t,u]=(0,e.useState)([]),[v,w]=(0,e.useState)([]),[x,y]=(0,e.useState)(""),z=(0,e.useCallback)((a,c)=>{o(""),f.F.listUsers(a,20,c).then(a=>{b(a.items),i(a.total),k(a.page)}).catch(a=>o(a.message))},[]),A=a=>{f.F.listEntitlements(a).then(a=>w(a)).catch(()=>w([]))},B=Math.max(1,Math.ceil(c/20));return(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsx)("h1",{className:"text-lg font-semibold text-gray-900",children:"用户"}),(0,d.jsx)(g.$T,{message:n}),(0,d.jsxs)(g.Zp,{title:`共 ${c} 位用户`,action:(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(g.pd,{value:l,onChange:m,placeholder:"昵称或 openid…"}),(0,d.jsx)(g.$n,{variant:"ghost",onClick:()=>z(1,l),children:"搜索"})]}),children:[0===a.length?(0,d.jsx)(g.Sv,{}):(0,d.jsx)("div",{className:"overflow-x-auto",children:(0,d.jsxs)("table",{className:"w-full text-sm",children:[(0,d.jsx)("thead",{children:(0,d.jsxs)("tr",{className:"border-b border-gray-200 text-left text-xs text-gray-500",children:[(0,d.jsx)("th",{className:"px-2 py-2",children:"ID"}),(0,d.jsx)("th",{className:"px-2 py-2",children:"昵称"}),(0,d.jsx)("th",{className:"px-2 py-2",children:"已购课程"}),(0,d.jsx)("th",{className:"px-2 py-2",children:"状态"}),(0,d.jsx)("th",{className:"px-2 py-2",children:"最后登录"}),(0,d.jsx)("th",{className:"px-2 py-2 text-right",children:"操作"})]})}),(0,d.jsx)("tbody",{children:a.map(a=>(0,d.jsxs)("tr",{className:"border-b border-gray-100 hover:bg-gray-50",children:[(0,d.jsx)("td",{className:"px-2 py-2 text-gray-400",children:a.id}),(0,d.jsx)("td",{className:"px-2 py-2",children:a.nickname||(0,d.jsx)("span",{className:"text-gray-400",children:"游客"})}),(0,d.jsx)("td",{className:"px-2 py-2",children:a.entitlement_count}),(0,d.jsx)("td",{className:"px-2 py-2",children:1===a.status?(0,d.jsx)("span",{className:"text-green-600",children:"正常"}):(0,d.jsx)("span",{className:"text-red-600",children:"封禁"})}),(0,d.jsx)("td",{className:"px-2 py-2 text-gray-500",children:a.last_login_at?String(a.last_login_at).slice(0,10):"—"}),(0,d.jsx)("td",{className:"px-2 py-2 text-right",children:(0,d.jsx)(g.$n,{variant:"ghost",onClick:()=>{q(a),s({nickname:a.nickname??"",headicon_id:String(a.headicon_id),status:String(a.status)}),y(""),A(a.id)},children:"编辑 / 权益"})})]},a.id))})]})}),(0,d.jsxs)("div",{className:"mt-4 flex items-center justify-between text-sm text-gray-500",children:[(0,d.jsxs)("span",{children:["第 ",j," / ",B," 页"]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(g.$n,{variant:"ghost",disabled:j<=1,onClick:()=>z(j-1,l),children:"上一页"}),(0,d.jsx)(g.$n,{variant:"ghost",disabled:j>=B,onClick:()=>z(j+1,l),children:"下一页"})]})]})]}),(0,d.jsx)(g.aF,{open:null!==p,title:`用户 #${p?.id??""}`,onClose:()=>q(null),footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(g.$n,{variant:"ghost",onClick:()=>q(null),children:"关闭"}),(0,d.jsx)(g.$n,{onClick:()=>{p&&(o(""),f.F.updateUser(p.id,{nickname:r.nickname,headicon_id:Number(r.headicon_id),status:Number(r.status)}).then(()=>{q(null),z(j,l)}).catch(a=>o(a.message)))},children:"保存"})]}),children:(0,d.jsxs)("div",{className:"space-y-5",children:[(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"mb-1 block text-sm text-gray-600",children:"昵称"}),(0,d.jsx)(g.pd,{value:r.nickname,onChange:a=>s({...r,nickname:a})})]}),(0,d.jsxs)("div",{className:"flex gap-3",children:[(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("label",{className:"mb-1 block text-sm text-gray-600",children:"头像序号"}),(0,d.jsx)(g.pd,{value:r.headicon_id,onChange:a=>s({...r,headicon_id:a}),type:"number"})]}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("label",{className:"mb-1 block text-sm text-gray-600",children:"账号状态"}),(0,d.jsx)(g.l6,{value:r.status,onChange:a=>s({...r,status:a}),options:[{value:1,label:"正常"},{value:0,label:"封禁"}]})]})]})]}),(0,d.jsxs)("div",{className:"border-t border-gray-200 pt-4",children:[(0,d.jsx)("h4",{className:"mb-2 text-sm font-medium text-gray-800",children:"课程权益"}),(0,d.jsx)("p",{className:"mb-2 text-xs text-gray-500",children:"这是原「口令码」的替代:有人拿旧码来找你时,在这里给他发对Line truncated
see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:w.CachedRouteKind.APP_PAGE,html:l,headers:o,rscData:m.flightData,postponed:m.postponed,status:m.statusCode,segmentData:m.segmentData},cacheControl:n}},n=async({hasResolved:c,previousCacheEntry:f,isRevalidating:g,span:i})=>{let j,k=!1===L.isDev,l=c||b.writableEnded;if(ai&&ac&&!f&&!O)return(null==ad?void 0:ad.render404)?await ad.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(aj&&(j=(0,x.parseFallbackField)(aj.fallback)),j===x.FallbackMode.PRERENDER&&(0,v.isBot)(am)&&(!as||ao)&&(j=x.FallbackMode.BLOCKING_STATIC_RENDER),(null==f?void 0:f.isStale)===-1&&(ai=!0),ai&&(j!==x.FallbackMode.NOT_FOUND||f)&&(j=x.FallbackMode.BLOCKING_STATIC_RENDER),!O&&j!==x.FallbackMode.BLOCKING_STATIC_RENDER&&aC&&!l&&!aa&&U&&(k||!ak)){let b;if((k||aj)&&j===x.FallbackMode.NOT_FOUND)throw new C.NoFallbackError;if(as&&!aq){let c="string"==typeof(null==aj?void 0:aj.fallback)?aj.fallback:k?ah:null;if(b=await L.handleResponse({cacheKey:c,req:a,nextConfig:ae,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:_,isRoutePPREnabled:as,responseGenerator:async()=>m({span:i,postponed:void 0,fallbackRouteParams:k||au?(0,o.u)(ah):null}),waitUntil:d.waitUntil}),null===b)return null;if(b)return delete b.cacheControl,b}}let n=ai||g||!av?void 0:av;if(at&&void 0!==n)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:w.CachedRouteKind.PAGES,html:y.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let p=U&&as&&((0,h.getRequestMeta)(a,"renderFallbackShell")||au)?(0,o.u)(ag):null;return m({span:i,postponed:n,fallbackRouteParams:p})},p=async c=>{var f,g,i,j,k;let l,o=await L.handleResponse({cacheKey:aB,responseGenerator:a=>n({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ai,isRoutePPREnabled:as,req:a,nextConfig:ae,prerenderManifest:_,waitUntil:d.waitUntil});if(aa&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),L.isDev&&b.setHeader("Cache-Control","no-store, must-revalidate"),!o){if(aB)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=o.value)?void 0:f.kind)!==w.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=o.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let p="string"==typeof o.value.postponed;al&&!aw&&(!p||ap)&&(O||b.setHeader("x-nextjs-cache",ai?"REVALIDATED":o.isMiss?"MISS":o.isStale?"STALE":"HIT"),b.setHeader(u.NEXT_IS_PRERENDER_HEADER,"1"));let{value:q}=o;if(av)l={revalidate:0,expire:void 0};else if(O&&aq&&!ap&&as)l={revalidate:0,expire:void 0};else if(!L.isDev)if(aa)l={revalidate:0,expire:void 0};else if(al){if(o.cacheControl)if("number"==typeof o.cacheControl.revalidate){if(o.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${o.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});l={revalidate:o.cacheControl.revalidate,expire:(null==(j=o.cacheControl)?void 0:j.expire)??ae.expireTime}}else l={revalidate:z.CACHE_ONE_YEAR,expire:void 0}}else b.getHeader("Cache-Control")||(l={revalidate:0,expire:void 0});if(o.cacheControl=l,"string"==typeof ax&&(null==q?void 0:q.kind)===w.CachedRouteKind.APP_PAGE&&q.segmentData){b.setHeader(u.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=q.headers)?void 0:k[z.NEXT_CACHE_TAGS_HEADER];O&&al&&c&&"string"==typeof c&&b.setHeader(z.NEXT_CACHE_TAGS_HEADER,c);let d=q.segmentData.get(ax);return void 0!==d?(0,B.sendRenderResult)({req:a,res:b,generateEtags:ae.generateEtags,poweredByHeader:ae.poweredByHeader,result:y.default.fromStatic(d,u.RSC_CONTENT_TYPE_HEADER),cacheControl:o.cacheControl}):(b.statusCode=204,(0,B.sendRenderResult)({req:a,res:b,generateEtags:ae.generateEtags,poweredByHeader:ae.poweredByHeader,result:y.default.EMPTY,cacheControl:o.cacheControl}))}let r=(0,h.getRequestMeta)(a,"onCacheEntry");if(r&&await r({...o,value:{...o.value,kind:"PAGE"}},{url:(0,h.getRequestMeta)(a,"initURL")}))return null;if(p&&av)throw Object.defineProperty(Error("Invariant: postponed state should not be present on a resume request"),"__NEXT_ERROR_CODE",{value:"E396",enumerable:!1,configurable:!0});if(q.headers){let a={...q.headers};for(let[c,d]of(O&&al||delete a[z.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let s=null==(g=q.headers)?void 0:g[z.NEXT_CACHE_TAGS_HEADER];if(O&&al&&s&&"string"==typeof s&&b.setHeader(z.NEXT_CACHE_TAGS_HEADER,s),!q.status||aq&&as||(b.statusCode=q.status),!O&&q.status&&G.Redir Line truncated