mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2026-01-03 19:58:12 +00:00
2 lines
3.8 KiB
JavaScript
2 lines
3.8 KiB
JavaScript
import{d as I,v as T,r as w,l as C,M as E,h as y,c as D,e as s,w as l,a,t as _,u as e,k as t,J as F,m as P,i as S,az as B,K,D as N,G as R,H as U,E as M,L}from"./index-785a2eda.js";/* empty css *//* empty css *//* empty css */import{_ as $}from"./index.vue_vue_type_style_index_0_lang-b713c765.js";import"./el-form-item-4ed993c7.js";/* empty css *//* empty css *//* empty css */import{a3 as j,a4 as z}from"./sys-89fbb042.js";/* empty css *//* empty css */const A={class:"main-container"},G={class:"flex justify-between items-center"},H={class:"text-page-title"},J={class:"mt-[20px]"},q={class:"!text-[14px]"},O={class:"panel-title !text-sm"},Q={class:"form-tip"},W={class:"form-tip"},X={class:"input-width"},Y={class:"form-tip"},Z={class:"input-width"},ee={class:"form-tip"},te={class:"fixed-footer-wrap"},ae={class:"fixed-footer"},ge=I({__name:"transfer",setup(oe){const g=T().meta.title,i=w(!1),o=C({...{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()=>{i.value=!0;const r=await(await j("transfer")).data;r&&r.length&&(o.wechatpay_config=r[0].config,o.alipay_config=r[1].config),i.value=!1})();const m=w(),v=E(()=>({})),b=async r=>{i.value||!r||await r.validate(async c=>{c&&(i.value=!0,z(o).then(d=>{i.value=!1}).catch(()=>{i.value=!1}))})};return(r,c)=>{const h=B,d=K,f=N,p=R,u=$,x=U,V=M,k=L;return y(),D("div",A,[s(d,{class:"box-card !border-none",shadow:"never"},{default:l(()=>[a("div",G,[a("span",H,_(e(g)),1)]),a("div",J,[s(h,{description:e(t)("transferTips"),type:"warning","show-icon":""},{title:l(()=>[a("span",q,_(e(t)("operationTip")),1)]),_:1},8,["description"])])]),_:1}),F((y(),P(x,{class:"page-form",model:o,"label-width":"200px",ref_key:"formRef",ref:m,rules:e(v)},{default:l(()=>[s(d,{class:"box-card mt-[15px] !border-none",shadow:"never"},{default:l(()=>[a("h3",O,_(e(t)("wechatpay")),1),s(p,{label:e(t)("mchId"),prop:"wechatpay_config.mch_id"},{default:l(()=>[s(f,{modelValue:o.wechatpay_config.mch_id,"onUpdate:modelValue":c[0]||(c[0]=n=>o.wechatpay_config.mch_id=n),modelModifiers:{trim:!0},placeholder:e(t)("mchIdPlaceholder"),class:"input-width",maxlength:"32","show-word-limit":"",clearable:""},null,8,["modelValue","placeholder"]),a("div",Q,_(e(t)("mchIdTips")),1)]),_:1},8,["label"]),s(p,{label:e(t)("mchSecretKey"),prop:"wechatpay_config.mch_secret_key"},{default:l(()=>[s(f,{modelValue:o.wechatpay_config.mch_secret_key,"onUpdate:modelValue":c[1]||(c[1]=n=>o.wechatpay_config.mch_secret_key=n),modelModifiers:{trim:!0},placeholder:e(t)("mchSecretKeyPlaceholder"),class:"input-width",maxlength:"32","show-word-limit":"",clearable:""},null,8,["modelValue","placeholder"]),a("div",W,_(e(t)("mchSecretKeyTips")),1)]),_:1},8,["label"]),s(p,{label:e(t)("mchSecretCert"),prop:"wechatpay_config.mch_secret_cert"},{default:l(()=>[a("div",X,[s(u,{modelValue:o.wechatpay_config.mch_secret_cert,"onUpdate:modelValue":c[2]||(c[2]=n=>o.wechatpay_config.mch_secret_cert=n),api:"sys/document/wechat"},null,8,["modelValue"])]),a("div",Y,_(e(t)("mchSecretCertTips")),1)]),_:1},8,["label"]),s(p,{label:e(t)("mchPublicCertPath"),prop:"wechatpay_config.mch_public_cert_path"},{default:l(()=>[a("div",Z,[s(u,{modelValue:o.wechatpay_config.mch_public_cert_path,"onUpdate:modelValue":c[3]||(c[3]=n=>o.wechatpay_config.mch_public_cert_path=n),api:"sys/document/wechat"},null,8,["modelValue"])]),a("div",ee,_(e(t)("mchPublicCertPathTips")),1)]),_:1},8,["label"])]),_:1})]),_:1},8,["model","rules"])),[[k,i.value]]),a("div",te,[a("div",ae,[s(V,{type:"primary",loading:i.value,onClick:c[4]||(c[4]=n=>b(m.value))},{default:l(()=>[S(_(e(t)("save")),1)]),_:1},8,["loading"])])])])}}});export{ge as default};
|