四端上传
This commit is contained in:
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([[1],{58:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var a=n(1333),r=n(4705),s=n(8312),o=n(2787);function l(){let[e,t]=(0,r.useState)([]),[n,l]=(0,r.useState)({}),[i,d]=(0,r.useState)(""),[c,u]=(0,r.useState)(""),[m,h]=(0,r.useState)(""),g=()=>{d(""),s.F.listSettings().then(e=>{t(e);let n={};e.forEach(e=>{var t;n[e.key]=null!=(t=e.value)?t:""}),l(n)}).catch(e=>d(e.message))};return(0,r.useEffect)(g,[]),(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)(o.$T,{message:i}),c&&(0,a.jsx)(o.$T,{message:c,kind:"success"}),(0,a.jsxs)(o.Zp,{title:"站点文案与开关",children:[(0,a.jsx)("p",{className:"mb-4 text-xs text-gray-500",children:"小程序首屏显示的标题、我的页面菜单文案、版本号等都在这里。修改后小程序下拉刷新即可生效。"}),(0,a.jsxs)("div",{className:"space-y-3",children:[e.map(e=>{var t;return(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsxs)("div",{className:"w-56 shrink-0",children:[(0,a.jsx)("div",{className:"text-sm text-gray-700",children:e.remark||e.key}),(0,a.jsx)("div",{className:"font-mono text-xs text-gray-400",children:e.key})]}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsx)(o.pd,{value:null!=(t=n[e.key])?t:"",onChange:t=>l({...n,[e.key]:t})})}),(0,a.jsx)(o.$n,{variant:"ghost",onClick:()=>{var t,a;h(e.key),d(""),u(""),s.F.upsertSetting(e.key,null!=(t=n[e.key])?t:"",null!=(a=e.remark)?a:void 0).then(()=>{u("已保存:".concat(e.key)),g()}).catch(e=>d(e.message)).finally(()=>h(""))},disabled:m===e.key,children:m===e.key?"保存中…":"保存"})]},e.key)}),0===e.length&&(0,a.jsx)("div",{className:"py-6 text-center text-sm text-gray-400",children:"暂无配置"})]})]})]})}},1910:(e,t,n)=>{"use strict";n.d(t,{L:()=>o,M3:()=>l,WG:()=>s,gf:()=>r});let a="yelay_admin_token";function r(){var e;return null!=(e=window.localStorage.getItem(a))?e:""}function s(e){window.localStorage.setItem(a,e)}function o(){window.localStorage.removeItem(a)}function l(){return""!==r()}},2787:(e,t,n)=>{"use strict";n.d(t,{$T:()=>c,$n:()=>r,Sv:()=>u,TM:()=>o,Zp:()=>i,aF:()=>d,l6:()=>l,pd:()=>s});var a=n(1333);function r(e){let{children:t,onClick:n,variant:r="primary",disabled:s,type:o="button"}=e;return(0,a.jsx)("button",{type:o,onClick:n,disabled:s,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"}[r]),children:t})}function s(e){let{value:t,onChange:n,placeholder:r,type:s="text"}=e;return(0,a.jsx)("input",{type:s,value:t,placeholder:r,onChange:e=>n(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 o(e){let{value:t,onChange:n}=e;return(0,a.jsx)("textarea",{value:t,rows:6,onChange:e=>n(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 l(e){let{value:t,onChange:n,options:r}=e;return(0,a.jsx)("select",{value:t,onChange:e=>n(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:r.map(e=>(0,a.jsx)("option",{value:String(e.value),children:e.label},e.value))})}function i(e){let{title:t,children:n,action:r}=e;return(0,a.jsxs)("section",{className:"rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(t||r)&&(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}),r]}),n]})}function d(e){let{open:t,title:n,onClose:r,children:s,footer:o}=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:n}),(0,a.jsx)("button",{onClick:r,className:"text-gray-400 hover:text-gray-600","aria-label":"关闭",children:"✕"})]}),(0,a.jsx)("div",{className:"px-5 py-4",children:s}),o&&(0,a.jsx)("footer",{className:"flex justify-end gap-2 border-t border-gray-200 px-5 py-3",children:o})]})}):null}function c(e){let{message:t,kind:n="error"}=e;return t?(0,a.jsx)("div",{className:"mb-3 rounded-md border px-3 py-2 text-sm ".concat("error"===n?"bg-red-50 text-red-700 border-red-200":"bg-green-50 text-green-700 border-green-200"),children:t}):null}function u(e){let{text:t="暂无数据"}=e;return(0,a.jsx)("div",{className:"py-10 text-center text-sm text-gray-400",chilLine truncated
|
||||
Reference in new issue
Block a user