PageSourceSearch

https://web.laifaxin.com/assets/index-DZo8HPsU.js

js laifaxin.com collected 2026-09-24 13:31:03 UTC 8,099 bytes, 1 lines download raw bytes

1import{j as e,bM as N,p as _,I as A,cJ as H,D as $,a as E,b as q,x as y,s as V,B,d as G,ca as O,u as J,aH as U,by as Y,q as Q,bz as X,T as Z,b8 as M,bi as ee,n as te,c4 as ae,aP as oe}from"./@mui-DIvZKyk5.js";import{g as w,bl as ne,y as D,cj as W,av as se,q as ie,r as le,F as re,w as I,aw as ce,ck as de,f as me,o as ue,ac as he,a3 as pe,as as xe,b8 as ge,cl as fe,c as je}from"./index-ChlzNN7f.js";import{r as C}from"./@dnd-kit-lk9a0Fnl.js";import{f as k}from"./table-pMgz8yty.js";import"./recoil-Qt05xcsG.js";import"./lodash-BGDvc8uJ.js";import"./cheerio-CC_BxCXR.js";import"./parse5-CnDYI-t1.js";import{a as Se}from"./time-cells-CKBQdk27.js";import{f as R}from"./search-3GzqUN1l.js";import{a as ve}from"./schema-DDUQhUho.js";import"./i18next-vSwsns86.js";import"./framer-motion-zf-c6Y7J.js";import"./ali-oss-C0WPLnSs.js";import"./apexcharts-B416p9gJ.js";function be({tableData:r,loading:g,flushData:v,total:m,page:i,pageSize:o,onPageChange:f,sortModel:u,onSortChange:h,onSelectChange:j,selectKeys:l}){const{run:p}=w(W,{manual:!0,onSuccess:({success:t})=>{t&&(D("删除成功"),v())}}),c=t=>{const{_id:n}=t;return e.jsx(_,{title:"删除",children:e.jsx(A,{onClick:()=>p({selectKeys:[n],selectTotal:1}),children:e.jsx(H,{fontSize:"small"})})})},x=[{headerName:"域名",field:"domain",width:256},{headerName:"备注",field:"comment",minWidth:256},{headerName:"创建者",field:"userid",minWidth:128,renderCell:({row:t})=>e.jsx(ne,{value:t.userid})},{headerName:"创建时间",field:"create_time",renderCell:({row:t})=>Se(t.create_time),width:160},{headerName:"操作",field:"actions",headerClassName:"actions-header",width:64,renderCell:({row:t})=>c(t)}];return e.jsx(N,{getRowId:t=>t==null?void 0:t._id,loading:g,disableColumnMenu:!0,checkboxSelection:!0,disableRowSelectionOnClick:!0,rows:r,columns:x,pagination:!0,paginationMode:"server",rowCount:m,pageSizeOptions:[10,20,50,100],columnHeaderHeight:l.length?0:56,sx:{minHeight:l.length?438:500,"& .MuiDataGrid-row:hover":{color:"primary.main"},"& .actions-header":{backgroundColor:"background.neutral"}},paginationModel:{page:i,pageSize:o},onPaginationModelChange:({page:t,pageSize:n})=>f(t,n),sortingMode:"server",sortModel:u,rowSelectionModel:l,onSortModelChange:t=>h(t),onRowSelectionModelChange:t=>j("current",t.length,t),initialState:{pinnedColumns:{right:["actions"]}}})}const Ce={domainText:"",comment:""};function Te({open:r,onClose:g,onSuccess:v}){const[m,i]=C.useState([]),o=se(),f=ie({resolver:le(ve),defaultValues:Ce}),{setValue:u,handleSubmit:h,formState:{isSubmitting:j}}=f,{run:l,loading:p}=w(de,{manual:!0,onSuccess:({success:t,data:n})=>{if(t&&n){const{saved:b}=n;D(`成功增加域名黑名单数量:${b}`),u("domainText",""),u("comment",""),i([]),v(),g()}}}),c=h(async t=>{const{domainText:n,comment:b}=t,T=R(n);if(T.length<=0){D("非法域名格式",{variant:"error"});return}l({domains:T,comment:b})}),x=t=>{const n=R(t);i(n)};return e.jsxs($,{open:r,onClose:g,fullWidth:!0,maxWidth:"xs",scroll:"body",translate:"no",children:[e.jsxs(re,{methods:f,onSubmit:c,children:[e.jsx(E,{id:"alert-dialog-title",children:"增加域名黑名单"}),e.jsx(q,{dividers:!0,sx:{minHeight:320,overflow:"auto"},children:e.jsxs(y,{spacing:3,sx:{mt:1},children:[e.jsx(I,{name:"domainText",label:"域名列表",placeholder:"可任意输入域名文本内容,自动识别,批量处理",helperText:"支持批量处理",multiline:!0,rows:5,fullWidth:!0,onBlur:t=>x(t.target.value),focused:!0,sx:{"& .MuiInputBase-root":{textarea:{maxWidth:1024}}}}),e.jsx(I,{name:"comment",label:"备注",placeholder:"备注信息"}),e.jsxs(y,{direction:"row",spacing:2,children:[e.jsxs(V,{variant:"body2",children:["有效域名数量 ",m.length]}),e.jsx(B,{size:"small",color:"primary",sx:{minWidth:32,mt:-.5},onClick:o.onOpen,children:"查看"})]})]})}),e.jsxs(G,{children:[e.jsx(B,{onClick:g,autoFocus:!0,variant:"outlined",children:"关闭"}),e.jsx(O,{color:"primary",type:"submit",variant:"contained",loading:j||p,children:"提交"})]})]}),e.jsx(ce,{id:"domainsPopover",open:o.open,onClose:o.onClose,sx:{minWidth:256,p:2,minHeight:128,maxHeight:384,overflow:"auto"},hiddenArrow:!0,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:m.length?m.map((t,n)=>e.jsx("div",{children:t})):e.jsx("div",{children:"域名结果为空"})})]})}const ye=[{value:"emailSave",label:"邮箱提取黑名单",icon:e.jsx(_,{title:"黑名单中的域名不再提取相关邮箱",children:e.jsx(oe,{fontSize:"small"})})}];function we(){const[r,g]=C.useState({status:"emailSave"}),[v,m]=C.useState(!1),[i,o]=me({countData:{},pageSize:10,page:0,total:0,tableData:[],sortModel:[{field:"create_time",sort:"desc"}],keyword:"",selectKeys:[],selectOption:"current",selectTotal:0}),f=J(),{page:u,pageSize:h,total:j,sortModel:l,tableData:p,keyword:c}=i,x=ue(),{run:t,refresh:n,loading:b}=w(fe,{manual:!0,loadingDelay:300,debounceWait:300,pollingInterval:60*1e3,onSuccess:a=>{const{data:s}=a;if(!s)return;const{current:d,list:S,total:L}=s??{};S&&o({tableData:S,page:d-1,total:L})}}),{run:T,loading:P}=w(W,{manual:!0,onSuccess:({success:a})=>{a&&(D("删除成功"),o({selectKeys:[],selectTotal:0,selectOption:"current"}),x.onFalse(),n())}}),z=()=>{const a=k(l);t({current:u+1,pageSize:h,filter:r,sort:a,keyword:c})};C.useEffect(()=>{z()},[r,h,u,l]),C.useEffect(()=>{const a=k(l);t({current:1,pageSize:h,filter:r,sort:a,keyword:c})},[c]);const F=a=>{o({keyword:a})},K=()=>{const{selectKeys:a,selectTotal:s,selectOption:d}=i,S=k(l);
1T({selectKeys:a,selectTotal:s,selectOption:d,filter:r,keyword:c,selectSort:S})};return e.jsx(he,{children:e.jsxs(U,{children:[e.jsx(Y,{textColor:"primary",indicatorColor:"primary",value:r.status,onChange:(a,s)=>{g({...r,status:s}),o({page:0})},sx:{px:2.5,boxShadow:a=>`inset 0 -2px 0 0 ${Q(a.palette.grey[500],.08)}`},TabIndicatorProps:{sx:{background:f.palette.primary.main,borderBottom:`2px solid ${f.palette.primary.main}`}},children:ye.map(a=>e.jsx(X,{iconPosition:"end",value:a.value,label:a.label,icon:a.icon},a.value))}),e.jsxs(y,{alignItems:{xs:"flex-end",md:"center"},direction:{xs:"column",md:"row"},spacing:2,sx:{p:2},children:[e.jsx(Z,{size:"small",sx:{flexShrink:0,width:{xs:1,md:256}},value:c,onChange:a=>F(a.target.value),onBlur:()=>z(),placeholder:"域名或备注",InputProps:{startAdornment:e.jsx(M,{position:"start",children:e.jsx(pe,{icon:"eva:search-fill",sx:{color:"text.disabled"}})}),endAdornment:c?e.jsx(M,{position:"end",children:e.jsx(A,{onClick:()=>F(""),edge:"end",size:"small",children:e.jsx(ee,{fontSize:"small"})})}):void 0}}),e.jsx(te,{flexGrow:1,sx:{display:{xs:"none",md:"block"}}}),e.jsx(B,{startIcon:e.jsx(ae,{}),variant:"contained",color:"primary",onClick:()=>m(!0),children:"增加黑名单"})]}),e.jsx(xe,{rowCount:p.length,rowTotal:j,selectTotal:i.selectTotal,selectOption:i.selectOption,action:e.jsx(y,{direction:"row",children:e.jsx(O,{color:"primary",onClick:x.onTrue,loading:P,loadingPosition:"start",startIcon:e.jsx(H,{}),variant:"contained",children:"批量删除"})}),sx:{height:56},onSelectAllRows:a=>{if(a){const s=p.map(d=>d._id);o({selectKeys:s,selectTotal:s.length,selectOption:"current"})}else o({selectKeys:[],selectTotal:0,selectOption:"current"})},onSelectChange:(a,s)=>{const d=p.map(S=>S._id);o({selectKeys:d,selectTotal:s,selectOption:a})}}),e.jsx(be,{tableData:p,loading:b,flushData:()=>n(),total:j,page:u,pageSize:h,onPageChange:(a,s)=>o({page:a,pageSize:s}),sortModel:l,onSortChange:a=>o({sortModel:a}),selectKeys:i.selectKeys,onSelectChange:(a,s,d)=>o({selectOption:a,selectTotal:s,selectKeys:d})}),e.jsx(Te,{open:v,onClose:()=>m(!1),onSuccess:()=>n()}),e.jsx(ge,{open:x.value,onClose:x.onFalse,title:"批量删除",content:e.jsxs(e.Fragment,{children:["确认删除 ",e.jsxs("strong",{children:[" ",i.selectTotal," "]})," 项数据? 该操作不可恢复"]}),action:e.jsx(O,{variant:"contained",color:"primary",onClick:K,loading:P,children:"确认删除"})})]})})}function Le(){return e.jsxs(e.Fragment,{children:[e.jsx(je,{children:e.jsx("title",{children:" 域名黑名单 - 来发信"})}),e.jsx(we,{})]})}export{Le as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.