mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2026-01-04 12:18:14 +00:00
2 lines
7.2 KiB
JavaScript
2 lines
7.2 KiB
JavaScript
import{E as I}from"./base-962c0c23.js";/* empty css *//* empty css *//* empty css *//* empty css */import{_ as E}from"./index.vue_vue_type_style_index_0_lang-30421ed0.js";/* empty css *//* empty css */import"./index-da7837ad.js";import{t as e}from"./index-2af60c2e.js";import{P as S,Q as k}from"./sys-662acaa6.js";import{E as q}from"./index-d1bcad42.js";import{E as T}from"./index-93f2c618.js";import{a as U,E as F}from"./index-61c777fa.js";import{E as B}from"./index-69523418.js";import{E as D}from"./index-bba9e58c.js";import{v as R}from"./directive-c0c3e9a3.js";import{d as K,r as y,M as N,c as L,Q,b,e as W,q as a,p,f as i,x as s,u as t,L as $,m as z,v as A}from"./runtime-core.esm-bundler-dc7a07d7.js";import{_ as M}from"./_plugin-vue_export-helper-c27b6911.js";/* empty css */import"./storage-abe718b1.js";import"./event-ff03ec12.js";import"./index-d57cc47d.js";import"./focus-trap-b8b5a003.js";import"./index-a9dd5cf5.js";import"./vue-router-79053937.js";import"./el-overlay-60700377.js";import"./index-5d86eb33.js";import"./el-radio-bfd4b1ad.js";import"./index-8bcaafa6.js";import"./index-7a123a20.js";import"./el-tooltip-58212670.js";import"./el-avatar-3bb47ce2.js";import"./common-6291c908.js";import"./common-2cf17469.js";import"./_Uint8Array-6ff3cafa.js";import"./_initCloneObject-28e6bdaa.js";const j={class:"main-container"},G={class:"flex items-center"},H={class:"text-base"},J={class:"panel-title"},O={class:"form-tip"},X={class:"form-tip"},Y={class:"input-width"},Z={class:"form-tip"},ee={class:"input-width"},ae={class:"form-tip"},te={class:"panel-title"},le={class:"form-tip"},oe={class:"input-width"},re={class:"input-width"},ie={class:"input-width"},pe={class:"fixed-footer-wrap"},ce={class:"fixed-footer"},se=K({__name:"transfer",setup(_e){const _=y(!1),l=N({...{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 S("transfer")).data;n&&n.length&&(l.wechatpay_config=n[0].config,l.alipay_config=n[1].config),_.value=!1})();const u=y(),w=L(()=>({"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,k(l).then(f=>{_.value=!1}).catch(()=>{_.value=!1}))})};return(n,o)=>{const h=Q("Warning"),f=I,P=q,m=T,c=U,d=E,g=B,V=F,C=D,x=R;return b(),W("div",j,[a(P,{class:"warm-prompt",type:"info"},{default:p(()=>[i("div",G,[a(f,{class:"mr-2",size:"18"},{default:p(()=>[a(h)]),_:1}),i("p",H,s(t(e)("operationTip")),1)])]),_:1}),$((b(),z(V,{model:l,"label-width":"200px",ref_key:"formRef",ref:u,rules:t(w),class:"page-form mt-2"},{default:p(()=>[a(g,{class:"box-card !border-none",shadow:"never"},{default:p(()=>[i("h3",J,s(t(e)("wechatpay")),1),a(c,{label:t(e)("mchId"),prop:"wechatpay_config.mch_id"},{default:p(()=>[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",O,s(t(e)("mchIdTips")),1)]),_:1},8,["label"]),a(c,{label:t(e)("mchSecretKey"),prop:"wechatpay_config.mch_secret_key"},{default:p(()=>[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",X,s(t(e)("mchSecretKeyTips")),1)]),_:1},8,["label"]),a(c,{label:t(e)("mchSecretCert"),prop:"wechatpay_config.mch_secret_cert"},{default:p(()=>[i("div",Y,[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",Z,s(t(e)("mchSecretCertTips")),1)]),_:1},8,["label"]),a(c,{label:t(e)("mchPublicCertPath"),prop:"wechatpay_config.mch_public_cert_path"},{default:p(()=>[i("div",ee,[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",ae,s(t(e)("mchPublicCertPathTips")),1)]),_:1},8,["label"])]),_:1}),a(g,{class:"box-card mt-4 !border-none",shadow:"never"},{default:p(()=>[i("h3",te,s(t(e)("alipay")),1),a(c,{label:t(e)("appId"),prop:"alipay_config.app_id"},{default:p(()=>[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",le,s(t(e)("appIdTips")),1)]),_:1},8,["label"]),a(c,{label:t(e)("appSecretCert"),prop:"alipay_config.app_secret_cert"},{default:p(()=>[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(c,{label:t(e)("appPublicCertPath"),prop:"alipay_config.app_public_cert_path"},{default:p(()=>[i("div",oe,[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(c,{label:t(e)("alipayPublicCertPath"),prop:"alipay_config.alipay_public_cert_path"},{default:p(()=>[i("div",re,[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(c,{label:t(e)("alipayRootCertPath"),prop:"alipay_config.alipay_root_cert_path"},{default:p(()=>[i("div",ie,[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"])),[[x,_.value]]),i("div",pe,[i("div",ce,[a(C,{type:"primary",loading:_.value,onClick:o[9]||(o[9]=r=>v(u.value))},{default:p(()=>[A(s(t(e)("save")),1)]),_:1},8,["loading"])])])])}}});const Oe=M(se,[["__scopeId","data-v-8b599424"]]);export{Oe as default};
|