1 |
- import{d as he,I as xe,u as Ce,r as p,k as ge,o as h,c as P,v as $,a,q as ee,w as s,f as t,m as c,t as d,g as r,F as k,n as S,U as we,z as Ae,E as Pe,i as ke,C as Ee,B as Ue,H as Se,__tla as Ie}from"./index-2eab2d23.js";import{E as Re,__tla as Ve}from"./el-link-f0d278a2.js";import{_ as Le,__tla as Oe}from"./Dialog-c2716df6.js";import{E as We,__tla as qe}from"./el-card-c558f0ec.js";import{E as Be,a as Xe,__tla as De}from"./el-descriptions-item-fd42286f.js";import{Q as Ye,__tla as Me}from"./Qrcode-a57a527d.js";import{g as ae,s as Te,__tla as Fe}from"./index-f133f230.js";import{a as C,b as _,c as I}from"./constants-40f13f5e.js";import{f as le,__tla as Qe}from"./formatTime-41155543.js";import{u as je,__tla as ze}from"./tagsView-fd4f3d23.js";import{s as He,a as Ge}from"./wx_app-3594dac1.js";import{u as Je,__tla as Ke}from"./useMessage-171aa63e.js";import{_ as Ne}from"./_plugin-vue_export-helper-1b428a4d.js";let te,Ze=Promise.all([(()=>{try{return Ie}catch{}})(),(()=>{try{return Ve}catch{}})(),(()=>{try{return Oe}catch{}})(),(()=>{try{return qe}catch{}})(),(()=>{try{return De}catch{}})(),(()=>{try{return Me}catch{}})(),(()=>{try{return Fe}catch{}})(),(()=>{try{return Qe}catch{}})(),(()=>{try{return ze}catch{}})(),(()=>{try{return Ke}catch{}})()]).then(async()=>{let R,V,L,O,W,q,B,X,D,Y,M,T,F;R={class:"pay-channel-container"},V=["onClick"],L=["src"],O={class:"title"},W={class:"pay-channel-container"},q=["onClick"],B=["src"],X={class:"title"},D={class:"pay-channel-container"},Y=["onClick"],M=["src"],T={class:"title"},F={style:{"text-align":"right"}},te=Ne(he({name:"PayCashier",__name:"index",setup($e){const u=Je(),E=xe(),{push:se,currentRoute:Q}=Ce(),{delView:j}=je(),x=p(void 0),y=p(void 0),ie=p(!1),v=p({}),oe=[{name:"\u652F\u4ED8\u5B9D PC \u7F51\u7AD9\u652F\u4ED8",icon:"/admin-ui-vue3/assets/alipay_pc-61b7a901.svg",code:"alipay_pc"},{name:"\u652F\u4ED8\u5B9D Wap \u7F51\u7AD9\u652F\u4ED8",icon:"/admin-ui-vue3/assets/alipay_wap-c6a2e6a2.svg",code:"alipay_wap"},{name:"\u652F\u4ED8\u5B9D App \u7F51\u7AD9\u652F\u4ED8",icon:He,code:"alipay_app"},{name:"\u652F\u4ED8\u5B9D\u626B\u7801\u652F\u4ED8",icon:"/admin-ui-vue3/assets/alipay_qr-2be55889.svg",code:"alipay_qr"},{name:"\u652F\u4ED8\u5B9D\u6761\u7801\u652F\u4ED8",icon:"/admin-ui-vue3/assets/alipay_bar-0dba2b09.svg",code:"alipay_bar"}],re=[{name:"\u5FAE\u4FE1\u516C\u4F17\u53F7\u652F\u4ED8",icon:"/admin-ui-vue3/assets/wx_pub-ae17ce78.svg",code:"wx_pub"},{name:"\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F\u652F\u4ED8",icon:"/admin-ui-vue3/assets/wx_lite-1f244e1b.svg",code:"wx_lite"},{name:"\u5FAE\u4FE1 App \u652F\u4ED8",icon:Ge,code:"wx_app"},{name:"\u5FAE\u4FE1\u626B\u7801\u652F\u4ED8",icon:"/admin-ui-vue3/assets/wx_native-aab2e7e4.svg",code:"wx_native"},{name:"\u5FAE\u4FE1\u6761\u7801\u652F\u4ED8",icon:"/admin-ui-vue3/assets/wx_bar-78569907.svg",code:"wx_bar"}],ne=[{name:"\u6A21\u62DF\u652F\u4ED8",icon:"/admin-ui-vue3/assets/mock-e9f0a039.svg",code:"mock"}],f=p(!1),g=p(void 0),b=p({url:"",title:"",visible:!1}),n=p({channelCode:"",value:"",title:"",visible:!1}),U=e=>{e!==_.ALIPAY_BAR.code?e!==_.WX_BAR.code?e!==_.WX_PUB.code?e!==_.WX_LITE.code?z(e):u.error("\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F\uFF1A\u4E0D\u652F\u6301 PC \u7F51\u7AD9"):u.error("\u5FAE\u4FE1\u516C\u4F17\u53F7\u652F\u4ED8\uFF1A\u4E0D\u652F\u6301 PC \u7F51\u7AD9"):n.value={channelCode:e,value:"",title:"\u201C\u5FAE\u4FE1\u201D\u6761\u7801\u652F\u4ED8",visible:!0}:n.value={channelCode:e,value:"",title:"\u201C\u652F\u4ED8\u5B9D\u201D\u6761\u7801\u652F\u4ED8",visible:!0}},z=async e=>{f.value=!0;try{const i={id:x.value,channelCode:e,returnUrl:location.href,...ue(e)},o=await Te(i);if(o.status===C.SUCCESS.status)return w(),u.success("\u652F\u4ED8\u6210\u529F\uFF01"),void m("success");o.displayMode===I.URL.mode?ce(e,o):o.displayMode===I.QR_CODE.mode?de(e,o):o.displayMode===I.APP.mode&&_e(e),pe()}finally{f.value=!1}},ue=e=>e===_.ALIPAY_BAR.code?{channelExtras:{auth_code:n.value.value}}:e===_.WX_BAR.code?{channelExtras:{authCode:n.value.value}}:{},ce=(e,i)=>{location.href=i.displayContent,f.value=!1},de=(e,i)=>{let o="\u8BF7\u4F7F\u7528\u624B\u673A\u6D4F\u89C8\u5668\u201C\u626B\u4E00\u626B\u201D";e===_.ALIPAY_WAP.code||(e.indexOf("alipay_")===0?o="\u8BF7\u4F7F\u7528\u652F\u4ED8\u5B9D\u201C\u626B\u4E00\u626B\u201D\u626B\u7801\u652F\u4ED8":e.indexOf("wx_")===0&&(o="\u8BF7\u4F7F\u7528\u5FAE\u4FE1\u201C\u626B\u4E00\u626B\u201D\u626B\u7801\u652F\u4ED8")),b.value={title:o,url:i.displayContent,visible:!0},f.value=!1},_e=e=>{e===_.ALIPAY_APP.code&&u.error("\u652F\u4ED8\u5B9D App \u652F\u4ED8\uFF1A\u65E0\u6CD5\u5728\u7F51\u9875\u652F\u4ED8\uFF01"),e===_.WX_APP.code&&u.error("\u5FAE\u4FE1 App \u652F\u4ED8\uFF1A\u65E0\u6CD5\u5728\u7F51\u9875\u652F\u4ED8\uFF01"),f.value=!1},pe=()=>{g.value||(g.value=setInterval(async()=>{const e=await ae(x.value);e.status===C.SUCCESS.status&&(w(),u.success("\u652F\u4ED8\u6210\u529F\uFF01"),m("success")),e.status===C.CLOSED.status&&(w(),u.error("\u652F\u4ED8\u5DF2\u5173\u95ED\uFF01"),m("close"))},2e3))},w=()=>{b.value={title:"",url:"",visible:!1},clearInterval(g.value),g.value=void 0},m=e=>{if(w(),!y.value)return void j(a(Q));const i=y.value.indexOf("?")>=0?y.value+"&payResult="+e:y.value+"?payResult="+e;y.value.indexOf("http")===0?location.href=i:(j(a(Q)),se({path:i}))};return ge(()=>{x.value=E.query.id,E.query.returnUrl&&(y.value=decodeURIComponent(E.query.returnUrl)),(async()=>{if(!x.value)return u.error("\u672A\u4F20\u9012\u652F\u4ED8\u5355\u53F7\uFF0C\u65E0\u6CD5\u67E5\u770B\u5BF9\u5E94\u7684\u652F\u4ED8\u4FE1\u606F"),void m("cancel");const e=await ae(x.value);v.value=e,e?e.status===C.SUCCESS.status?(u.success("\u652F\u4ED8\u6210\u529F"),m("success")):e.status===C.CLOSED.status&&(u.error("\u65E0\u6CD5\u652F\u4ED8\uFF0C\u539F\u56E0\uFF1A\u8BA2\u5355\u5DF2\u5173\u95ED"),m("close")):(u.error("\u652F\u4ED8\u8BA2\u5355\u4E0D\u5B58\u5728\uFF0C\u8BF7\u68C0\u67E5\uFF01"),m("cancel"))})()}),(e,i)=>{const o=Be,A=Xe,H=We,G=Le,ve=we,me=Ae,J=Pe,ye=Re,fe=ke,be=Ee,K=Ue,N=Se;return h(),P(k,null,[$((h(),ee(H,null,{default:s(()=>[t(A,{title:"\u652F\u4ED8\u4FE1\u606F",column:3,border:""},{default:s(()=>[t(o,{label:"\u652F\u4ED8\u5355\u53F7"},{default:s(()=>[c(d(a(v).id),1)]),_:1}),t(o,{label:"\u5546\u54C1\u6807\u9898"},{default:s(()=>[c(d(a(v).subject),1)]),_:1}),t(o,{label:"\u5546\u54C1\u5185\u5BB9"},{default:s(()=>[c(d(a(v).body),1)]),_:1}),t(o,{label:"\u652F\u4ED8\u91D1\u989D"},{default:s(()=>[c(" \uFFE5"+d((a(v).price/100).toFixed(2)),1)]),_:1}),t(o,{label:"\u521B\u5EFA\u65F6\u95F4"},{default:s(()=>[c(d(a(le)(a(v).createTime)),1)]),_:1}),t(o,{label:"\u8FC7\u671F\u65F6\u95F4"},{default:s(()=>[c(d(a(le)(a(v).expireTime)),1)]),_:1})]),_:1})]),_:1})),[[N,a(ie)]]),$((h(),ee(H,{style:{"margin-top":"10px"},"element-loading-text":"\u63D0\u4EA4\u652F\u4ED8\u4E2D..."},{default:s(()=>[t(A,{title:"\u9009\u62E9\u652F\u4ED8\u5B9D\u652F\u4ED8"}),r("div",R,[(h(),P(k,null,S(oe,l=>r("div",{class:"box",key:l.code,onClick:Z=>U(l.code)},[r("img",{src:l.icon},null,8,L),r("div",O,d(l.name),1)],8,V)),64))]),t(A,{title:"\u9009\u62E9\u5FAE\u4FE1\u652F\u4ED8",style:{"margin-top":"20px"}}),r("div",W,[(h(),P(k,null,S(re,l=>r("div",{class:"box",key:l.code,onClick:Z=>U(l.code)},[r("img",{src:l.icon},null,8,B),r("div",X,d(l.name),1)],8,q)),64))]),t(A,{title:"\u9009\u62E9\u5176\u5B83\u652F\u4ED8",style:{"margin-top":"20px"}}),r("div",D,[(h(),P(k,null,S(ne,l=>r("div",{class:"box",key:l.code,onClick:Z=>U(l.code)},[r("img",{src:l.icon},null,8,M),r("div",T,d(l.name),1)],8,Y)),64))])]),_:1})),[[N,a(f)]]),t(G,{title:a(b).title,modelValue:a(b).visible,"onUpdate:modelValue":i[0]||(i[0]=l=>a(b).visible=l),width:"350px","append-to-body":"","close-on-press-escape":!1},{default:s(()=>[t(a(Ye),{text:a(b).url,width:310},null,8,["text"])]),_:1},8,["title","modelValue"]),t(G,{title:a(n).title,modelValue:a(n).visible,"onUpdate:modelValue":i[4]||(i[4]=l=>a(n).visible=l),width:"500px","append-to-body":"","close-on-press-escape":!1},{footer:s(()=>[t(K,{type:"primary",onClick:i[2]||(i[2]=l=>z(a(n).channelCode)),disabled:a(n).value.length===0},{default:s(()=>[c(" \u786E\u8BA4\u652F\u4ED8 ")]),_:1},8,["disabled"]),t(K,{onClick:i[3]||(i[3]=l=>a(n).visible=!1)},{default:s(()=>[c("\u53D6 \u6D88")]),_:1})]),default:s(()=>[t(be,{ref:"form","label-width":"80px"},{default:s(()=>[t(fe,null,{default:s(()=>[t(J,{span:24},{default:s(()=>[t(me,{label:"\u6761\u5F62\u7801",prop:"name"},{default:s(()=>[t(ve,{modelValue:a(n).value,"onUpdate:modelValue":i[1]||(i[1]=l=>a(n).value=l),placeholder:"\u8BF7\u8F93\u5165\u6761\u5F62\u7801",required:""},null,8,["modelValue"])]),_:1})]),_:1}),t(J,{span:24},{default:s(()=>[r("div",F,[c(" \u6216\u4F7F\u7528 "),t(ye,{type:"danger",target:"_blank",href:"https://baike.baidu.com/item/\u6761\u7801\u652F\u4ED8/10711903"},{default:s(()=>[c(" (\u626B\u7801\u67AA/\u626B\u7801\u76D2) ")]),_:1}),c(" \u626B\u7801 ")])]),_:1})]),_:1})]),_:1},512)]),_:1},8,["title","modelValue"])],64)}}}),[["__scopeId","data-v-4d8e6a42"]])});export{Ze as __tla,te as default};
|