import{_ as y}from"./index-BwK8zDrs.js";import{G as A,H as E,B as S,C as k,D as x,h as B}from"./element-plus-z3MwpXC9.js";import{r as f}from"./index-DXEGVToZ.js";import{d as g,Z as I,s as R,an as q,o as u,c as N,V as t,M as r,a,u as p,O,L as F,S as U}from"./@vue-TMcuEboY.js";import"./lodash-es-R-kYiKr_.js";import"./async-validator-DKvM95Vc.js";import"./@element-plus-DRBc1Xzw.js";import"./dayjs-CMfar2R3.js";import"./balanced-match-mNcR6oh4.js";import"./@ctrl-r5W6hzzQ.js";import"./normalize-wheel-es-B6fDCfyv.js";import"./@popperjs-D9SI2xQl.js";import"./nprogress-Cgf5DU8x.js";import"./vue-router-D4MxfuQi.js";import"./pinia-ebUeA1L2.js";import"./axios-C-n2IhIP.js";import"./lodash-BtPWuHkK.js";import"./@vueuse-BQYVjZ5N.js";import"./css-color-function-rJvg8h-6.js";import"./color-B0v57BL7.js";import"./clone-CuIhj1wH.js";import"./color-convert-BGgJB5UM.js";import"./color-name-BQ5IbGbl.js";import"./color-string-BhgG7-8u.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-8CNoFg4V.js";import"./clipboard-Dch_ozqB.js";import"./echarts-BR_QmBtV.js";import"./tslib-BDyQ-Jie.js";import"./zrender-B-CeXLwU.js";import"./highlight.js-D5uP1KGk.js";import"./@highlightjs-KJi31KWJ.js";function G(i){return f.post({url:"/channel.open_setting/setConfig",params:i})}function H(){return f.get({url:"/channel.open_setting/getConfig"})}const L={class:"w-80"},M={class:"w-80"},T=g({name:"wxDevConfig"}),Ce=g({...T,setup(i){const o=I({app_id:"",app_secret:""}),l=R(),v={app_id:[{required:!0,message:"请输入AppID",trigger:["blur","change"]}],app_secret:[{required:!0,message:"请输入AppSecret",trigger:["blur","change"]}]},m=async()=>{const n=await H();for(const e in o)o[e]=n[e]},w=async()=>{var n;await((n=l.value)==null?void 0:n.validate()),await G(o),m()};return m(),(n,e)=>{const b=A,c=E,_=S,d=k,h=x,C=B,V=y,D=q("perms");return u(),N("div",null,[t(c,{class:"!border-none",shadow:"never"},{default:r(()=>[t(b,{type:"warning",title:"温馨提示：填写微信开放平台开发配置，请前往微信开放平台创建应用并完成认证；网站应用配置主要用于网站微信登录和微信支付",closable:!1,"show-icon":""})]),_:1}),t(h,{ref_key:"formRef",ref:l,model:p(o),rules:v,"label-width":"160px"},{default:r(()=>[t(c,{class:"!border-none mt-4",shadow:"never"},{default:r(()=>[e[2]||(e[2]=a("div",{class:"font-medium mb-7"},"网站应用",-1)),t(d,{label:"AppID",prop:"app_id"},{default:r(()=>[a("div",L,[t(_,{modelValue:p(o).app_id,"onUpdate:modelValue":e[0]||(e[0]=s=>p(o).app_id=s),placeholder:"请输入AppID"},null,8,["modelValue"])])]),_:1}),t(d,{label:"AppSecret",prop:"app_secret"},{default:r(()=>[a("div",null,[a("div",M,[t(_,{modelValue:p(o).app_secret,"onUpdate:modelValue":e[1]||(e[1]=s=>p(o).app_secret=s),placeholder:"请输入AppSecret"},null,8,["modelValue"])])])]),_:1})]),_:1})]),_:1},8,["model"]),O((u(),F(V,null,{default:r(()=>[t(C,{type:"primary",onClick:w},{default:r(()=>e[3]||(e[3]=[U("保存")])),_:1})]),_:1})),[[D,["channel.open_setting/setConfig"]]])])}}});export{Ce as default};
