mirror of
https://github.com/vastxie/99AI.git
synced 2025-09-23 03:56:38 +08:00
10 lines
3.9 KiB
JavaScript
10 lines
3.9 KiB
JavaScript
|
|
/**
|
|
* 由 Fantastic-admin 提供技术支持
|
|
* Powered by Fantastic-admin
|
|
* Gitee https://gitee.com/hooray/fantastic-admin
|
|
* Github https://github.com/hooray/fantastic-admin
|
|
*/
|
|
|
|
import{_ as v}from"./index-fd8a5577.js";import{a as m}from"./config-e611a8d0.js";import{d as M,Q as C,r as _,x as I,h as n,o as N,c as q,e,f as t,a as z,l as k,E as y,q as g}from"./index-e656eb90.js";const R={class:"flex justify-between"},j=z("b",null,"蓝兔支付参数设置",-1),B=M({__name:"ltzf",setup(E){const a=C({payLtzfStatus:"",payLtzfMchId:"",payLtzfSecret:"",payLtzfNotifyUrl:"",payLtzfReturnUrl:""}),L=_({payLtzfStatus:[{required:!0,trigger:"change",message:"请选择当前支付开启状态"}],payLtzfSecret:[{required:!0,trigger:"blur",message:"请填写商户秘钥"}],payLtzfMchId:[{required:!0,trigger:"blur",message:"请填写商户号"}],payLtzfNotifyUrl:[{required:!0,trigger:"blur",message:"请填写支付通知地址"}]}),d=_();async function c(){const r=await m.queryConfig({keys:["payLtzfSecret","payLtzfNotifyUrl","payLtzfReturnUrl","payLtzfMchId","payLtzfStatus"]});Object.assign(a,r.data)}function b(){var r;(r=d.value)==null||r.validate(async l=>{if(l){try{await m.setConfig({settings:x(a)}),y.success("变更配置信息成功")}catch{}c()}else y.error("请填写完整信息")})}function x(r){return Object.keys(r).map(l=>({configKey:l,configVal:r[l]}))}return I(()=>{c()}),(r,l)=>{const i=n("el-alert"),V=v,h=n("el-button"),U=n("el-switch"),u=n("el-form-item"),f=n("el-col"),s=n("el-row"),p=n("el-input"),S=n("el-form"),w=n("el-card");return N(),q("div",null,[e(V,null,{default:t(()=>[e(i,{closable:!1,"show-icon":"",title:"蓝兔支付参数说明",description:"蓝兔支付为三方支付、接入请购买微信渠道、详细参数参照 https://www.ltzf.cn/ 目前优先开通微信支付渠道、同时开启开启多种支付、我们将优先按照菜单顺序调用、所有的支付通知地址统一为 https://域名/api/pay/notify 将域名修改为您的域名即可!",type:"success"})]),_:1}),e(w,{style:{margin:"20px"}},{header:t(()=>[z("div",R,[j,e(h,{class:"button",text:"",onClick:b},{default:t(()=>[k(" 保存设置 ")]),_:1})])]),default:t(()=>[e(S,{ref_key:"formRef",ref:d,rules:L.value,model:a,"label-width":"120px"},{default:t(()=>[e(s,null,{default:t(()=>[e(f,{xs:24,md:20,lg:15,xl:12},{default:t(()=>[e(u,{label:"启用当前支付",prop:"payLtzfMchId"},{default:t(()=>[e(U,{modelValue:a.payLtzfStatus,"onUpdate:modelValue":l[0]||(l[0]=o=>a.payLtzfStatus=o),"active-value":"1","inactive-value":"0"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(s,null,{default:t(()=>[e(f,{xs:24,md:20,lg:15,xl:12},{default:t(()=>[e(u,{label:"商户号",prop:"payLtzfMchId"},{default:t(()=>[e(p,{modelValue:a.payLtzfMchId,"onUpdate:modelValue":l[1]||(l[1]=o=>a.payLtzfMchId=o),placeholder:"请填写商户号",clearable:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(s,null,{default:t(()=>[e(f,{xs:24,md:20,lg:15,xl:12},{default:t(()=>[e(u,{label:"商户密钥",prop:"payLtzfSecret"},{default:t(()=>[e(p,{modelValue:a.payLtzfSecret,"onUpdate:modelValue":l[2]||(l[2]=o=>a.payLtzfSecret=o),placeholder:"请填写商户秘钥",clearable:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(s,null,{default:t(()=>[e(f,{xs:24,md:20,lg:15,xl:12},{default:t(()=>[e(u,{label:"支付通知地址",prop:"payLtzfSecret"},{default:t(()=>[e(p,{modelValue:a.payLtzfNotifyUrl,"onUpdate:modelValue":l[3]||(l[3]=o=>a.payLtzfNotifyUrl=o),placeholder:"请填写支付通知地址",clearable:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(s,null,{default:t(()=>[e(f,{xs:24,md:20,lg:15,xl:12},{default:t(()=>[e(u,{label:"支付回调地址",prop:"payLtzfSecret"},{default:t(()=>[e(p,{modelValue:a.payLtzfReturnUrl,"onUpdate:modelValue":l[4]||(l[4]=o=>a.payLtzfReturnUrl=o),placeholder:"请填写支付成功后的回跳地址",clearable:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["rules","model"])]),_:1})])}}});typeof g=="function"&&g(B);export{B as default};
|