1import{X as Z,F as H,w as W,U as k,i as y,c as ne,r as N,M as ae,m,K as Q,fA as F,j as e,h as se,S as oe,I as j,V as ie,fB as re,T as R,G as z,B as V,de as O,aj as ce}from"./umi-5452750e.js";import{F as T}from"./index-64f771f8.js";import{M as X}from"./index-5c830482.js";import{R as G}from"./index-4cd27920.js";import{T as A}from"./index-2e32e661.js";import{P as J}from"./index-37efdbfb.js";import"./hooks-f46b5cd7.js";import{U as le}from"./index-14a3ec2a.js";import{S as _e,B as U}from"./dto-types-cc9b841d.js";import{s as de,v as me,P as pe,S as ue}from"./index-8b77fae3.js";import{f as be,h as he,j as ge}from"./noticeSettingController-79be71d0.js";import{I as fe}from"./index-42e9b7f0.js";import{E as xe}from"./index-d8befdda.js";import"./row-ede1f428.js";import"./responsiveObserve-0f96a4f4.js";import"./PlusOutlined-83b7c9cb.js";import"./index-22b39219.js";import"./index-9862e24a.js";import"./index-59243ca0.js";import"./company-9e3795b2.js";import"./useInfiniteQuery-fe8f12bb.js";import"./companyController-34d1f97b.js";import"./useCurrentUser-bebdd663.js";import"./routes-ab517e69.js";import"./lodash-aa4cc2a7.js";import"./index-2a3b736f.js";import"./tags-28ae3078.js";import"./categoryController-35faf781.js";import"./index-7de4ccdf.js";import"./index-da72bee4.js";import"./index-fee05846.js";import"./dateUtils-9195df72.js";import"./debounceTime-0801bb8a.js";import"./async-85b13b10.js";import"./innerSubscribe-08dd6a4b.js";import"./index-528edbbd.js";import"./eventController-6b6a1e8a.js";import"./index-836ccca8.js";import"./index-d1680d44.js";import"./index-f19866a6.js";import"./useBreakpoint-7ecf8b4c.js";import"./useForceUpdate-f4d44bb3.js";import"./Pagination-6ff34597.js";import"./index-a4a7fe25.js";import"./websiteFormController-bf80c068.js";import"./index-68f691ee.js";import"./index-d8f12df6.js";import"./index-18e7d41b.js";import"./progress-44818182.js";import"./index-5e718e14.js";import"./Dragger-2a3c5807.js";import"./index-3172fbc1.js";import"./download-c3e67350.js";import"./index-84b8aa0a.js";import"./v4-ede1a4b5.js";import"./tap-cff19e71.js";import"./index-858effdc.js";import"./Table-bb16a1eb.js";import"./index-76c69702.js";import"./index-8a9d928c.js";import"./index-38912bf0.js";import"./BasicLayout.less_used_.module-087e7796.js";import"./link-6b2c0303.js";import"./index-e2a74dda.js";import"./index-5db21ca7.js";import"./util-9af00c7b.js";import"./index-acc65853.js";import"./index-269e50f5.js";import"./index-7cdbdb47.js";import"./index-7f876f33.js";import"./index-1888e7e2.js";import"./browser-9d43139f.js";import"./index-f8b2944f.js";import"./index-29b58616.js";import"./index-76db8a8e.js";import"./index-bc7f3930.js";import"./index-486a670b.js";import"./index-d08a55bb.js";import"./account-0c4b0789.js";import"./import-e786d456.js";import"./index-b144c998.js";async function qe(d){return Z("/api/uc/v1/email/smtpConfig/detail",{method:"GET",...d||{}})}async function ve(d,t){return Z("/api/uc/v1/email/smtpConfig/saveOrUpdate",{method:"POST",headers:{"Content-Type":"application/json"},data:d,...t||{}})}const ye="_iconfont_q22bn_128",je="_f_l_q22bn_154",Ce="_f_r_q22bn_157",Se="_clear_q22bn_160",we="_alm_q22bn_165",Ne="_draggableArea_q22bn_170",Te="_draggableArea1_q22bn_171",ke="_move_field_q22bn_179",Pe="_ondrag_field_q22bn_188",Le="_ondrop_field_q22bn_197",Ee="_module_additem_q22bn_207",Ae="_business_status_q22bn_225",Be="_steps_box_q22bn_230",Ie="_collapse_q22bn_234",Me="_a_q22bn_165",Fe="_b_q22bn_113",Oe="_text_q22bn_301",De="_time_q22bn_312",Ue="_step_item_q22bn_315",$e="_success_q22bn_321",Ke="_fail_q22bn_341",Qe="_flexFill_q22bn_526",Re="_header_addicon_q22bn_605",ze="_opened_q22bn_616",Ve="_open_q22bn_616",Ge="_form_name_q22bn_691",Je="_drawer_box_1_q22bn_1190",Ze="_drawer_box_2_q22bn_1194",He="_customer_drawer_1_q22bn_1198",We="_customer_drawer_2_q22bn_1202",Xe="_basic_drawer_1_q22bn_1206",Ye="_basic_drawer_2_q22bn_1210",et="_header_title_q22bn_1214",tt="_title_q22bn_1221",nt="_title_r_q22bn_1239",at="_add_page_q22bn_1243",st="_delete_page_q22bn_1246",ot="_form_title_sign_q22bn_1251",it="_form_title_q22bn_1251",rt="_form_desc_q22bn_1268",ct="_tab_title_q22bn_1271",lt="_h_title_q22bn_1279",_t="_active_q22bn_1296",dt="_tab_title_btn_q22bn_1316",mt="_upload_q22bn_1329",pt="_btn_q22bn_1161",ut="_success_btn_q22bn_1339",bt="_main_btn_q22bn_1340",ht="_main_cancel_q22bn_1341",gt="_gray_cancel_q22bn_1342",ft="_follow_q22bn_1379",xt="_no_follow_q22bn_1382",qt="_form_style_q22bn_1385",vt="_spanBtn_q22bn_1402",yt="_last_price_q22bn_1413",jt="_backBg_q22bn_1416",Ct="_price_q22bn_1420",St="_other_num_q22bn_1434",wt="_otherNumLabel_q22bn_1443",Nt="_recommend_q22bn_1448",Tt="_price_num_q22bn_1464",kt="_sms_num_q22bn_1471",Pt="_pay_method_q22bn_1485",Lt="_left_q22bn_1493",Et="_clicked_q22bn_1501",At="_pay_online_q22bn_1504",Bt="_clicked_line_q22bn_1515",It="_alipay_q22bn_1523",Mt="_right_q22bn_1526",Ft="_qr_code_q22bn_1530",Ot="_pay_content_q22bn_1540",Dt="_pay_price_q22bn_1545",Ut="_pay_scan_code_q22bn_1557",$t="_open_app_q22bn_1565",Kt="_scan_q22bn_1574",Qt="_autograph_box_q22bn_1579",Rt="_note_box_q22bn_1582",zt="_contact_q22bn_1587",Vt="_note_con_q22bn_1592",Gt="_top_q22bn_1595",Jt="_num_q22bn_1605",Zt="_recharge_q22bn_1609",Ht="_input_q22bn_1614",Wt="_textarea_q22bn_1618",Xt="_button_q22bn_1077",Yt="_m_b_20_q22bn_1633",en="_spin_center_q22bn_1636",tn="_black_list_q22bn_1647",s={iconfont:ye,delete:"_delete_q22bn_142",f_l:je,f_r:Ce,clear:Se,alm:we,draggableArea:Ne,draggableArea1:Te,move_field:ke,ondrag_field:Pe,ondrop_field:Le,module_additem:Ee,"ps__rail-y":"_ps__rail-y_q22bn_221",business_status:Ae,steps_box:Be,collapse:Ie,a:Me,b:Fe,text:Oe,time:De,step_item:Ue,success:$e,fail:Ke,"ant-steps-small":"_ant-steps-small_q22bn_360","ant-steps-item-title":"_ant-steps-item-title_q22bn_360","ant-steps-item-wait":"_ant-steps-item-wait_q22bn_363","ant-steps-item-container":"_ant-steps-item-container_q22bn_363","ant-steps-item-content":"_ant-steps-item-content_q22bn_363","ant-steps-item-icon":"_ant-steps-item-icon_q22bn_371","ant-steps-item-process":"_ant-steps-item-process_q22bn_375","ant-steps-horizontal":"_ant-steps-horizontal_q22bn_378","ant-steps-label-vertical":"_ant-steps-label-vertical_q22bn_378","ant-steps-item":"_ant-steps-item_q22bn_360","ant-drawer":"_ant-drawer_q22bn_509","edui-default":"_edui-default_q22bn_509","edui-editor":"_edui-editor_q22bn_509","antd-style-anchor":"_antd-style-anchor_q22bn_512",flexFill:Qe,"ant-layout":"_ant-layout_q22bn_530","ant-layout-header":"_ant-layout-header_q22bn_534","ant-badge-count":"_ant-badge-count_q22bn_540","ant-pro-top-nav-header":"_ant-pro-top-nav-header_q22bn_552","ant-pro-top-nav-header-main":"_ant-pro-top-nav-header-main_q22bn_556","ant-pro-top-nav-header-logo":"_ant-pro-top-nav-header-logo_q22bn_560","ant-menu":"_ant-menu_q22bn_572","ant-menu-dark":"_ant-menu-dark_q22bn_572","ant-menu-sub":"_ant-menu-sub_q22bn_573","ant-pro-top-nav-header-menu":"_ant-pro-top-nav-header-menu_q22bn_577","ant-menu-horizontal":"_ant-menu-horizontal_q22bn_577","ant-menu-item":"_ant-menu-item_q22bn_581","ant-menu-submenu":"_ant-menu-submenu_q22bn_582","ant-menu-submenu-horizontal":"_ant-menu-submenu-horizontal_q22bn_585","ant-menu-submenu-title":"_ant-menu-submenu-title_q22bn_589","ant-menu-item-selected":"_ant-menu-item-selected_q22bn_592","ant-menu-submenu-popup":"_ant-menu-submenu-popup_q22bn_593","ant-menu-item-group-title":"_ant-menu-item-group-title_q22bn_597","antd-pro-components-global-header-index-right":"_antd-pro-components-global-header-index-right_q22bn_602",header_addicon:Re,"ant-dropdown-open":"_ant-dropdown-open_q22bn_612","antd-pro-components-global-header-index-dark":"_antd-pro-components-global-header-index-dark_q22bn_615","antd-pro-components-global-header-index-action":"_antd-pro-components-global-header-index-action_q22bn_615",opened:ze,"antd-pro-components-global-header-index-account":"_antd-pro-components-global-header-index-account_q22bn_629",open:Ve,"antd-pro-components-global-header-index-avatar":"_antd-pro-components-global-header-index-avatar_q22bn_637","antd-pro-components-select-lang-index-dropDown":"_antd-pro-components-select-lang-index-dropDown_q22bn_642","ant-pro-basicLayout-content":"_ant-pro-basicLayout-content_q22bn_661","ant-avatar-sm":"_ant-avatar-sm_q22bn_664","ant-btn":"_ant-btn_q22bn_668","ant-form":"_ant-form_q22bn_675","ant-form-item":"_ant-form-item_q22bn_679","ant-form-item-label":"_ant-form-item-label_q22bn_683","ant-form-item-explain":"_ant-form-item-explain_q22bn_686","ant-form-item-extra":"_ant-form-item-extra_q22bn_687",form_name:Ge,"ant-input"
1:"_ant-input_q22bn_704","ant-input-affix-wrapper":"_ant-input-affix-wrapper_q22bn_710","ant-select-focused":"_ant-select-focused_q22bn_719","ant-select-selector":"_ant-select-selector_q22bn_719","ant-select":"_ant-select_q22bn_719","ant-input-focused":"_ant-input-focused_q22bn_721","ant-select-selection-search-input":"_ant-select-selection-search-input_q22bn_733","ant-select-selection-placeholder":"_ant-select-selection-placeholder_q22bn_736","ant-select-single":"_ant-select-single_q22bn_739","ant-select-selection-item":"_ant-select-selection-item_q22bn_739","ant-select-borderless":"_ant-select-borderless_q22bn_742","ant-picker":"_ant-picker_q22bn_745","ant-select-arrow":"_ant-select-arrow_q22bn_748","ant-select-show-arrow":"_ant-select-show-arrow_q22bn_751","ant-picker-input":"_ant-picker-input_q22bn_761","ant-checkbox-checked":"_ant-checkbox-checked_q22bn_764","ant-checkbox-inner":"_ant-checkbox-inner_q22bn_764","ant-table-thead":"_ant-table-thead_q22bn_771","ant-table-column-sorters":"_ant-table-column-sorters_q22bn_777","ant-tabs":"_ant-tabs_q22bn_780","ant-tabs-extra-content":"_ant-tabs-extra-content_q22bn_783","ant-tabs-top":"_ant-tabs-top_q22bn_790","ant-tabs-nav":"_ant-tabs-nav_q22bn_790","ant-tabs-tab":"_ant-tabs-tab_q22bn_796","ant-tabs-tab-active":"_ant-tabs-tab-active_q22bn_804","ant-tabs-tab-btn":"_ant-tabs-tab-btn_q22bn_804","ant-pagination":"_ant-pagination_q22bn_808","ant-tabs-ink-bar":"_ant-tabs-ink-bar_q22bn_811","ant-tabs-tab-remove":"_ant-tabs-tab-remove_q22bn_815","swiper-button-next":"_swiper-button-next_q22bn_820","swiper-button-prev":"_swiper-button-prev_q22bn_821","swiper-container":"_swiper-container_q22bn_843","ant-select-dropdown":"_ant-select-dropdown_q22bn_850",drawer_box_1:Je,drawer_box_2:Ze,customer_drawer_1:He,customer_drawer_2:We,basic_drawer_1:Xe,basic_drawer_2:Ye,header_title:et,title:tt,title_r:nt,add_page:at,delete_page:st,form_title_sign:ot,form_title:it,form_desc:rt,tab_title:ct,h_title:lt,active:_t,tab_title_btn:dt,upload:mt,"ant-upload":"_ant-upload_q22bn_1329","ant-upload-select":"_ant-upload-select_q22bn_1329",btn:pt,success_btn:ut,main_btn:bt,main_cancel:ht,gray_cancel:gt,follow:ft,no_follow:xt,form_style:qt,spanBtn:vt,last_price:yt,backBg:jt,price:Ct,other_num:St,otherNumLabel:wt,recommend:Nt,price_num:Tt,sms_num:kt,pay_method:Pt,left:Lt,clicked:Et,pay_online:At,clicked_line:Bt,alipay:It,right:Mt,qr_code:Ft,pay_content:Ot,pay_price:Dt,pay_scan_code:Ut,open_app:$t,scan:Kt,autograph_box:Qt,note_box:Rt,contact:zt,note_con:Vt,top:Gt,num:Jt,recharge:Zt,input:Ht,textarea:Wt,button:Xt,m_b_20:Yt,spin_center:en,black_list:tn},nn=()=>{const d=H();return W({mutationKey:k.removeBlockList.name,mutationFn:async t=>{const o=await k.removeBlockList(t);if(!y(o))throw new Error(o.message)},onSuccess:()=>d.refetchQueries(k.getContactBlockList.name)})},an=()=>W({mutationKey:["exportContactBlockList"],mutationFn:async d=>{const t=await be(d);if(y(t))return t.data;throw new Error(t.message)}}),sn=()=>{const d=re().typeKey;return d==="BLACK_LIST"||d==="SMTP_CONFIG"?d:"NOTE_EMAIL"},D={smsSignature:"çä¿¡ç¾å",emailSendName:"é®ç®±åç§°",replyEmailAddr:"åå¤é®ç®±"};class on extends N.Component{state={isGt:!0,recommend:!1,content:"å
¶ä»æ°é",changedPrice:0,isChanged:!1,otherNum:2e3,classification:1,companyQuota:{smsQuota:0,emailQuota:0,liveQuota:0,userQuota:0},upgrade:!1,currentPrice:0,rpo:{id:3},payType:1,img:"",active:!1,currentProduct:[{id:0,price:0,num:0}],smsProducts:[{id:0,productId:1,price:200,num:2e3},{id:1,productId:1,price:300,num:3e3},{id:2,productId:1,price:600,num:6e3}],emailProducts:[{id:0,productId:2,price:100,num:2e3},{id:1,productId:2,price:150,num:3e3},{id:2,productId:2,price:300,num:6e3}],smsConfig:{smsSignature:void 0,emailSendName:void 0,emailSendAddr:void 0,replyEmailAddr:void 0,sendCloudDomain:void 0},smtpConfig:{id:void 0,name:void 0,host:void 0,port:void 0,sendEmail:void 0,encryptionType:void 0,sendEmailName:void 0,smtpUsername:void 0,smtpPassword:void 0},typeKey:sn()};componentDidMount(){this.loadConfig(),this.getCompanyQuota()}componentWillUnmount(){this.setState=(t,o)=>{}}async getCompanyQuota(){ae.getCompanyQuota().then(t=>{y(t)&&this.setState({companyQuota:t.data})})}async loadConfig(){await this.props.dispatch({type:"teamConfig/loadSmsConfig"});const{smsConfig:t}=this.props,{loading:o,...n}=t||{};n!=null&&n.sendCloudDomain?this.setState({smsConfig:{...n,emailSendAddr:n.emailSendAddr?n.emailSendAddr.split("@")[0]:n.emailSendAddr}}):this.setState({smsConfig:n}),await this.loadSmtpConfig()}async loadSmtpConfig(){try{const t=await qe();y(t)&&t.data&&this.setState({smtpConfig:{id:t.data.id,name:t.data.name,host:t.data.host,port:t.data.port,sendEmail:t.data.sendEmail,sendEmailName:t.data.sendEmailName,encryptionType:t.data.encryptionType||"SSL",smtpUsername:t.data.smtpUsername,smtpPassword:t.data.smtpPassword}})}catch(t){console.error("å è½½SMTPé
置失败:",t),this.setState({smtpConfig:{id:void 0,name:void 0,host:void 0,port:void 0,sendEmail:void 0,sendEmailName:void 0,encryptionType:"SSL",smtpUsername:void 0,smtpPassword:void 0}})}}async saveConfig(t){const{dispatch:o}=this.props;let n={type:t,...this.state.smsConfig},r=!0;t===1&&await["smsSignature"].forEach(a=>{var u,p,f;if(n[a]=(u=this.state.smsConfig)==null?void 0:u[a],!((p=this.state.smsConfig)!=null&&p[a])){m.error(D[a]+"ä¸è½ä¸ºç©º"),r=!1;return}((f=this.state.smsConfig)==null?void 0:f[a].length)>18&&(m.error(D[a]+"å¿
é¡»å°äºçäº18个å符"),r=!1)}),t===0&&["emailSendName","emailSendAddr"].some(a=>{var u,p;if(n[a]=(u=this.state.smsConfig)==null?void 0:u[a],!(n!=null&&n[a])&&a!="emailSendAddr")return m.error(D[a]+"ä¸è½ä¸ºç©º"),r=!1,!0;if(a==="emailSendAddr"&&!(n!=null&&n.sendCloudDomain)&&n[a]&&!Q.test(n[a]??""))return m.error("é®ä»¶æ ¼å¼ä¸æ£ç¡®"),r=!1,!0;if(a==="emailSendAddr"&&(n!=null&&n.sendCloudDomain)&&n[a]){if((p=n[a]??"")!=null&&p.includes("@"))return m.error("é®ä»¶æ ¼å¼ä¸æ£ç¡®"),r=!1,!0;{const f=n.emailSendAddr+"@"+(n==null?void 0:n.sendCloudDomain);n.emailSendAddr=f}}if(a==="emailSendName"&&((n==null?void 0:n[a])??"").includes("@"))return m.error("å件人ä¸è½å
å«@"),r=!1,!0}),r&&(await this.props.dispatch({type:"teamConfig/saveSmsConfig",smsConfig:n}),o({type:"company/getCompanyDTO",callBack:()=>{console.log("åè°äº")}}),this.loadConfig())}async saveSmtpConfig(){var n;let t=!0;const{smtpConfig:o}=this.state;if(o.port&&(isNaN(Number(o.port))||Number(o.port)<=0)){m.error("端å£å·å¿
é¡»æ¯ææçæ°å"),t=!1;return}if(o.sendEmail&&!Q.test(o.sendEmail)){m.error("åéé®ä»¶å°åæ ¼å¼ä¸æ£ç¡®"),t=!1;return}if(t){try{const r={id:o.id,name:o.name,host:o.host,port:Number(o.port),sendEmail:o.sendEmail,sendEmailName:o.sendEmailName,encryptionType:o.encryptionType||"SSL",smtpUsername:o.smtpUsername,smtpPassword:o.smtpPassword},a=await ve(r);y(a)?(m.success("SMTPé
ç½®ä¿åæå"),this.setState({smtpConfig:{...o,id:((n=a.data)==null?void 0:n.id)||o.id}})):m.error(a.message||"ä¿å失败")}catch(r){console.error("ä¿åSMTPé
置失败:",r),m.error("ä¿å失败ï¼è¯·éè¯")}return}}getFieldLabel(t){return{name:"é
ç½®åç§°",host:"SMTP主æºå°å",port:"SMTP主æºç«¯å£",sendEmail:"åéé®ä»¶å°å",sendEmailName:"é®ç®±åéåç§°",smtpUsername:"SMTPæå¡å¨ç¨æ·å",smtpPassword:"SMTPæå¡å¨å¯ç "}[t]||t}recharge(t){this.setState({currentPrice:t==1?600:300}),F.payUrl({payType:this.state.payType,products:[{amount:6e3,productId:t}]}).then(o=>{y(o)&&this.setState({img:o.data})})}showModal(t){this.setState({active:!0,classification:t,currentProduct:t==1?this.state.smsProducts:this.state.emailProducts,rpo:{id:2},isChanged:!1,recommend:!1}),this.recharge(t)}
1switchPrice(t,o,n){this.setState({rpo:{...o,id:t.id},currentPrice:t.price,recommend:!1,isGt:!0}),F.payUrl({payType:this.state.payType,products:[{amount:t.num,productId:this.state.classification}]}).then(r=>{y(r)&&this.setState({img:r.data,isChanged:!1,content:"å
¶ä»æ°é"})})}getOtherPrice(){const{otherNum:t,classification:o}=this.state,n=(t*(o===1?.1:.05)).toFixed(2);if(this.setState({changedPrice:n}),t<2e3||t<0){this.setState({otherNum:2e3,isGt:!1},()=>m.warn("请è¾å
¥å¤§äº2000çæ°é"));return}else this.setState({isGt:!0});F.payUrl({payType:this.state.payType,products:[{amount:this.state.otherNum,productId:this.state.classification}]}).then(r=>{y(r)&&this.setState({img:r.data,isChanged:!0})})}handleOtherPrice(){const{rpo:t,otherNum:o}=this.state;if(o<2e3){m.warn("请è¾å
¥å¤§äº2000çæ°é");return}this.setState({recommend:!0,rpo:{...t,id:100},isChanged:!0,changedPrice:0,content:o}),this.getOtherPrice()}render(){var E;console.log(this.props.upgrade);const{isGt:t,recommend:o,content:n,smtpConfig:r,smsConfig:a,active:u,payType:p,img:f,currentPrice:x,currentProduct:S,rpo:c,companyQuota:$,classification:P,otherNum:B,isChanged:L,changedPrice:I}=this.state,C=(i,w)=>{this.setState({smsConfig:{...a,[i]:w}})},q=(i,w)=>{this.setState({smtpConfig:{...r,[i]:w}})};return e.jsxs(A,{activeKey:this.state.typeKey,onChange:i=>{this.setState({typeKey:i}),se.replace(`${window.location.pathname}?typeKey=${i}`)},children:[e.jsx(A.TabPane,{tab:"çä¿¡ä¸é®ä»¶",children:e.jsxs(J,{style:{height:"calc(100vh - 60px - 55px)"},children:[e.jsx(le,{visible:this.props.upgrade,subscriptionType:_e.FREE,onCancel:()=>this.props.dispatch({type:"teamConfig/changeUpgradeModal",upgrade:!1})}),e.jsxs("div",{className:s.autograph_box,children:[e.jsx(oe,{className:s.spin_center,spinning:(E=this.props.smsConfig)==null?void 0:E.loading,size:"large"}),e.jsxs("div",{className:`${s.note_box} ${s.m_b_20}`,children:[e.jsx("div",{className:"header_title",children:e.jsx("div",{className:"title",children:"ç信设置"})}),e.jsx("div",{className:`${s.note_con} ${s.m_b_20}`,children:e.jsxs("div",{children:[e.jsx(g,{title:"çä¿¡ç¾å",desc:e.jsxs("span",{children:["åéçä¿¡æ¶èªå¨æ¾ç¤ºå¨çä¿¡å¼å¤´ï¼",e.jsx("span",{style:{color:"#db2231"},children:"请å
确认填åççä¿¡ç¾åå·²èç³»æä»¬å¤æ¡è¿ï¼å¦åå¯è½ä¼è¢«æ¦æªã"})]}),value:a.smsSignature,onChange:i=>C("smsSignature",i)}),e.jsx("div",{className:s.button,onClick:()=>this.saveConfig(1),children:"ä¿å"})]})})]}),e.jsxs("div",{className:s.note_box,children:[e.jsx("div",{className:"header_title",children:e.jsx("div",{className:"title",children:"é®ç®±è®¾ç½®"})}),e.jsx("div",{className:s.note_con,children:e.jsxs("div",{children:[e.jsx(g,{title:"å件人",value:a.emailSendName,onChange:i=>C("emailSendName",i)}),e.jsx(g,{addonAfter:a!=null&&a.sendCloudDomain?"@"+(a==null?void 0:a.sendCloudDomain):void 0,disabled:!!(a!=null&&a.sendCloudDomain),type:a!=null&&a.sendCloudDomain?"email":"input",title:a!=null&&a.sendCloudDomain?"å件人é®ç®±(éèç³»æä»¬è§£æåååä¿®æ¹)":"å件人é®ç®±",value:a.emailSendAddr,onChange:i=>C("emailSendAddr",i)}),e.jsx(g,{title:"åå¤é®ç®±",value:a.replyEmailAddr,onChange:i=>C("replyEmailAddr",i)}),e.jsx("div",{className:s.button,onClick:()=>this.saveConfig(0),children:"ä¿å"})]})})]})]}),u&&e.jsxs(X,{width:720,title:P===1?"çä¿¡å
å¼":"é®ä»¶å
å¼",visible:u,footer:!1,onCancel:()=>this.setState({active:!1}),children:[e.jsxs("div",{className:s.header_title,children:[S.map(i=>e.jsxs("div",{onClick:()=>this.switchPrice(i,c),className:i.id===c.id?`${s.price} ${s.backBg}`:`${s.price}`,children:[i.id===c.id&&e.jsx("div",{className:s.recommend,children:"æ¨è"}),e.jsxs("div",{className:s.price_num,children:[e.jsx("span",{children:"ï¿¥"}),i.price]}),P===1?e.jsxs("div",{className:s.sms_num,children:[i.num,"æ¡çä¿¡"]}):e.jsxs("div",{className:s.sms_num,children:[i.num,"æ¡é®ä»¶"]})]},i.id)),e.jsxs("div",{className:o?`${s.price} ${s.backBg}`:`${s.price}`,onClick:()=>{this.handleOtherPrice()},children:[o&&e.jsx("div",{className:s.recommend,children:"æ¨è"}),e.jsxs(T.Item,{name:"otherNum",className:s.other_num,children:[e.jsx(j,{type:"number",bordered:!1,placeholder:n,value:B,onChange:i=>this.setState({otherNum:i.target.value,isChanged:!0}),onBlur:()=>this.getOtherPrice()}),e.jsx("span",{className:s.otherNumLabel,children:"æ¡"})]})]})]}),e.jsxs("div",{className:s.pay_method,children:[e.jsx("div",{className:s.left,children:e.jsxs("div",{onClick:()=>this.setState({payType:1}),className:p===1?`${s.pay_online}`:`${s.pay_online} ${s.clicked}`,children:[p===1?e.jsx("div",{className:s.clicked_line}):null,e.jsx("div",{className:p===1?"":`${s.alipay}`,children:"æ«ç æ¯ä»"})]})}),e.jsxs("div",{className:s.right,children:[e.jsx("div",{style:t?{}:{visibility:"hidden"},className:s.qr_code,children:e.jsx("img",{src:f,alt:""})}),e.jsxs("div",{className:s.pay_content,children:[e.jsxs("div",{className:s.pay_price,children:[e.jsx("span",{children:"ï¿¥"}),L?I:x]}),e.jsx("div",{className:s.pay_scan_code,children:"使ç¨å¾®ä¿¡ææ¯ä»å®æ«ç æ¯ä»"}),e.jsxs("div",{className:s.open_app,children:[e.jsx("div",{className:s.scan,children:e.jsx("img",{src:"https://static.marketup.cn/resource/marketup/asdfasdfasdf/202106/1624412887604.png",alt:""})}),e.jsxs("div",{children:[e.jsx("div",{children:"æå¼ææºå¾®ä¿¡"}),e.jsx("div",{children:"æ«ä¸æ«å®æä»æ¬¾"})]})]})]})]})]})]})]})},"NOTE_EMAIL"),e.jsx(A.TabPane,{tab:"黿¢åå",children:e.jsx(rn,{})},"BLACK_LIST"),e.jsx(A.TabPane,{tab:"é®ç®±smtp设置",children:e.jsx(J,{style:{height:"calc(100vh - 60px - 55px)"},children:e.jsx("div",{className:s.autograph_box,children:e.jsxs("div",{className:s.note_box,children:[e.jsx("div",{className:"header_title",children:e.jsx("div",{className:"title",children:"é®ç®±smtp设置"})}),e.jsx("div",{className:s.note_con,children:e.jsxs("div",{children:[e.jsx(g,{title:"é
ç½®åç§°",placeholder:"请è¾å
¥é
ç½®åç§°",value:r.name,onChange:i=>q("name",i)}),e.jsx(g,{title:"SMTP主æºå°å",placeholder:"请è¾å
¥SMTP主æºå°åï¼å¦ï¼smtp.qq.com",value:r.host,onChange:i=>q("host",i)}),e.jsx(g,{title:"SMTP主æºç«¯å£",placeholder:"é
ç½®æ¨ç端å£ä¿¡æ¯ï¼å¦ï¼465",type:"number",value:r.port,onChange:i=>q("port",i)}),e.jsx(g,{title:"åéé®ä»¶å°å",value:r.sendEmail,onChange:i=>q("sendEmail",i)}),e.jsx(g,{title:"ä¼ è¾åè®®å 坿¹å¼",type:"radio",options:[{label:"SSL",value:"SSL"},{label:"TLS",value:"TLS"}
1],value:r.encryptionType,onChange:i=>q("encryptionType",i)}),e.jsx(g,{title:"é®ç®±åéåç§°",value:r.sendEmailName,onChange:i=>q("sendEmailName",i)}),e.jsx(g,{title:"SMTPæå¡å¨ç¨æ·å",value:r.smtpUsername,onChange:i=>q("smtpUsername",i)}),e.jsx(g,{title:"SMTPæå¡å¨å¯ç ",type:"password",value:r.smtpPassword,onChange:i=>q("smtpPassword",i)}),e.jsx("div",{className:s.button,onClick:()=>this.saveSmtpConfig(),children:"ä¿å"})]})})]})})})},"SMTP_CONFIG")]})}}const g=d=>{const{value:t,title:o,desc:n,placeholder:r,options:a,type:u="input",disabled:p,addonAfter:f}=d;let{onChange:x}=d;typeof x!="function"&&(x=c=>{console.log(c)});const S=()=>{switch(u){case"radio":return e.jsx(G.Group,{options:a,value:t,onChange:c=>x(c&&c.target?c.target.value:c),className:s.input,children:a.map(c=>e.jsx(G,{value:c.value,children:c.label},c.value))});case"password":return e.jsx(j.Password,{placeholder:r||o,className:s.input,value:t,onChange:c=>x(c&&c.target?c.target.value:c)});case"number":return e.jsx(j,{type:"number",placeholder:r||o,className:s.input,value:t,onChange:c=>x(c&&c.target?c.target.value:c)});case"email":return e.jsx(j,{addonAfter:f,disabled:p,placeholder:r||o,className:s.input,style:{width:"300px"},value:t,onChange:c=>x(c&&c.target?c.target.value:c)});default:return e.jsx(j,{disabled:p,placeholder:r||o,className:s.input,value:t,onChange:c=>x(c&&c.target?c.target.value:c)})}};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"form_title",children:o}),e.jsx("div",{className:"form_desc",style:{display:n?"":"none"},children:n}),e.jsx("div",{children:S()})]})},rn=()=>{const d=H(),t=nn(),o=an(),{onFinishForm:n,proRef:r,formVisible:a,setFormVisible:u,onClose:p,form:f,onFinishTable:x}=de(),[S,c]=N.useState(!1),[$,P]=N.useState({}),[B,L]=N.useState(!1),I=[{title:"é®ç®±å°å",key:"emailAddress",dataIndex:"emailAddress"},{title:"ææºå·",key:"cellphone",dataIndex:"cellphone"},{title:"å å
¥é»ååæ¶é´",key:"createTime",dataIndex:"createTime"},{title:"å å
¥åå ",key:"blockListJoinCause",render:(l,{blockListJoinCause:_})=>{var b;return e.jsx(e.Fragment,{children:(b=U.getValues().find(h=>h.getName()===_))==null?void 0:b.name})}},{title:"æ¥æº",key:"sourceNoticeDTO",dataIndex:"sourceNoticeDTO",render:(l,_)=>e.jsx(e.Fragment,{children:l==null?void 0:l.subject})},{title:"åéæ¶é´",key:"sourceNoticeDTO",dataIndex:"sourceNoticeDTO",render:(l,_)=>e.jsx(e.Fragment,{children:_.sendTime||"-"})},{title:"æä½",render:(l,_)=>e.jsx(R,{children:e.jsx(z,{placement:"top",title:"确认解é¤åï¼",onConfirm:()=>C(_.blockId),okText:"确认",cancelText:"åæ¶",children:e.jsx("span",{className:s.spanBtn,children:"è§£é¤é»åå"})})})}],C=l=>{t.mutate(l,{onSuccess:()=>{var _;m.success("è§£é¤æå"),(_=r.current)==null||_.reload()}})},q=N.useCallback(async({searchValue:l,blockListJoinCause:_},{page:b})=>{P({searchValue:l,blockListJoinCause:_});const h=await d.fetchQuery({queryKey:[k.getContactBlockList.name,b,l,_],queryFn:async()=>{const v=await k.getContactBlockList({page:b,searchValue:l,blockListJoinCause:_});if(y(v))return v.data;throw new Error(v.message)}});return{data:h.content,total:h.totalElements,pagination:{pageSize:h.pageable.pageSize,page:h.pageable.pageNumber+1}}},[]),E=me(),i=l=>E.mutateAsync(l.src,{onSuccess:_=>{m.success("ä¸ä¼ æå")},onError:_=>{m.error(`ä¸ä¼ 失败, ${_.message}`),c(!1)}}),w=async()=>{const{cellphone:l,emailAddress:_,description:b}=await f.validateFields();if(!l&&!_){m.error("é误ï¼çµè¯æè
é®ç®±ä¸å¯åæ¶ä¸ºç©º");return}const{code:h,message:v}=await he({cellphone:l,emailAddress:_,description:b});n(h??0,v??"")},Y=async(l,_)=>{var K;const b=l.map(te=>te.blockId.toString()),h=_?{batchType:1,queryRPO:$}:{batchType:0,blockListId:b},{code:v,message:M}=await ge(h);x(v??0,M??""),(K=r.current)==null||K.resetSelected()},ee=(l,_,b)=>{const h=()=>{const v=b?{batchType:1,queryRPO:{page:1,size:10,searchValue:l.searchValue,blockListJoinCause:l.blockListJoinCause}}:{batchType:0,batchIds:_.map(M=>M.blockId)};o.mutate(v,{onSuccess:()=>{m.success("ä»»å¡æäº¤æåï¼è¯·å¨å¯¼åºä»»å¡å表æ¥è¯¢å¯¼åºç»æ")},onError:ce})};return e.jsxs(R,{children:[e.jsx(V,{onClick:()=>u(!0),children:"æ·»å é»åå"}),e.jsx(V,{onClick:()=>c(!0),children:"导å
¥é»åå"}),e.jsx(ue,{show:!!_.length,children:e.jsxs(O,{children:[e.jsx(O.Item,{children:e.jsx(z,{title:"ç¡®å®æ¹éè§£é¤é»ååå",onConfirm:()=>Y(_,b),children:"è§£é¤é»åå"})},0),e.jsx(O.Item,{onClick:()=>L(!0),children:"导åºé»åå"},1)]})}),e.jsx(xe,{canCreate:!0,visible:B,onOk:h,onCancel:()=>{L(!1)},type:"CONTACT_BLOCK_LIST_DATA"})]})};return e.jsxs("div",{className:s.black_list,children:[e.jsx(pe,{experimentalFilterStyles:!0,rowKey:({blockId:l,createTime:_})=>l??_,request:q,columns:I,actionsRef:r,filterOptions:{expandable:!0,render:{searchValue:e.jsx(j,{placeholder:"请è¾å
¥é®ç®±å°åå
³é®è¯",style:{width:236}}),blockListJoinCause:e.jsx(cn,{})}},actionButtons:ee,rowSelectionOptions:{preserveSelectedRowKeys:!0}}),e.jsx(fe,{open:S,title:"导å
¥é»åå",onClose:()=>{var l;c(!1),(l=r.current)==null||l.reload()},tutorialSrc:"/api/uc/v1/marketing/noticeSetting/downloadBlackListExampleFile",importFromResource:i,tutorialText:"ä¸è½½å¯¼å
¥æ¨¡æ¿"}),e.jsx(X,{title:"æ·»å é»åå",open:a,onOk:w,onCancel:p,children:e.jsxs(T,{form:f,layout:"vertical",children:[e.jsx(T.Item,{label:"ææºå·",name:"cellphone",rules:[{required:!1},{pattern:/^1[3456789]\d{9}$/,message:"ææºå·æ ¼å¼é误"}],children:e.jsx(j,{placeholder:"请è¾å
¥ææºå·"})}),e.jsx(T.Item,{label:"é®ç®±",name:"emailAddress",rules:[{required:!1},{pattern:/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,message:"é®ç®±æ ¼å¼é误"}],children:e.jsx(j,{placeholder:"请è¾å
¥é®ç®±"})}),e.jsx(T.Item,{label:"å å
¥åå ",name:"description",children:e.jsx(j,{placeholder:"请è¾å
¥å å
¥åå "})})]})})]})},cn=({value:d,onChange:t})=>{const o=U.getValues().map(n=>n.getName());return e.jsx(ie,{value:d,onChange:t,title:"å å
¥åå ",options:o,renderOption:n=>
1{var r;return e.jsx("span",{children:(r=U.getValues().find(a=>a.getName()===n))==null?void 0:r.name})},getKey:n=>n,multiple:!1})};function ln(d){return{smsConfig:d.teamConfig.smsConfig,upgrade:d.teamConfig.upgrade}}const Fa=ne(ln)(on);export{Fa 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.