全栈小学生 d9db301efd update admin
2023-10-24 15:45:07 +08:00

2 lines
8.9 KiB
JavaScript

import{d as N,r as y,R as b,w as j,e as x,f as B,g as s,u as o,B as r,Q as $,v as O,x as l,y as t,A as f}from"./base-06478700.js";/* empty css *//* empty css */import{a as I,E as K}from"./el-form-item-314d006d.js";/* empty css *//* empty css */import{_ as Q}from"./index-23c18f3a.js";/* empty css */import{t as e}from"./index-7ea27073.js";import{g as W,a as F,e as L}from"./wechat-3da91286.js";import{a3 as z}from"./event-10eba222.js";import{u as G,a as H}from"./vue-router-d09a2c28.js";import{a as V}from"./index-b52d0f2a.js";import{E as J}from"./index-b68e8463.js";import{E as X}from"./index-e10fccde.js";import{E as Y,b as Z}from"./index-6290cf08.js";import{E as ee}from"./index-c2f001d3.js";import{v as oe}from"./directive-cb2d3366.js";import"./index-2fcd1254.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-c31da5fc.js";import"./el-overlay-42a687c6.js";import"./index-9fe5de95.js";import"./focus-trap-3e826cdc.js";import"./index-f27d6ce0.js";import"./index-818c0ce2.js";import"./attachment-ad37f228.js";/* empty css *//* empty css *//* empty css */import"./index-00549cce.js";import"./common-92a35870.js";import"./index-adb89d14.js";import"./el-main-9a0960e7.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./index-6b67c4ac.js";import"./el-tooltip-58212670.js";import"./index-2a269c7c.js";import"./index-e4abfaa5.js";import"./index-9ee9102c.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index-83b88e67.js";import"./index-01f6e375.js";import"./validator-6e9db238.js";import"./index-41a974fa.js";import"./index-c17093ae.js";import"./index-543fb162.js";import"./index-b6a184ba.js";import"./debounce-1db848fd.js";import"./position-c3bcd0be.js";import"./index-b56195b5.js";import"./index-40e21e72.js";import"./isEqual-42d4b10f.js";import"./index-137757c0.js";import"./index-35e821cc.js";import"./index-34d55b7e.js";import"./strings-fe930bc4.js";import"./index-5a0d60aa.js";const te={class:"main-container"},ae={class:"detail-head"},le=s("span",{class:"iconfont iconxiangzuojiantou !text-xs"},null,-1),se={class:"ml-[1px]"},re=s("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"},No=N({__name:"config",setup(ke){const k=G(),P=H(),E=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,[s("div",ae,[s("div",{class:"left",onClick:a[0]||(a[0]=i=>o(P).push({path:"/website/channel/wechat"}))},[le,s("span",se,r(o(e)("returnToPreviousPage")),1)]),re,s("span",ie,r(o(E)),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(()=>[s("h3",ne,r(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"]),s("div",pe,r(o(e)("wechatQrcodeTips")),1)]),_:1},8,["label"])]),_:1}),t(h,{class:"box-card !border-none mt-[16px]",shadow:"never"},{default:l(()=>[s("h3",de,r(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"]),s("div",ce,r(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"]),s("div",me,r(o(e)("wechatAppsecretTips")),1)]),_:1},8,["label"])]),_:1}),t(h,{class:"box-card !border-none mt-[16px]",shadow:"never"},{default:l(()=>[s("h3",ue,r(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(()=>[s("div",{class:"cursor-pointer",onClick:a[6]||(a[6]=i=>_(c.serve_url))},r(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"]),s("div",_e,r(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"]),s("div",he,r(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(r(o(e)("cleartextMode")),1)]),_:1}),t(g,{label:"compatible"},{default:l(()=>[f(r(o(e)("compatibleMode")),1)]),_:1}),t(g,{label:"safe"},{default:l(()=>[f(r(o(e)("safeMode")),1)]),_:1})]),_:1},8,["modelValue"]),s("div",fe,r(o(e)("cleartextModeTips")),1),s("div",ge,r(o(e)("compatibleModeTips")),1),s("div",be,r(o(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,r(o(e)("functionSetting")),1)]),t(p,{label:""},{default:l(()=>[s("div",ye,r(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(()=>[s("div",{class:"cursor-pointer",onClick:a[10]||(a[10]=i=>_(c.business_domain))},r(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(()=>[s("div",{class:"cursor-pointer",onClick:a[11]||(a[11]=i=>_(c.business_domain))},r(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(()=>[s("div",{class:"cursor-pointer",onClick:a[12]||(a[12]=i=>_(c.business_domain))},r(o(e)("copy")),1)]),_:1},8,["model-value"])]),_:1},8,["label"])]),_:1})]),_:1},8,["model","rules"])),[[M,u.value]]),s("div",xe,[s("div",Ve,[t(D,{type:"primary",loading:u.value,onClick:a[13]||(a[13]=i=>q(v.value))},{default:l(()=>[f(r(o(e)("save")),1)]),_:1},8,["loading"])])])])}}});export{No as default};