import{_ as v}from"./index.65ffcc98.js";import{T as w,J as C,B as b,C as V,D as y,w as k}from"./element-plus.ae8e286c.js";import{r as d}from"./index.fccb4ef5.js";import{d as F,_ as x,s as S,ae as I,o as _,c as R,T as e,K as u,L as q,J as N,a as n,R as T}from"./@vue.108c970a.js";import"./@vueuse.d3d080b7.js";import"./@element-plus.d6eabd08.js";import"./lodash-es.29c53eac.js";import"./dayjs.664390f6.js";import"./axios.4ebfdb3f.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.e92d81a1.js";import"./vue-router.ed788fee.js";import"./pinia.eff1ffd5.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.dbf33394.js";import"./color.e1b5fced.js";import"./clone.0a4e8ac3.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.f174a91e.js";import"./ms.a9ae1d6d.js";import"./nprogress.d7c3ab1b.js";import"./vue-clipboard3.add720e2.js";import"./clipboard.01ea18f5.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.241b9b5d.js";function J(a){return d.post({url:"/channel.open_setting/setConfig",params:a})}function O(){return d.get({url:"/channel.open_setting/getConfig"})}const U=n("div",{class:"font-medium mb-7"},"\u7F51\u7AD9\u5E94\u7528",-1),K={class:"w-80"},L={class:"w-80"},j=T("\u4FDD\u5B58"),z=F({name:"wxDevConfig"}),Ce=F({...z,setup(a){const t=x({app_id:"",app_secret:""}),s=S(),f={app_id:[{required:!0,message:"\u8BF7\u8F93\u5165AppID",trigger:["blur","change"]}],app_secret:[{required:!0,message:"\u8BF7\u8F93\u5165AppSecret",trigger:["blur","change"]}]},i=async()=>{const r=await O();for(const o in t)t[o]=r[o]},E=async()=>{var r;await((r=s.value)==null?void 0:r.validate()),await J(t),i()};return i(),(r,o)=>{const g=w,l=C,m=b,c=V,B=y,D=k,A=v,h=I("perms");return _(),R("div",null,[e(l,{class:"!border-none",shadow:"never"},{default:u(()=>[e(g,{type:"warning",title:"\u6E29\u99A8\u63D0\u793A\uFF1A\u586B\u5199\u5FAE\u4FE1\u5F00\u653E\u5E73\u53F0\u5F00\u53D1\u914D\u7F6E\uFF0C\u8BF7\u524D\u5F80\u5FAE\u4FE1\u5F00\u653E\u5E73\u53F0\u521B\u5EFA\u5E94\u7528\u5E76\u5B8C\u6210\u8BA4\u8BC1\uFF1B\u7F51\u7AD9\u5E94\u7528\u914D\u7F6E\u4E3B\u8981\u7528\u4E8E\u7F51\u7AD9\u5FAE\u4FE1\u767B\u5F55\u548C\u5FAE\u4FE1\u652F\u4ED8",closable:!1,"show-icon":""})]),_:1}),e(B,{ref_key:"formRef",ref:s,model:t,rules:f,"label-width":"160px"},{default:u(()=>[e(l,{class:"!border-none mt-4",shadow:"never"},{default:u(()=>[U,e(c,{label:"AppID",prop:"app_id"},{default:u(()=>[n("div",K,[e(m,{modelValue:t.app_id,"onUpdate:modelValue":o[0]||(o[0]=p=>t.app_id=p),placeholder:"\u8BF7\u8F93\u5165AppID"},null,8,["modelValue"])])]),_:1}),e(c,{label:"AppSecret",prop:"app_secret"},{default:u(()=>[n("div",null,[n("div",L,[e(m,{modelValue:t.app_secret,"onUpdate:modelValue":o[1]||(o[1]=p=>t.app_secret=p),placeholder:"\u8BF7\u8F93\u5165AppSecret"},null,8,["modelValue"])])])]),_:1})]),_:1})]),_:1},8,["model"]),q((_(),N(A,null,{default:u(()=>[e(D,{type:"primary",onClick:E},{default:u(()=>[j]),_:1})]),_:1})),[[h,["channel.open_setting/setConfig"]]])])}}});export{Ce as default};