四端上传

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 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[572],{1910:(e,t,s)=>{"use strict";s.d(t,{L:()=>r,M3:()=>i,WG:()=>l,gf:()=>n});let a="yelay_admin_token";function n(){var e;return null!=(e=window.localStorage.getItem(a))?e:""}function l(e){window.localStorage.setItem(a,e)}function r(){window.localStorage.removeItem(a)}function i(){return""!==n()}},2787:(e,t,s)=>{"use strict";s.d(t,{$T:()=>o,$n:()=>n,Sv:()=>m,TM:()=>r,Zp:()=>c,aF:()=>d,l6:()=>i,pd:()=>l});var a=s(1333);function n(e){let{children:t,onClick:s,variant:n="primary",disabled:l,type:r="button"}=e;return(0,a.jsx)("button",{type:r,onClick:s,disabled:l,className:"rounded-md px-3 py-1.5 text-sm font-medium transition disabled:cursor-not-allowed disabled:opacity-50 ".concat({primary:"bg-blue-600 text-white hover:bg-blue-700",ghost:"bg-white text-gray-700 border border-gray-300 hover:bg-gray-50",danger:"bg-red-600 text-white hover:bg-red-700"}[n]),children:t})}function l(e){let{value:t,onChange:s,placeholder:n,type:l="text"}=e;return(0,a.jsx)("input",{type:l,value:t,placeholder:n,onChange:e=>s(e.target.value),className:"w-full rounded-md border border-gray-300 px-3 py-1.5 text-sm outline-none focus:border-blue-500"})}function r(e){let{value:t,onChange:s}=e;return(0,a.jsx)("textarea",{value:t,rows:6,onChange:e=>s(e.target.value),className:"w-full rounded-md border border-gray-300 px-3 py-1.5 font-mono text-xs outline-none focus:border-blue-500"})}function i(e){let{value:t,onChange:s,options:n}=e;return(0,a.jsx)("select",{value:t,onChange:e=>s(e.target.value),className:"w-full rounded-md border border-gray-300 px-3 py-1.5 text-sm outline-none focus:border-blue-500",children:n.map(e=>(0,a.jsx)("option",{value:String(e.value),children:e.label},e.value))})}function c(e){let{title:t,children:s,action:n}=e;return(0,a.jsxs)("section",{className:"rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(t||n)&&(0,a.jsxs)("header",{className:"mb-4 flex items-center justify-between",children:[t&&(0,a.jsx)("h2",{className:"text-base font-semibold text-gray-900",children:t}),n]}),s]})}function d(e){let{open:t,title:s,onClose:n,children:l,footer:r}=e;return t?(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",children:(0,a.jsxs)("div",{className:"max-h-[85vh] w-full max-w-2xl overflow-auto rounded-lg bg-white shadow-xl",children:[(0,a.jsxs)("header",{className:"flex items-center justify-between border-b border-gray-200 px-5 py-3",children:[(0,a.jsx)("h3",{className:"text-base font-semibold",children:s}),(0,a.jsx)("button",{onClick:n,className:"text-gray-400 hover:text-gray-600","aria-label":"关闭",children:"✕"})]}),(0,a.jsx)("div",{className:"px-5 py-4",children:l}),r&&(0,a.jsx)("footer",{className:"flex justify-end gap-2 border-t border-gray-200 px-5 py-3",children:r})]})}):null}function o(e){let{message:t,kind:s="error"}=e;return t?(0,a.jsx)("div",{className:"mb-3 rounded-md border px-3 py-2 text-sm ".concat("error"===s?"bg-red-50 text-red-700 border-red-200":"bg-green-50 text-green-700 border-green-200"),children:t}):null}function m(e){let{text:t="暂无数据"}=e;return(0,a.jsx)("div",{className:"py-10 text-center text-sm text-gray-400",children:t})}},3308:(e,t,s)=>{Promise.resolve().then(s.bind(s,7249))},7249:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var a=s(1333),n=s(4705),l=s(8312),r=s(2787);let i={1:"订单购买",2:"历史数据",3:"后台发放"};function c(){var e;let[t,s]=(0,n.useState)([]),[c,d]=(0,n.useState)(0),[o,m]=(0,n.useState)(1),[x,h]=(0,n.useState)(""),[u,g]=(0,n.useState)(""),[b,p]=(0,n.useState)(null),[y,j]=(0,n.useState)({nickname:"",headicon_id:"0",status:"1"}),[v,f]=(0,n.useState)([]),[N,w]=(0,n.useState)([]),[S,k]=(0,n.useState)(""),C=(0,n.useCallback)((e,t)=>{g(""),l.F.listUsers(e,20,t).then(e=>{s(e.items),d(e.total),m(e.page)}).catch(e=>g(e.message))},[]);(0,n.useEffect)(()=>{C(1,""),l.F.listResource("courses",{page:1,pageSize:100}).then(e=>f(e.items)).catch(()=>f([]))},[C]);let _=e=>{l.F.listEntitlements(e).then(e=>w(e)).catch(()=>w([]))},O=Math.max(1,Math.ceil(c/20));return(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("h1",{className:"text-lg font-semibold text-gray-900",children:"用户"}),(0,a.jsx)(r.$T,{message:u}),(0,a.jsxs)(r.Zp,{title:"共 ".concat(c," 位用户"),action:(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.pd,{value:x,onChange:h,placeholder:"昵称或 openid…"}),(0,a.jsx)(r.$n,{variant:"ghost",onClick:()=>C(1,x),children:"搜索"})]}),children:[0===t.length?(0,a.jsx)(r.Sv,{}):(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-gray-200 text-left text-xs text-gray-500",children:[(0,a.jsx)("th",{className:"px-2 py-2",children:"ID"}),(0,a.jsx)("th",{className:"px-2 py-2",children:"昵称"}),(0,a.jsx)("th",{className:"px-2 py-2",children:"已购课程"}),(0,a.jsx)("th",{className:"px-2Line truncated