2023-11-15 15:57:04 +08:00

2 lines
9.1 KiB
JavaScript

/* empty css *//* empty css *//* empty css */import{a as N,E as j}from"./el-form-item-1b16c9fc.js";/* empty css *//* empty css *//* empty css */import{_ as B}from"./index-2d04c504.js";/* empty css */import{t as e}from"./index-0ca94763.js";import{g as O,a as $,e as I}from"./wechat-c03caa2e.js";import{E as K}from"./index-bcd7a424.js";import{u as W,a as F}from"./vue-router-48fdc1e3.js";import{a as y}from"./index-d469ae66.js";import{E as L}from"./index-e27c3bb0.js";import{E as Q}from"./index-9ecd3f93.js";import{E as z,b as G}from"./index-ba04db70.js";import{E as H}from"./index-c5914bde.js";import{v as J}from"./directive-64fb15dc.js";import{d as X,r as x,O as b,w as Y,e as V,f as Z,g as r,u as o,B as s,M as ee,v as oe,x as l,y as t,A as f}from"./plugin-vue_export-helper-85a4d40b.js";import"./index-cf9a2dd7.js";import"./event-f85d77b0.js";import"./_baseClone-3dbf39d6.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-14193028.js";import"./el-overlay-08181e74.js";import"./index-313cd2ce.js";import"./focus-trap-64c402c5.js";import"./index-1ad115d7.js";import"./index-de1d3b53.js";import"./attachment-afdaf51f.js";/* empty css *//* empty css *//* empty css */import"./index-7eafba5f.js";import"./common-c3be41fd.js";import"./index-e513479b.js";import"./el-main-86eb724f.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./index-b9e5f5cb.js";/* empty css */import"./index-4d8f36c6.js";import"./index-ebc73046.js";/* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./index-489c18c0.js";import"./index-ee5275c6.js";import"./aria-adfa05c5.js";import"./validator-bcf701e4.js";import"./index-e1882aa8.js";import"./index-a7e8e96f.js";import"./index-888853cf.js";import"./index-344f0086.js";import"./debounce-6c3123a6.js";import"./position-37364850.js";import"./index-448a4893.js";import"./index-95b00894.js";import"./isEqual-0b9509fd.js";import"./flatten-749195f8.js";import"./index-21f38393.js";import"./index-4601cf3b.js";import"./index-99b65a15.js";import"./strings-53351eda.js";import"./index-bd04154b.js";const te={class:"main-container"},ae={class:"detail-head"},le=r("span",{class:"iconfont iconxiangzuojiantou !text-xs"},null,-1),re={class:"ml-[1px]"},se=r("span",{class:"adorn"},"|",-1),ie={class:"right"},ne={class:"panel-title !text-sm"},pe={class:"form-tip"},de={class:"panel-title !text-sm"},ce={class:"form-tip"},me={class:"form-tip"},ue={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"},Ko=X({__name:"config",setup(ke){const k=W(),E=F(),P=k.meta.title,u=x(!0),n=b({wechat_name:"",wechat_original:"",app_id:"",app_secret:"",qr_code:"",token:"",encoding_aes_key:"",encryption_type:"not_encrypt"}),v=x(),S=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"}]});O().then(m=>{Object.assign(n,m.data),u.value=!1});const c=b({business_domain:"",js_secure_domain:"",serve_url:"",web_auth_domain:""});$().then(m=>{Object.assign(c,m.data),u.value=!1});const{copy:C,isSupported:T,copied:w}=K(),_=m=>{if(!T.value){y({message:e("notSupportCopy"),type:"warning"});return}C(m)};Y(w,()=>{w.value&&y({message:e("copySuccess"),type:"success"})});const q=async m=>{u.value||!m||await m.validate(async a=>{a&&(u.value=!0,I(n).then(()=>{u.value=!1}).catch(()=>{u.value=!1}))})};return(m,a)=>{const d=L,p=N,A=B,h=Q,g=z,U=G,M=j,R=H,D=J;return V(),Z("div",te,[r("div",ae,[r("div",{class:"left",onClick:a[0]||(a[0]=i=>o(E).push({path:"/website/channel/wechat"}))},[le,r("span",re,s(o(e)("returnToPreviousPage")),1)]),se,r("span",ie,s(o(P)),1)]),ee((V(),oe(M,{model:n,"label-width":"150px",ref_key:"formRef",ref:v,rules:S,class:"page-form"},{default:l(()=>[t(h,{class:"box-card !border-none",shadow:"never"},{default:l(()=>[r("h3",ne,s(o(e)("wechatInfo")),1),t(p,{label:o(e)("wechatName"),prop:"wechat_name"},{default:l(()=>[t(d,{modelValue:n.wechat_name,"onUpdate:modelValue":a[1]||(a[1]=i=>n.wechat_name=i),placeholder:o(e)("wechatNamePlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),t(p,{label:o(e)("wechatOriginal"),prop:"wechat_original"},{default:l(()=>[t(d,{modelValue:n.wechat_original,"onUpdate:modelValue":a[2]||(a[2]=i=>n.wechat_original=i),placeholder:o(e)("wechatOriginalPlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),t(p,{label:o(e)("wechatQrcode"),prop:"qr_code"},{default:l(()=>[t(A,{modelValue:n.qr_code,"onUpdate:modelValue":a[3]||(a[3]=i=>n.qr_code=i)},null,8,["modelValue"]),r("div",pe,s(o(e)("wechatQrcodeTips")),1)]),_:1},8,["label"])]),_:1}),t(h,{class:"box-card !border-none mt-[16px]",shadow:"never"},{default:l(()=>[r("h3",de,s(o(e)("wechatDevelopInfo")),1),t(p,{label:o(e)("wechatAppid"),prop:"app_id"},{default:l(()=>[t(d,{modelValue:n.app_id,"onUpdate:modelValue":a[4]||(a[4]=i=>n.app_id=i),placeholder:o(e)("appidPlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"]),r("div",ce,s(o(e)("wechatAppidTips")),1)]),_:1},8,["label"]),t(p,{label:o(e)("wechatAppsecret"),prop:"app_secret"},{default:l(()=>[t(d,{modelValue:n.app_secret,"onUpdate:modelValue":a[5]||(a[5]=i=>n.app_secret=i),placeholder:o(e)("appSecretPlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"]),r("div",me,s(o(e)("wechatAppsecretTips")),1)]),_:1},8,["label"])]),_:1}),t(h,{class:"box-card !border-none mt-[16px]",shadow:"never"},{default:l(()=>[r("h3",ue,s(o(e)("theServerSetting")),1),t(p,{label:"URL"},{default:l(()=>[t(d,{"model-value":c.serve_url,placeholder:"Please input",class:"input-width",readonly:!0},{append:l(()=>[r("div",{class:"cursor-pointer",onClick:a[6]||(a[6]=i=>_(c.serve_url))},s(o(e)("copy")),1)]),_:1},8,["model-value"])]),_:1}),t(p,{label:"Token",prop:"token"},{default:l(()=>[t(d,{modelValue:n.token,"onUpdate:modelValue":a[7]||(a[7]=i=>n.token=i),placeholder:o(e)("tokenPlaceholder"),class:"input-width",maxlength:"32","show-word-limit":"",clearable:""},null,8,["modelValue","placeholder"]),r("div",_e,s(o(e)("tokenTips")),1)]),_:1}),t(p,{label:"EncodingAESKey",prop:"encoding_aes_key"},{default:l(()=>[t(d,{modelValue:n.encoding_aes_key,"onUpdate:modelValue":a[8]||(a[8]=i=>n.encoding_aes_key=i),placeholder:o(e)("encodingAesKeyPlaceholder"),class:"input-width",maxlength:"43","show-word-limit":"",clearable:""},null,8,["modelValue","placeholder"]),r("div",he,s(o(e)("encodingAESKeyTips")),1)]),_:1}),t(p,{label:o(e)("encryptionType"),prop:"encryption_type"},{default:l(()=>[t(U,{modelValue:n.encryption_type,"onUpdate:modelValue":a[9]||(a[9]=i=>n.encryption_type=i)},{default:l(()=>[t(g,{label:"not_encrypt"},{default:l(()=>[f(s(o(e)("cleartextMode")),1)]),_:1}),t(g,{label:"compatible"},{default:l(()=>[f(s(o(e)("compatibleMode")),1)]),_:1}),t(g,{label:"safe"},{default:l(()=>[f(s(o(e)("safeMode")),1)]),_:1})]),_:1},8,["modelValue"]),r("div",fe,s(o(e)("cleartextModeTips")),1),r("div",ge,s(o(e)("compatibleModeTips")),1),r("div",be,s(o(e)("safeModeTips")),1)]),_:1},8,["label"])]),_:1}),t(h,{class:"box-card !border-none mt-[16px]",shadow:"never"},{default:l(()=>[r("div",ve,[r("h3",we,s(o(e)("functionSetting")),1)]),t(p,{label:""},{default:l(()=>[r("div",ye,s(o(e)("functionSettingTips")),1)]),_:1}),t(p,{label:o(e)("businessDomain")},{default:l(()=>[t(d,{"model-value":c.business_domain,placeholder:"Please input",class:"input-width",readonly:!0},{append:l(()=>[r("div",{class:"cursor-pointer",onClick:a[10]||(a[10]=i=>_(c.business_domain))},s(o(e)("copy")),1)]),_:1},8,["model-value"])]),_:1},8,["label"]),t(p,{label:o(e)("jsSecureDomain")},{default:l(()=>[t(d,{"model-value":c.js_secure_domain,placeholder:"Please input",class:"input-width",readonly:!0},{append:l(()=>[r("div",{class:"cursor-pointer",onClick:a[11]||(a[11]=i=>_(c.business_domain))},s(o(e)("copy")),1)]),_:1},8,["model-value"])]),_:1},8,["label"]),t(p,{label:o(e)("webAuthDomain")},{default:l(()=>[t(d,{"model-value":c.web_auth_domain,placeholder:"Please input",class:"input-width",readonly:!0},{append:l(()=>[r("div",{class:"cursor-pointer",onClick:a[12]||(a[12]=i=>_(c.business_domain))},s(o(e)("copy")),1)]),_:1},8,["model-value"])]),_:1},8,["label"])]),_:1})]),_:1},8,["model","rules"])),[[D,u.value]]),r("div",xe,[r("div",Ve,[t(R,{type:"primary",loading:u.value,onClick:a[13]||(a[13]=i=>q(v.value))},{default:l(()=>[f(s(o(e)("save")),1)]),_:1},8,["loading"])])])])}}});export{Ko as default};