全栈小学生 b4d1350cf3 update admin
2023-07-01 16:28:06 +08:00

2 lines
8.4 KiB
JavaScript

import{g as M,r as y,a4 as g,w as N,m as x,n as R,q as r,L as s,u as t,a1 as j,D as B,E as l,F as o,K as h}from"./base-45eb5090.js";/* empty css *//* empty css *//* empty css */import{E as K,b as O}from"./el-radio-2719e44c.js";/* empty css */import{_ as $}from"./index-a7c34c2b.js";/* empty css */import{t as e}from"./index-3694a2b2.js";import{g as I,a as F,e as L}from"./wechat-517ad307.js";import{J as W}from"./event-4977bef7.js";import{u as Q}from"./vue-router-fcbaaf02.js";import{a as V}from"./index-aef37b98.js";import{E as G}from"./index-4ce9333e.js";import{a as J,E as z}from"./index-2bfbe5a7.js";import{E as H}from"./index-fc3020f4.js";import{E as X}from"./index-25c37860.js";import{v as Y}from"./directive-9f485fe5.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-0436c5a5.js";import"./el-overlay-616d6124.js";import"./index-cd1661d3.js";import"./focus-trap-318ae2e0.js";import"./attachment-95048130.js";/* empty css *//* empty css *//* empty css */import"./index-ad71a852.js";import"./storage-4159d1ed.js";import"./index-9670e877.js";import"./index-3be486d3.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./el-tooltip-58212670.js";import"./el-avatar-bc58ad46.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./index-47488199.js";import"./index-0d830c44.js";import"./index-a096e75b.js";import"./index-a2f15582.js";import"./index-719dad93.js";import"./index-c0090d79.js";import"./isEqual-f877b6c1.js";import"./_Uint8Array-e584e472.js";import"./flatten-0fc8b7eb.js";import"./index-e841b684.js";import"./index-cc9a73f0.js";import"./index-201145a4.js";import"./strings-2444fdb3.js";import"./common-af78c857.js";import"./common-2cf17469.js";import"./_initCloneObject-983ff8c8.js";const Z={class:"main-container"},ee={class:"flex ml-[18px] justify-between items-center mt-[20px]"},te={class:"text-[20px]"},oe={class:"panel-title !text-sm"},ae={class:"form-tip"},le={class:"panel-title !text-sm"},re={class:"form-tip"},se={class:"form-tip"},ie={class:"panel-title !text-sm"},ne={class:"form-tip"},pe={class:"form-tip"},de={class:"form-tip"},ce={class:"form-tip"},me={class:"form-tip"},ue={class:"flex"},_e={class:"panel-title !text-sm"},fe={class:"form-tip"},he={class:"fixed-footer-wrap"},be={class:"fixed-footer"},wt=M({__name:"config",setup(ge){const k=Q().meta.title,u=y(!0),n=g({wechat_name:"",wechat_original:"",app_id:"",app_secret:"",qr_code:"",token:"",encoding_aes_key:"",encryption_type:"not_encrypt"}),v=y(),E=g({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"}]});I().then(m=>{Object.assign(n,m.data),u.value=!1});const c=g({business_domain:"",js_secure_domain:"",serve_url:"",web_auth_domain:""});F().then(m=>{Object.assign(c,m.data),u.value=!1});const{copy:P,isSupported:S,copied:w}=W(),_=m=>{if(!S.value){V({message:e("notSupportCopy"),type:"warning"});return}P(m)};N(w,()=>{w.value&&V({message:e("copySuccess"),type:"success"})});const C=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=G,p=J,T=$,f=H,b=K,q=O,A=z,U=X,D=Y;return x(),R("div",Z,[r("div",ee,[r("span",te,s(t(k)),1)]),j((x(),B(A,{model:n,"label-width":"150px",ref_key:"formRef",ref:v,rules:E,class:"page-form"},{default:l(()=>[o(f,{class:"box-card !border-none",shadow:"never"},{default:l(()=>[r("h3",oe,s(t(e)("wechatInfo")),1),o(p,{label:t(e)("wechatName"),prop:"wechat_name"},{default:l(()=>[o(d,{modelValue:n.wechat_name,"onUpdate:modelValue":a[0]||(a[0]=i=>n.wechat_name=i),placeholder:t(e)("wechatNamePlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(p,{label:t(e)("wechatOriginal"),prop:"wechat_original"},{default:l(()=>[o(d,{modelValue:n.wechat_original,"onUpdate:modelValue":a[1]||(a[1]=i=>n.wechat_original=i),placeholder:t(e)("wechatOriginalPlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(p,{label:t(e)("wechatQrcode"),prop:"qr_code"},{default:l(()=>[o(T,{modelValue:n.qr_code,"onUpdate:modelValue":a[2]||(a[2]=i=>n.qr_code=i)},null,8,["modelValue"]),r("div",ae,s(t(e)("wechatQrcodeTips")),1)]),_:1},8,["label"])]),_:1}),o(f,{class:"box-card !border-none mt-[16px]",shadow:"never"},{default:l(()=>[r("h3",le,s(t(e)("wechatDevelopInfo")),1),o(p,{label:t(e)("wechatAppid"),prop:"app_id"},{default:l(()=>[o(d,{modelValue:n.app_id,"onUpdate:modelValue":a[3]||(a[3]=i=>n.app_id=i),placeholder:t(e)("appidPlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"]),r("div",re,s(t(e)("wechatAppidTips")),1)]),_:1},8,["label"]),o(p,{label:t(e)("wechatAppsecret"),prop:"app_secret"},{default:l(()=>[o(d,{modelValue:n.app_secret,"onUpdate:modelValue":a[4]||(a[4]=i=>n.app_secret=i),placeholder:t(e)("appSecretPlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"]),r("div",se,s(t(e)("wechatAppsecretTips")),1)]),_:1},8,["label"])]),_:1}),o(f,{class:"box-card !border-none mt-[16px]",shadow:"never"},{default:l(()=>[r("h3",ie,s(t(e)("theServerSetting")),1),o(p,{label:"URL"},{default:l(()=>[o(d,{"model-value":c.serve_url,placeholder:"Please input",class:"input-width",readonly:!0},{append:l(()=>[r("div",{class:"cursor-pointer",onClick:a[5]||(a[5]=i=>_(c.serve_url))},s(t(e)("copy")),1)]),_:1},8,["model-value"])]),_:1}),o(p,{label:"Token",prop:"token"},{default:l(()=>[o(d,{modelValue:n.token,"onUpdate:modelValue":a[6]||(a[6]=i=>n.token=i),placeholder:t(e)("tokenPlaceholder"),class:"input-width",maxlength:"32","show-word-limit":"",clearable:""},null,8,["modelValue","placeholder"]),r("div",ne,s(t(e)("tokenTips")),1)]),_:1}),o(p,{label:"EncodingAESKey",prop:"encoding_aes_key"},{default:l(()=>[o(d,{modelValue:n.encoding_aes_key,"onUpdate:modelValue":a[7]||(a[7]=i=>n.encoding_aes_key=i),placeholder:t(e)("encodingAesKeyPlaceholder"),class:"input-width",maxlength:"43","show-word-limit":"",clearable:""},null,8,["modelValue","placeholder"]),r("div",pe,s(t(e)("encodingAESKeyTips")),1)]),_:1}),o(p,{label:t(e)("encryptionType"),prop:"encryption_type"},{default:l(()=>[o(q,{modelValue:n.encryption_type,"onUpdate:modelValue":a[8]||(a[8]=i=>n.encryption_type=i)},{default:l(()=>[o(b,{label:"not_encrypt"},{default:l(()=>[h(s(t(e)("cleartextMode")),1)]),_:1}),o(b,{label:"compatible"},{default:l(()=>[h(s(t(e)("compatibleMode")),1)]),_:1}),o(b,{label:"safe"},{default:l(()=>[h(s(t(e)("safeMode")),1)]),_:1})]),_:1},8,["modelValue"]),r("div",de,s(t(e)("cleartextModeTips")),1),r("div",ce,s(t(e)("compatibleModeTips")),1),r("div",me,s(t(e)("safeModeTips")),1)]),_:1},8,["label"])]),_:1}),o(f,{class:"box-card !border-none mt-[16px]",shadow:"never"},{default:l(()=>[r("div",ue,[r("h3",_e,s(t(e)("functionSetting")),1)]),o(p,{label:""},{default:l(()=>[r("div",fe,s(t(e)("functionSettingTips")),1)]),_:1}),o(p,{label:t(e)("businessDomain")},{default:l(()=>[o(d,{"model-value":c.business_domain,placeholder:"Please input",class:"input-width",readonly:!0},{append:l(()=>[r("div",{class:"cursor-pointer",onClick:a[9]||(a[9]=i=>_(c.business_domain))},s(t(e)("copy")),1)]),_:1},8,["model-value"])]),_:1},8,["label"]),o(p,{label:t(e)("jsSecureDomain")},{default:l(()=>[o(d,{"model-value":c.js_secure_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(t(e)("copy")),1)]),_:1},8,["model-value"])]),_:1},8,["label"]),o(p,{label:t(e)("webAuthDomain")},{default:l(()=>[o(d,{"model-value":c.web_auth_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(t(e)("copy")),1)]),_:1},8,["model-value"])]),_:1},8,["label"])]),_:1})]),_:1},8,["model","rules"])),[[D,u.value]]),r("div",he,[r("div",be,[o(U,{type:"primary",loading:u.value,onClick:a[12]||(a[12]=i=>C(v.value))},{default:l(()=>[h(s(t(e)("save")),1)]),_:1},8,["loading"])])])])}}});export{wt as default};