import{d as M,O as $,f as j,r as y,n as b,N as e,aL as O,s as B,a4 as x,h as V,c as I,a as s,u as a,t as n,y as K,I as W,w as l,e as t,i as f,W as L,X as z,$ as F,az as Q,aA as G,Y as X,E as Y,a0 as H}from"./index-4dcc0234.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{_ as J}from"./index-742b412a.js";import"./el-form-item-4ed993c7.js";/* empty css */import{g as Z,a as ee,e as ae}from"./wechat-38ff6011.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-5c6c00d9.js";/* empty css */import"./attachment-c69dd9fd.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-9285296e.js";/* empty css */import"./sys-8ead7f22.js";const te={class:"main-container"},oe={class:"detail-head"},le=s("span",{class:"iconfont iconxiangzuojiantou !text-xs"},null,-1),se={class:"ml-[1px]"},ne=s("span",{class:"adorn"},"|",-1),ie={class:"right"},re={class:"panel-title !text-sm"},de={class:"form-tip"},pe={class:"panel-title !text-sm"},ce={class:"form-tip"},ue={class:"form-tip"},me={class:"panel-title !text-sm"},_e={class:"form-tip"},he={class:"form-tip"},fe={class:"form-tip"},ge={class:"form-tip"},be={class:"form-tip"},ve={class:"flex"},we={class:"panel-title !text-sm"},ye={class:"form-tip"},xe={class:"fixed-footer-wrap"},Ve={class:"fixed-footer"},ta=M({__name:"config",setup(ke){const k=$(),P=j(),S=k.meta.title,m=y(!0),r=b({wechat_name:"",wechat_original:"",app_id:"",app_secret:"",qr_code:"",token:"",encoding_aes_key:"",encryption_type:"not_encrypt"}),v=y(),C=b({wechat_name:[{required:!0,message:e("wechatNamePlaceholder"),trigger:"blur"}],wechat_original:[{required:!0,message:e("wechatOriginalPlaceholder"),trigger:"blur"}],app_id:[{required:!0,message:e("appidPlaceholder"),trigger:"blur"}],app_secret:[{required:!0,message:e("appSecretPlaceholder"),trigger:"blur"}],token:[{required:!0,message:e("tokenPlaceholder"),trigger:"blur"}],encoding_aes_key:[{required:!0,message:e("encodingAesKeyPlaceholder"),trigger:"blur"}]});Z().then(u=>{Object.assign(r,u.data),m.value=!1});const c=b({business_domain:"",js_secure_domain:"",serve_url:"",web_auth_domain:""});ee().then(u=>{Object.assign(c,u.data),m.value=!1});const{copy:E,isSupported:T,copied:w}=O(),_=u=>{if(!T.value){x({message:e("notSupportCopy"),type:"warning"});return}E(u)};B(w,()=>{w.value&&x({message:e("copySuccess"),type:"success"})});const q=async u=>{m.value||!u||await u.validate(async o=>{o&&(m.value=!0,ae(r).then(()=>{m.value=!1}).catch(()=>{m.value=!1}))})};return(u,o)=>{const p=L,d=z,A=J,h=F,g=Q,U=G,N=X,R=Y,D=H;return V(),I("div",te,[s("div",oe,[s("div",{class:"left",onClick:o[0]||(o[0]=i=>a(P).push({path:"/channel/wechat"}))},[le,s("span",se,n(a(e)("returnToPreviousPage")),1)]),ne,s("span",ie,n(a(S)),1)]),K((V(),W(N,{model:r,"label-width":"150px",ref_key:"formRef",ref:v,rules:C,class:"page-form"},{default:l(()=>[t(h,{class:"box-card !border-none",shadow:"never"},{default:l(()=>[s("h3",re,n(a(e)("wechatInfo")),1),t(d,{label:a(e)("wechatName"),prop:"wechat_name"},{default:l(()=>[t(p,{modelValue:r.wechat_name,"onUpdate:modelValue":o[1]||(o[1]=i=>r.wechat_name=i),placeholder:a(e)("wechatNamePlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),t(d,{label:a(e)("wechatOriginal"),prop:"wechat_original"},{default:l(()=>[t(p,{modelValue:r.wechat_original,"onUpdate:modelValue":o[2]||(o[2]=i=>r.wechat_original=i),placeholder:a(e)("wechatOriginalPlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),t(d,{label:a(e)("wechatQrcode"),prop:"qr_code"},{default:l(()=>[t(A,{modelValue:r.qr_code,"onUpdate:modelValue":o[3]||(o[3]=i=>r.qr_code=i)},null,8,["modelValue"]),s("div",de,n(a(e)("wechatQrcodeTips")),1)]),_:1},8,["label"])]),_:1}),t(h,{class:"box-card !border-none mt-[16px]",shadow:"never"},{default:l(()=>[s("h3",pe,n(a(e)("wechatDevelopInfo")),1),t(d,{label:a(e)("wechatAppid"),prop:"app_id"},{default:l(()=>[t(p,{modelValue:r.app_id,"onUpdate:modelValue":o[4]||(o[4]=i=>r.app_id=i),placeholder:a(e)("appidPlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"]),s("div",ce,n(a(e)("wechatAppidTips")),1)]),_:1},8,["label"]),t(d,{label:a(e)("wechatAppsecret"),prop:"app_secret"},{default:l(()=>[t(p,{modelValue:r.app_secret,"onUpdate:modelValue":o[5]||(o[5]=i=>r.app_secret=i),placeholder:a(e)("appSecretPlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"]),s("div",ue,n(a(e)("wechatAppsecretTips")),1)]),_:1},8,["label"])]),_:1}),t(h,{class:"box-card !border-none mt-[16px]",shadow:"never"},{default:l(()=>[s("h3",me,n(a(e)("theServerSetting")),1),t(d,{label:"URL"},{default:l(()=>[t(p,{"model-value":c.serve_url,placeholder:"Please input",class:"input-width",readonly:!0},{append:l(()=>[s("div",{class:"cursor-pointer",onClick:o[6]||(o[6]=i=>_(c.serve_url))},n(a(e)("copy")),1)]),_:1},8,["model-value"])]),_:1}),t(d,{label:"Token",prop:"token"},{default:l(()=>[t(p,{modelValue:r.token,"onUpdate:modelValue":o[7]||(o[7]=i=>r.token=i),placeholder:a(e)("tokenPlaceholder"),class:"input-width",maxlength:"32","show-word-limit":"",clearable:""},null,8,["modelValue","placeholder"]),s("div",_e,n(a(e)("tokenTips")),1)]),_:1}),t(d,{label:"EncodingAESKey",prop:"encoding_aes_key"},{default:l(()=>[t(p,{modelValue:r.encoding_aes_key,"onUpdate:modelValue":o[8]||(o[8]=i=>r.encoding_aes_key=i),placeholder:a(e)("encodingAesKeyPlaceholder"),class:"input-width",maxlength:"43","show-word-limit":"",clearable:""},null,8,["modelValue","placeholder"]),s("div",he,n(a(e)("encodingAESKeyTips")),1)]),_:1}),t(d,{label:a(e)("encryptionType"),prop:"encryption_type"},{default:l(()=>[t(U,{modelValue:r.encryption_type,"onUpdate:modelValue":o[9]||(o[9]=i=>r.encryption_type=i)},{default:l(()=>[t(g,{label:"not_encrypt"},{default:l(()=>[f(n(a(e)("cleartextMode")),1)]),_:1}),t(g,{label:"compatible"},{default:l(()=>[f(n(a(e)("compatibleMode")),1)]),_:1}),t(g,{label:"safe"},{default:l(()=>[f(n(a(e)("safeMode")),1)]),_:1})]),_:1},8,["modelValue"]),s("div",fe,n(a(e)("cleartextModeTips")),1),s("div",ge,n(a(e)("compatibleModeTips")),1),s("div",be,n(a(e)("safeModeTips")),1)]),_:1},8,["label"])]),_:1}),t(h,{class:"box-card !border-none mt-[16px]",shadow:"never"},{default:l(()=>[s("div",ve,[s("h3",we,n(a(e)("functionSetting")),1)]),t(d,{label:""},{default:l(()=>[s("div",ye,n(a(e)("functionSettingTips")),1)]),_:1}),t(d,{label:a(e)("businessDomain")},{default:l(()=>[t(p,{"model-value":c.business_domain,placeholder:"Please input",class:"input-width",readonly:!0},{append:l(()=>[s("div",{class:"cursor-pointer",onClick:o[10]||(o[10]=i=>_(c.business_domain))},n(a(e)("copy")),1)]),_:1},8,["model-value"])]),_:1},8,["label"]),t(d,{label:a(e)("jsSecureDomain")},{default:l(()=>[t(p,{"model-value":c.js_secure_domain,placeholder:"Please input",class:"input-width",readonly:!0},{append:l(()=>[s("div",{class:"cursor-pointer",onClick:o[11]||(o[11]=i=>_(c.business_domain))},n(a(e)("copy")),1)]),_:1},8,["model-value"])]),_:1},8,["label"]),t(d,{label:a(e)("webAuthDomain")},{default:l(()=>[t(p,{"model-value":c.web_auth_domain,placeholder:"Please input",class:"input-width",readonly:!0},{append:l(()=>[s("div",{class:"cursor-pointer",onClick:o[12]||(o[12]=i=>_(c.business_domain))},n(a(e)("copy")),1)]),_:1},8,["model-value"])]),_:1},8,["label"])]),_:1})]),_:1},8,["model","rules"])),[[D,m.value]]),s("div",xe,[s("div",Ve,[t(R,{type:"primary",loading:m.value,onClick:o[13]||(o[13]=i=>q(v.value))},{default:l(()=>[f(n(a(e)("save")),1)]),_:1},8,["loading"])])])])}}});export{ta as default};