test_lgq/niucloud/public/admin/assets/wxoplatform-bc304798.js

2 lines
4.0 KiB
JavaScript
Raw Normal View History

2024-01-24 17:36:08 +08:00
import{d as y,O as k,r as f,n as b,N as t,h as _,c as D,a as i,t as u,u as o,y as E,I as U,w as s,e as l,i as C,W as q,X as B,$ as P,Y as R,E as N,a0 as F}from"./index-4dcc0234.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css */import{Q as I,R as S}from"./sys-8ead7f22.js";const Q={class:"main-container"},T={class:"flex ml-[18px] justify-between items-center mt-[20px]"},j={class:"text-[20px]"},A={class:"panel-title !text-sm"},O={class:"panel-title !text-sm"},W={class:"panel-title !text-sm"},$={class:"fixed-footer-wrap"},K={class:"fixed-footer"},ae=y({__name:"wxoplatform",setup(L){const v=k().meta.title,m=f(!0),e=b({appid:"",appsecret:"",token:"",key:"",email:"",mobile:"",qq:"",wx:"",start_domain:"",receive_url:"",message_receive:"",host:""});(async(p=0)=>{const a=await(await I()).data;Object.keys(e).forEach(r=>{a[r]!=null&&(e[r]=a[r])}),m.value=!1})();const c=f();b({site_name:[{required:!0,message:t("siteNamePlaceholder"),trigger:"blur"}]});const V=async p=>{m.value||!p||await p.validate(async a=>{a&&(m.value=!0,S(e).then(()=>{m.value=!1}).catch(()=>{m.value=!1}))})};return(p,a)=>{const r=q,d=B,w=P,h=R,x=N,g=F;return _(),D("div",Q,[i("div",T,[i("span",j,u(o(v)),1)]),E((_(),U(h,{model:e,"label-width":"150px",ref_key:"formRef",ref:c,class:"page-form"},{default:s(()=>[l(w,{class:"box-card !border-none mt-[5px]",shadow:"never"},{default:s(()=>[i("h3",A,u(o(t)("oplatformSetting")),1),l(d,{label:"APPID"},{default:s(()=>[l(r,{modelValue:e.appid,"onUpdate:modelValue":a[0]||(a[0]=n=>e.appid=n),placeholder:o(t)("appidPlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"])]),_:1}),l(d,{label:"APPSECRET"},{default:s(()=>[l(r,{modelValue:e.appsecret,"onUpdate:modelValue":a[1]||(a[1]=n=>e.appsecret=n),placeholder:o(t)("appsecretPlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"])]),_:1}),i("h3",O,u(o(t)("oplatformComm")),1),l(d,{label:o(t)("empowerStartDomain")},{default:s(()=>[i("span",null,u(e.start_domain),1)]),_:1},8,["label"]),l(d,{label:o(t)("empowerReceiveUrl")},{default:s(()=>[i("span",null,u(e.receive_url),1)]),_:1},8,["label"]),l(d,{label:o(t)("messageValidationToken")},{default:s(()=>[l(r,{modelValue:e.token,"onUpdate:modelValue":a[2]||(a[2]=n=>e.token=n),class:"input-width",clearable:""},null,8,["modelValue"])]),_:1},8,["label"]),l(d,{label:o(t)("messageDecryptKey")},{default:s(()=>[l(r,{modelValue:e.key,"onUpdate:modelValue":a[3]||(a[3]=n=>e.key=n),class:"input-width",clearable:""},null,8,["modelValue"])]),_:1},8,["label"]),l(d,{label:o(t)("messageReceiveUrl")},{default:s(()=>[i("span",null,u(e.message_receive),1)]),_:1},8,["label"]),l(d,{label:o(t)("wechatDomain")},{default:s(()=>[i("span",null,u(e.host),1)]),_:1},8,["label"]),l(d,{label:o(t)("weappDomain")},{default:s(()=>[i("span",null,u(e.host),1)]),_:1},8,["label"]),l(d,{label:o(t)("weappBusinessDomain")},{default:s(()=>[i("span",null,u(e.host),1)]),_:1},8,["label"]),i("h3",W,u(o(t)("oplatformBuilder")),1),l(d,{label:o(t)("builderEmail")},{default:s(()=>[l(r,{modelValue:e.email,"onUpdate:modelValue":a[4]||(a[4]=n=>e.email=n),class:"input-width",clearable:""},null,8,["modelValue"])]),_:1},8,["label"]),l(d,{label:o(t)("builderMobile")},{default:s(()=>[l(r,{modelValue:e.mobile,"onUpdate:modelValue":a[5]||(a[5]=n=>e.mobile=n),class:"input-width",clearable:""},null,8,["modelValue"])]),_:1},8,["label"]),l(d,{label:o(t)("builderQQ")},{default:s(()=>[l(r,{modelValue:e.qq,"onUpdate:modelValue":a[6]||(a[6]=n=>e.qq=n),class:"input-width",clearable:""},null,8,["modelValue"])]),_:1},8,["label"]),l(d,{label:o(t)("builderWx")},{default:s(()=>[l(r,{modelValue:e.wx,"onUpdate:modelValue":a[7]||(a[7]=n=>e.wx=n),class:"input-width",clearable:""},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1},8,["model"])),[[g,m.value]]),i("div",$,[i("div",K,[l(x,{type:"primary",loading:m.value,onClick:a[8]||(a[8]=n=>V(c.value))},{default:s(()=>[C(u(o(t)("save")),1)]),_:1},8,["loading"])])])]