test_lgq/niucloud/public/admin/assets/transfer-afd935bb.js

2 lines
6.6 KiB
JavaScript
Raw Permalink Normal View History

2024-01-24 17:36:08 +08:00
import{d as S,O as k,r as g,n as q,q as T,N as e,a1 as U,h as b,c as E,e as a,w as i,a as r,t as p,u as t,y as F,I as R,i as B,a2 as D,ar as N,W as K,X as W,$,Y as j,E as z,a0 as A,_ as L}from"./index-4dcc0234.js";/* empty css *//* empty css *//* empty css *//* empty css */import{_ as O}from"./index.vue_vue_type_style_index_0_lang-cd8f78e9.js";import"./el-form-item-4ed993c7.js";/* empty css *//* empty css *//* empty css */import{a0 as X,a1 as Y}from"./sys-8ead7f22.js";/* empty css */const G={class:"main-container"},H={class:"flex items-center"},J={class:"text-base"},M={class:"flex ml-[18px] justify-between items-center mt-[20px]"},Q={class:"text-[20px]"},Z={class:"panel-title !text-sm"},ee={class:"form-tip"},ae={class:"form-tip"},te={class:"input-width"},le={class:"form-tip"},oe={class:"input-width"},ce={class:"form-tip"},re={class:"panel-title !text-sm"},ie={class:"form-tip"},pe={class:"input-width"},se={class:"input-width"},_e={class:"input-width"},ne={class:"fixed-footer-wrap"},de={class:"fixed-footer"},ue=S({__name:"transfer",setup(me){const w=k().meta.title,_=g(!1),l=q({...{wechatpay_config:{mch_id:"",mch_secret_key:"",mch_secret_cert:"",mch_public_cert_path:""},alipay_config:{app_secret_cert:"",app_public_cert_path:"",alipay_public_cert_path:"",alipay_root_cert_path:"",app_id:""}}});(async()=>{_.value=!0;const n=await(await X("transfer")).data;n&&n.length&&(l.wechatpay_config=n[0].config,l.alipay_config=n[1].config),_.value=!1})();const m=g(),v=T(()=>({"wechatpay_config.mch_id":[{required:!0,message:e("mchIdPlaceholder"),trigger:"blur"}],"wechatpay_config.mch_secret_key":[{required:!0,message:e("mchSecretKeyPlaceholder"),trigger:"blur"}],"wechatpay_config.mch_secret_cert":[{required:!0,message:e("mchSecretCertPlaceholder"),trigger:"blur"}],"wechatpay_config.mch_public_cert_path":[{required:!0,message:e("mchPublicCertPathPlaceholder"),trigger:"blur"}],"alipay_config.app_id":[{required:!0,message:e("appIdPlaceholder"),trigger:"blur"}],"alipay_config.app_secret_cert":[{required:!0,message:e("appSecretCertPlaceholder"),trigger:"blur"}],"alipay_config.app_public_cert_path":[{required:!0,message:e("appPublicCertPathPlaceholder"),trigger:"blur"}],"alipay_config.alipay_public_cert_path":[{required:!0,message:e("alipayPublicCertPathPlaceholder"),trigger:"blur"}],"alipay_config.alipay_root_cert_path":[{required:!0,message:e("alipayRootCertPathPlaceholder"),trigger:"blur"}]})),V=async n=>{_.value||!n||await n.validate(async o=>{o&&(_.value=!0,Y(l).then(f=>{_.value=!1}).catch(()=>{_.value=!1}))})};return(n,o)=>{const h=U("Warning"),f=D,P=N,u=K,s=W,d=O,y=$,x=j,C=z,I=A;return b(),E("div",G,[a(P,{class:"warm-prompt",type:"info"},{default:i(()=>[r("div",H,[a(f,{class:"mr-2",size:"18"},{default:i(()=>[a(h)]),_:1}),r("p",J,p(t(e)("operationTip")),1)])]),_:1}),r("div",M,[r("span",Q,p(t(w)),1)]),F((b(),R(x,{model:l,"label-width":"200px",ref_key:"formRef",ref:m,rules:t(v),class:"page-form"},{default:i(()=>[a(y,{class:"box-card !border-none",shadow:"never"},{default:i(()=>[r("h3",Z,p(t(e)("wechatpay")),1),a(s,{label:t(e)("mchId"),prop:"wechatpay_config.mch_id"},{default:i(()=>[a(u,{modelValue:l.wechatpay_config.mch_id,"onUpdate:modelValue":o[0]||(o[0]=c=>l.wechatpay_config.mch_id=c),placeholder:t(e)("mchIdPlaceholder"),class:"input-width",maxlength:"32","show-word-limit":"",clearable:""},null,8,["modelValue","placeholder"]),r("div",ee,p(t(e)("mchIdTips")),1)]),_:1},8,["label"]),a(s,{label:t(e)("mchSecretKey"),prop:"wechatpay_config.mch_secret_key"},{default:i(()=>[a(u,{modelValue:l.wechatpay_config.mch_secret_key,"onUpdate:modelValue":o[1]||(o[1]=c=>l.wechatpay_config.mch_secret_key=c),placeholder:t(e)("mchSecretKeyPlaceholder"),class:"input-width",maxlength:"32","show-word-limit":"",clearable:""},null,8,["modelValue","placeholder"]),r("div",ae,p(t(e)("mchSecretKeyTips")),1)]),_:1},8,["label"]),a(s,{label:t(e)("mchSecretCert"),prop:"wechatpay_config.mch_secret_cert"},{default:i(()=>[r("div",te,[a(d,{modelVa