import{_ as w}from"./index.dd27da2c.js";import{$ as C,N as b,C as V,D as y,F as S,w as k}from"./element-plus.55d71530.js";import{r as F}from"./index.b7f6427b.js";import{d as f,_ as x,s as I,aq as q,o as d,c as N,V as e,M as u,a,u as n,O as R,L as O,S as U}from"./@vue.96c135a1.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.f4694335.js";import"./@element-plus.07bd0514.js";import"./dayjs.37feae28.js";import"./@amap.8a62addd.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./lodash.d6737109.js";import"./axios.c6b9fe3d.js";import"./vue-router.64fdcd9a.js";import"./pinia.aebd7275.js";import"./css-color-function.7f53c13d.js";import"./color.4952d479.js";import"./clone.dd01d7ea.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.80787eb0.js";import"./tslib.60310f1a.js";import"./zrender.6f33727c.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.3d7ee361.js";function L(s){return F.post({url:"/channel.open_setting/setConfig",params:s})}function M(){return F.get({url:"/channel.open_setting/getConfig"})}const T=a("div",{class:"font-medium mb-7"},"\u7F51\u7AD9\u5E94\u7528",-1),$={class:"w-80"},j={class:"w-80"},z=f({name:"wxDevConfig"}),he=f({...z,setup(s){const t=x({app_id:"",app_secret:""}),i=I(),E={app_id:[{required:!0,message:"\u8BF7\u8F93\u5165AppID",trigger:["blur","change"]}],app_secret:[{required:!0,message:"\u8BF7\u8F93\u5165AppSecret",trigger:["blur","change"]}]},l=async()=>{const r=await M();for(const o in t)t[o]=r[o]},g=async()=>{var r;await((r=i.value)==null?void 0:r.validate()),await L(t),l()};return l(),(r,o)=>{const D=C,m=b,c=V,_=y,A=S,B=k,v=w,h=q("perms");return d(),N("div",null,[e(m,{class:"!border-none",shadow:"never"},{default:u(()=>[e(D,{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(A,{ref_key:"formRef",ref:i,model:n(t),rules:E,"label-width":"160px"},{default:u(()=>[e(m,{class:"!border-none mt-4",shadow:"never"},{default:u(()=>[T,e(_,{label:"AppID",prop:"app_id"},{default:u(()=>[a("div",$,[e(c,{modelValue:n(t).app_id,"onUpdate:modelValue":o[0]||(o[0]=p=>n(t).app_id=p),placeholder:"\u8BF7\u8F93\u5165AppID"},null,8,["modelValue"])])]),_:1}),e(_,{label:"AppSecret",prop:"app_secret"},{default:u(()=>[a("div",null,[a("div",j,[e(c,{modelValue:n(t).app_secret,"onUpdate:modelValue":o[1]||(o[1]=p=>n(t).app_secret=p),placeholder:"\u8BF7\u8F93\u5165AppSecret"},null,8,["modelValue"])])])]),_:1})]),_:1})]),_:1},8,["model"]),R((d(),O(v,null,{default:u(()=>[e(B,{type:"primary",onClick:g},{default:u(()=>[U("\u4FDD\u5B58")]),_:1})]),_:1})),[[h,["channel.open_setting/setConfig"]]])])}}});export{he as default};
