WokerTask/public/admin/assets/open_setting.fe2e5ef9.js

2 lines
3.3 KiB
JavaScript

import{_ as w}from"./index.724d68bf.js";import{T as C,J as b,C as V,D as y,F as k,w as x}from"./element-plus.ff90c99c.js";import{r as F}from"./index.69a22209.js";import{d as f,$ as S,s as I,aq as R,o as d,c as q,W as e,Q as u,a as n,u as p,R as N,P as U,U as O}from"./@vue.f8dfc830.js";import"./lodash-es.a73406b7.js";import"./@vueuse.a2e59ee9.js";import"./@element-plus.0374639c.js";import"./@popperjs.36402333.js";import"./@ctrl.b082b0c1.js";import"./dayjs.7f1be2bc.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./memoize-one.4ee5c96d.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./@floating-ui.34a21088.js";import"./lodash.3e731b89.js";import"./axios.c2babb35.js";import"./vue-router.6d4cf914.js";import"./pinia.4b196199.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.3a7f085f.js";import"./color.5ae3e2dd.js";import"./clone.7bcb5228.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.37836f15.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.79024f1a.js";function T(i){return F.post({url:"/channel.open_setting/setConfig",params:i})}function J(){return F.get({url:"/channel.open_setting/getConfig"})}const P=n("div",{class:"font-medium mb-7"},"\u7F51\u7AD9\u5E94\u7528",-1),Q={class:"w-80"},W={class:"w-80"},$=f({name:"wxDevConfig"}),ye=f({...$,setup(i){const t=S({app_id:"",app_secret:""}),s=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 J();for(const o in t)t[o]=r[o]},g=async()=>{var r;await((r=s.value)==null?void 0:r.validate()),await T(t),l()};return l(),(r,o)=>{const D=C,m=b,c=V,_=y,A=k,B=x,v=w,h=R("perms");return d(),q("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:s,model:p(t),rules:E,"label-width":"160px"},{default:u(()=>[e(m,{class:"!border-none mt-4",shadow:"never"},{default:u(()=>[P,e(_,{label:"AppID",prop:"app_id"},{default:u(()=>[n("div",Q,[e(c,{modelValue:p(t).app_id,"onUpdate:modelValue":o[0]||(o[0]=a=>p(t).app_id=a),placeholder:"\u8BF7\u8F93\u5165AppID"},null,8,["modelValue"])])]),_:1}),e(_,{label:"AppSecret",prop:"app_secret"},{default:u(()=>[n("div",null,[n("div",W,[e(c,{modelValue:p(t).app_secret,"onUpdate:modelValue":o[1]||(o[1]=a=>p(t).app_secret=a),placeholder:"\u8BF7\u8F93\u5165AppSecret"},null,8,["modelValue"])])])]),_:1})]),_:1})]),_:1},8,["model"]),N((d(),U(v,null,{default:u(()=>[e(B,{type:"primary",onClick:g},{default:u(()=>[O("\u4FDD\u5B58")]),_:1})]),_:1})),[[h,["channel.open_setting/setConfig"]]])])}}});export{ye as default};