mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2026-01-07 13:38:10 +00:00
2 lines
9.0 KiB
JavaScript
2 lines
9.0 KiB
JavaScript
import{d as N,r as y,R as b,w as j,e as x,f as B,g as r,u as o,B as s,Q as $,v as O,x as l,y as t,A as f}from"./base-2de02574.js";/* empty css *//* empty css */import{a as I,E as K}from"./el-form-item-aacba116.js";/* empty css *//* empty css */import{_ as Q}from"./index-9e72c628.js";/* empty css */import{t as e}from"./index-a7cd5616.js";import{g as W,a as F,e as L}from"./wechat-8c545a43.js";import{E as z}from"./index-29aaa146.js";import{u as G,a as H}from"./vue-router-834a68c8.js";import{a as V}from"./index-99061637.js";import{E as J}from"./index-f34dc67c.js";import{E as X}from"./index-409cdc90.js";import{E as Y,b as Z}from"./index-8a191767.js";import{E as ee}from"./index-84eb3c18.js";import{v as oe}from"./directive-ce271fd4.js";import"./index-53431221.js";import"./event-30fa88cc.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-11e8968f.js";import"./el-overlay-c29a408e.js";import"./index-fa3f6669.js";import"./focus-trap-852901de.js";import"./index-a556d0d2.js";import"./index-53f4bde2.js";import"./attachment-98d5a55e.js";/* empty css *//* empty css *//* empty css */import"./index-4ca69875.js";import"./common-655c495e.js";import"./index-e049ae93.js";import"./el-main-e7ca7755.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./index-907c8fa3.js";/* empty css */import"./index-389593d1.js";import"./index-9c3282b5.js";/* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./index-78ade149.js";import"./index-652deeae.js";import"./aria-adfa05c5.js";import"./validator-a9a156f1.js";import"./index-54d93aac.js";import"./index-6b1f8a1b.js";import"./index-afc66c39.js";import"./index-17e30841.js";import"./debounce-b627eb85.js";import"./position-a4d7d9b3.js";import"./index-56e41120.js";import"./index-7e51d50f.js";import"./isEqual-aeead489.js";import"./index-f6c4798d.js";import"./index-9868687d.js";import"./index-e3e3f033.js";import"./strings-258503d1.js";import"./index-dfcf0976.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"},Bo=N({__name:"config",setup(ke){const k=G(),E=H(),P=k.meta.title,u=y(!0),n=b({wechat_name:"",wechat_original:"",app_id:"",app_secret:"",qr_code:"",token:"",encoding_aes_key:"",encryption_type:"not_encrypt"}),v=y(),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"}]});W().then(m=>{Object.assign(n,m.data),u.value=!1});const c=b({business_domain:"",js_secure_domain:"",serve_url:"",web_auth_domain:""});F().then(m=>{Object.assign(c,m.data),u.value=!1});const{copy:C,isSupported:T,copied:w}=z(),_=m=>{if(!T.value){V({message:e("notSupportCopy"),type:"warning"});return}C(m)};j(w,()=>{w.value&&V({message:e("copySuccess"),type:"success"})});const q=async m=>{u.value||!m||await m.validate(async a=>{a&&(u.value=!0,L(n).then(()=>{u.value=!1}).catch(()=>{u.value=!1}))})};return(m,a)=>{const d=J,p=I,A=Q,h=X,g=Y,R=Z,U=K,D=ee,M=oe;return x(),B("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)]),$((x(),O(U,{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(R,{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"])),[[M,u.value]]),r("div",xe,[r("div",Ve,[t(D,{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{Bo as default};
|