Files
AIGC/demo/deploy_baota/frontend/static/PaymentCreate-a26a71fd.js
AIGC Developer dbd06435cb feat: 完成管理员密码登录修复和项目清理
- 修复BCryptPasswordEncoder密码验证问题
- 实现密码设置提示弹窗功能(仅对无密码用户显示一次)
- 优化修改密码逻辑和验证流程
- 更新Welcome页面背景样式
- 清理临时SQL文件和测试代码
- 移动数据库备份文件到database/backups目录
- 删除不必要的MD文档和临时文件
2025-11-21 16:10:00 +08:00

2 lines
4.0 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{aA as P,r as b,l as B,al as a,z as E,A as Y,R as e,J as o,u as c,O as V,W as q,B as s}from"./vue-vendor-164775a6.js";import{E as U,c as f}from"./element-plus-83a396df.js";import{_ as S}from"./index-36b4201c.js";import"./utils-edfcd65b.js";const h={class:"payment-create"},z={class:"payment-method-info"},D={__name:"PaymentCreate",setup(F){const v=P(),m=b(),p=b(!1),t=B({orderId:"",amount:0,currency:"CNY",paymentMethod:"ALIPAY",description:"",callbackUrl:"",returnUrl:""}),w={orderId:[{required:!0,message:"请输入订单号",trigger:"blur"}],amount:[{required:!0,message:"请输入支付金额",trigger:"blur"},{type:"number",min:.01,message:"支付金额必须大于0",trigger:"blur"}],currency:[{required:!0,message:"请选择货币",trigger:"change"}],paymentMethod:[{required:!0,message:"请选择支付方式",trigger:"change"}]},g=async()=>{if(m.value)try{if(!await m.value.validate())return;p.value=!0,await new Promise(l=>setTimeout(l,1e3)),U.success("支付创建成功"),v.push("/payments")}catch(d){console.error("Create payment error:",d),U.error("创建支付失败")}finally{p.value=!1}};return(d,l)=>{const i=a("el-icon"),C=a("el-button"),R=a("el-page-header"),u=a("el-input"),n=a("el-form-item"),k=a("el-input-number"),_=a("el-option"),x=a("el-select"),I=a("el-radio"),M=a("el-radio-group"),A=a("el-form"),y=a("el-card"),L=a("el-col"),N=a("el-row");return E(),Y("div",h,[e(R,{onBack:l[0]||(l[0]=r=>d.$router.go(-1)),content:"创建支付"},{extra:o(()=>[e(C,{type:"primary",onClick:g,loading:p.value},{default:o(()=>[e(i,null,{default:o(()=>[e(c(f))]),_:1}),l[8]||(l[8]=V(" 创建支付 ",-1))]),_:1},8,["loading"])]),_:1}),e(y,{class:"form-card"},{default:o(()=>[e(A,{ref_key:"formRef",ref:m,model:t,rules:w,"label-width":"100px",onSubmit:q(g,["prevent"])},{default:o(()=>[e(n,{label:"订单号",prop:"orderId"},{default:o(()=>[e(u,{modelValue:t.orderId,"onUpdate:modelValue":l[1]||(l[1]=r=>t.orderId=r),placeholder:"请输入订单号",clearable:""},null,8,["modelValue"])]),_:1}),e(n,{label:"支付金额",prop:"amount"},{default:o(()=>[e(k,{modelValue:t.amount,"onUpdate:modelValue":l[2]||(l[2]=r=>t.amount=r),precision:2,min:.01,placeholder:"请输入支付金额",style:{width:"100%"}},null,8,["modelValue"])]),_:1}),e(n,{label:"货币",prop:"currency"},{default:o(()=>[e(x,{modelValue:t.currency,"onUpdate:modelValue":l[3]||(l[3]=r=>t.currency=r),placeholder:"请选择货币"},{default:o(()=>[e(_,{label:"人民币 (CNY)",value:"CNY"}),e(_,{label:"美元 (USD)",value:"USD"}),e(_,{label:"欧元 (EUR)",value:"EUR"})]),_:1},8,["modelValue"])]),_:1}),e(n,{label:"支付方式",prop:"paymentMethod"},{default:o(()=>[e(M,{modelValue:t.paymentMethod,"onUpdate:modelValue":l[4]||(l[4]=r=>t.paymentMethod=r)},{default:o(()=>[e(I,{value:"ALIPAY"},{default:o(()=>[e(i,null,{default:o(()=>[e(c(f))]),_:1}),l[9]||(l[9]=V(" 支付宝 ",-1))]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(n,{label:"支付描述",prop:"description"},{default:o(()=>[e(u,{modelValue:t.description,"onUpdate:modelValue":l[5]||(l[5]=r=>t.description=r),type:"textarea",rows:3,placeholder:"请输入支付描述"},null,8,["modelValue"])]),_:1}),e(n,{label:"回调URL",prop:"callbackUrl"},{default:o(()=>[e(u,{modelValue:t.callbackUrl,"onUpdate:modelValue":l[6]||(l[6]=r=>t.callbackUrl=r),placeholder:"请输入回调URL可选"},null,8,["modelValue"])]),_:1}),e(n,{label:"返回URL",prop:"returnUrl"},{default:o(()=>[e(u,{modelValue:t.returnUrl,"onUpdate:modelValue":l[7]||(l[7]=r=>t.returnUrl=r),placeholder:"请输入返回URL可选"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1}),e(y,{class:"info-card"},{header:o(()=>[...l[10]||(l[10]=[s("h4",null,"支付方式说明",-1)])]),default:o(()=>[e(N,{gutter:20},{default:o(()=>[e(L,{xs:24,sm:12,md:6},{default:o(()=>[s("div",z,[e(i,{size:"32",color:"#1677FF"},{default:o(()=>[e(c(f))]),_:1}),l[11]||(l[11]=s("h5",null,"支付宝",-1)),l[12]||(l[12]=s("p",null,"支持支付宝扫码支付和网页支付",-1))])]),_:1})]),_:1})]),_:1})])}}},W=S(D,[["__scopeId","data-v-27d89dda"]]);export{W as default};