suyuan/public/admin/assets/open_setting.1818aadd.js

2 lines
3.2 KiB
JavaScript

import{_ as v}from"./index.81af3e67.js";import{K as w,I as C,B as b,C as V,D as y,w as k}from"./element-plus.5df6f736.js";import{r as d}from"./index.dab55926.js";import{d as F,_ as x,s as I,ae as S,o as _,c as R,T as e,K as u,L as q,J as N,a as n,R as K}from"./@vue.108c970a.js";import"./@vueuse.d3d080b7.js";import"./@element-plus.d6eabd08.js";import"./lodash-es.29c53eac.js";import"./dayjs.50c3b6f7.js";import"./axios.c2a2014a.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.33f675f2.js";import"./vue-router.ed788fee.js";import"./pinia.eff1ffd5.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.5d5b8bda.js";import"./color.da05fa89.js";import"./clone.06747a68.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.1c707d7b.js";import"./ms.a9ae1d6d.js";import"./nprogress.fc605139.js";import"./vue-clipboard3.dc900a40.js";import"./clipboard.6beb87aa.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.241b9b5d.js";function O(a){return d.post({url:"/channel.open_setting/setConfig",params:a})}function T(){return d.get({url:"/channel.open_setting/getConfig"})}const U=n("div",{class:"font-medium mb-7"},"\u7F51\u7AD9\u5E94\u7528",-1),J={class:"w-80"},L={class:"w-80"},j=K("\u4FDD\u5B58"),z=F({name:"wxDevConfig"}),Ce=F({...z,setup(a){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 T();for(const o in t)t[o]=r[o]},E=async()=>{var r;await((r=s.value)==null?void 0:r.validate()),await O(t),i()};return i(),(r,o)=>{const g=w,l=C,m=b,c=V,B=y,D=k,A=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(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",J,[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};