mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2025-12-29 09:50:16 +00:00
2 lines
7.3 KiB
JavaScript
2 lines
7.3 KiB
JavaScript
import{d as E,r as y,R as S,c as k,V as q,e as b,f as T,y as a,x as c,g as i,B as p,u as t,Q as U,v as R,A as B}from"./base-06478700.js";/* empty css *//* empty css */import{a as F,E as D}from"./el-form-item-314d006d.js";/* empty css */import{_ as K}from"./index.vue_vue_type_style_index_0_lang-bb66bca8.js";/* empty css *//* empty css */import{am as N,an as A}from"./index-0d58768e.js";import{t as e}from"./index-e5b4f072.js";import{u as W}from"./vue-router-d09a2c28.js";import{E as $}from"./index-2fcd1254.js";import{E as j}from"./index-37a46bd5.js";import{E as z}from"./index-b68e8463.js";import{E as L}from"./index-e10fccde.js";import{E as Q}from"./index-c2f001d3.js";import{v as G}from"./directive-cb2d3366.js";import{_ as H}from"./_plugin-vue_export-helper-c27b6911.js";import"./event-10eba222.js";/* empty css */import"./common-92a35870.js";import"./index-b52d0f2a.js";import"./index-f27d6ce0.js";import"./focus-trap-3e826cdc.js";import"./index-41a974fa.js";import"./index-adb89d14.js";import"./el-main-9a0960e7.js";import"./index-6b67c4ac.js";import"./el-overlay-42a687c6.js";import"./index-9fe5de95.js";import"./index-818c0ce2.js";import"./el-tooltip-58212670.js";import"./index-2a269c7c.js";import"./index-e4abfaa5.js";import"./index-9ee9102c.js";const J={class:"main-container"},M={class:"flex items-center"},O={class:"text-base"},X={class:"flex ml-[18px] justify-between items-center mt-[20px]"},Y={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"},re={class:"form-tip"},ie={class:"panel-title !text-sm"},ce={class:"form-tip"},pe={class:"input-width"},se={class:"input-width"},_e={class:"input-width"},ne={class:"fixed-footer-wrap"},de={class:"fixed-footer"},me=E({__name:"transfer",setup(ue){const w=W().meta.title,_=y(!1),l=S({...{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;let n=await(await N("transfer")).data;n&&n.length&&(l.wechatpay_config=n[0].config,l.alipay_config=n[1].config),_.value=!1})();const u=y(),v=k(()=>({"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,A(l).then(f=>{_.value=!1}).catch(()=>{_.value=!1}))})};return(n,o)=>{const h=q("Warning"),f=$,P=j,m=z,s=F,d=K,g=L,x=D,C=Q,I=G;return b(),T("div",J,[a(P,{class:"warm-prompt",type:"info"},{default:c(()=>[i("div",M,[a(f,{class:"mr-2",size:"18"},{default:c(()=>[a(h)]),_:1}),i("p",O,p(t(e)("operationTip")),1)])]),_:1}),i("div",X,[i("span",Y,p(t(w)),1)]),U((b(),R(x,{model:l,"label-width":"200px",ref_key:"formRef",ref:u,rules:t(v),class:"page-form"},{default:c(()=>[a(g,{class:"box-card !border-none",shadow:"never"},{default:c(()=>[i("h3",Z,p(t(e)("wechatpay")),1),a(s,{label:t(e)("mchId"),prop:"wechatpay_config.mch_id"},{default:c(()=>[a(m,{modelValue:l.wechatpay_config.mch_id,"onUpdate:modelValue":o[0]||(o[0]=r=>l.wechatpay_config.mch_id=r),placeholder:t(e)("mchIdPlaceholder"),class:"input-width",maxlength:"32","show-word-limit":"",clearable:""},null,8,["modelValue","placeholder"]),i("div",ee,p(t(e)("mchIdTips")),1)]),_:1},8,["label"]),a(s,{label:t(e)("mchSecretKey"),prop:"wechatpay_config.mch_secret_key"},{default:c(()=>[a(m,{modelValue:l.wechatpay_config.mch_secret_key,"onUpdate:modelValue":o[1]||(o[1]=r=>l.wechatpay_config.mch_secret_key=r),placeholder:t(e)("mchSecretKeyPlaceholder"),class:"input-width",maxlength:"32","show-word-limit":"",clearable:""},null,8,["modelValue","placeholder"]),i("div",ae,p(t(e)("mchSecretKeyTips")),1)]),_:1},8,["label"]),a(s,{label:t(e)("mchSecretCert"),prop:"wechatpay_config.mch_secret_cert"},{default:c(()=>[i("div",te,[a(d,{modelValue:l.wechatpay_config.mch_secret_cert,"onUpdate:modelValue":o[2]||(o[2]=r=>l.wechatpay_config.mch_secret_cert=r),api:"sys/document/wechat"},null,8,["modelValue"])]),i("div",le,p(t(e)("mchSecretCertTips")),1)]),_:1},8,["label"]),a(s,{label:t(e)("mchPublicCertPath"),prop:"wechatpay_config.mch_public_cert_path"},{default:c(()=>[i("div",oe,[a(d,{modelValue:l.wechatpay_config.mch_public_cert_path,"onUpdate:modelValue":o[3]||(o[3]=r=>l.wechatpay_config.mch_public_cert_path=r),api:"sys/document/wechat"},null,8,["modelValue"])]),i("div",re,p(t(e)("mchPublicCertPathTips")),1)]),_:1},8,["label"])]),_:1}),a(g,{class:"box-card mt-4 !border-none",shadow:"never"},{default:c(()=>[i("h3",ie,p(t(e)("alipay")),1),a(s,{label:t(e)("appId"),prop:"alipay_config.app_id"},{default:c(()=>[a(m,{modelValue:l.alipay_config.app_id,"onUpdate:modelValue":o[4]||(o[4]=r=>l.alipay_config.app_id=r),placeholder:t(e)("appIdPlaceholder"),class:"input-width",maxlength:"32","show-word-limit":"",clearable:""},null,8,["modelValue","placeholder"]),i("div",ce,p(t(e)("appIdTips")),1)]),_:1},8,["label"]),a(s,{label:t(e)("appSecretCert"),prop:"alipay_config.app_secret_cert"},{default:c(()=>[a(m,{modelValue:l.alipay_config.app_secret_cert,"onUpdate:modelValue":o[5]||(o[5]=r=>l.alipay_config.app_secret_cert=r),placeholder:t(e)("appSecretCertPlaceholder"),class:"input-width",type:"textarea",rows:"4",clearable:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(s,{label:t(e)("appPublicCertPath"),prop:"alipay_config.app_public_cert_path"},{default:c(()=>[i("div",pe,[a(d,{modelValue:l.alipay_config.app_public_cert_path,"onUpdate:modelValue":o[6]||(o[6]=r=>l.alipay_config.app_public_cert_path=r),api:"sys/document/aliyun"},null,8,["modelValue"])])]),_:1},8,["label"]),a(s,{label:t(e)("alipayPublicCertPath"),prop:"alipay_config.alipay_public_cert_path"},{default:c(()=>[i("div",se,[a(d,{modelValue:l.alipay_config.alipay_public_cert_path,"onUpdate:modelValue":o[7]||(o[7]=r=>l.alipay_config.alipay_public_cert_path=r),api:"sys/document/aliyun"},null,8,["modelValue"])])]),_:1},8,["label"]),a(s,{label:t(e)("alipayRootCertPath"),prop:"alipay_config.alipay_root_cert_path"},{default:c(()=>[i("div",_e,[a(d,{modelValue:l.alipay_config.alipay_root_cert_path,"onUpdate:modelValue":o[8]||(o[8]=r=>l.alipay_config.alipay_root_cert_path=r),api:"sys/document/aliyun"},null,8,["modelValue"])])]),_:1},8,["label"])]),_:1})]),_:1},8,["model","rules"])),[[I,_.value]]),i("div",ne,[i("div",de,[a(C,{type:"primary",loading:_.value,onClick:o[9]||(o[9]=r=>V(u.value))},{default:c(()=>[B(p(t(e)("save")),1)]),_:1},8,["loading"])])])])}}});const Ze=H(me,[["__scopeId","data-v-e027528a"]]);export{Ze as default};
|