import{_ as v}from"./index.25a763ba.js";import{a0 as w,C,I as b,y as V,D as y,w as k}from"./element-plus.517d4382.js";import{r as d}from"./index.8b1962e9.js";import{d as F,a0 as x,s as I,ai as S,o as _,c as R,V as e,M as u,O as q,L as N,a as n,T as O}from"./@vue.ab566ce7.js";import"./@vueuse.8fcae4c2.js";import"./@element-plus.b89f1627.js";import"./lodash-es.49f4af13.js";import"./dayjs.4afe12d3.js";import"./axios.37fc980d.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.1d82ee7c.js";import"./vue-router.87ebc608.js";import"./pinia.b6700c26.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.d0bec2c9.js";import"./color.ea90db3f.js";import"./clone.cbd692e6.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.ad6bc3c0.js";import"./ms.a9ae1d6d.js";import"./nprogress.bcdf1f46.js";import"./vue-clipboard3.c45111bf.js";import"./clipboard.1cb79a0d.js";import"./echarts.b30ab882.js";import"./tslib.60310f1a.js";import"./zrender.3760070d.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.62ff6725.js";function T(p){return d.post({url:"/channel.open_setting/setConfig",params:p})}function U(){return d.get({url:"/channel.open_setting/getConfig"})}const L=n("div",{class:"font-medium mb-7"},"\u7F51\u7AD9\u5E94\u7528",-1),M={class:"w-80"},j={class:"w-80"},z=O("\u4FDD\u5B58"),G=F({name:"wxDevConfig"}),we=F({...G,setup(p){const t=x({app_id:"",app_secret:""}),s=I(),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 U();for(const o in t)t[o]=r[o]},E=async()=>{var r;await((r=s.value)==null?void 0:r.validate()),await T(t),i()};return i(),(r,o)=>{const g=w,l=C,m=b,c=V,D=y,A=k,B=v,h=S("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(D,{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(()=>[L,e(c,{label:"AppID",prop:"app_id"},{default:u(()=>[n("div",M,[e(m,{modelValue:t.app_id,"onUpdate:modelValue":o[0]||(o[0]=a=>t.app_id=a),placeholder:"\u8BF7\u8F93\u5165AppID"},null,8,["modelValue"])])]),_:1}),e(c,{label:"AppSecret",prop:"app_secret"},{default:u(()=>[n("div",null,[n("div",j,[e(m,{modelValue:t.app_secret,"onUpdate:modelValue":o[1]||(o[1]=a=>t.app_secret=a),placeholder:"\u8BF7\u8F93\u5165AppSecret"},null,8,["modelValue"])])])]),_:1})]),_:1})]),_:1},8,["model"]),q((_(),N(B,null,{default:u(()=>[e(A,{type:"primary",onClick:E},{default:u(()=>[z]),_:1})]),_:1})),[[h,["channel.open_setting/setConfig"]]])])}}});export{we as default};