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