index.379e6b77.js 1.3 KB

1
  1. import{d as i,ag as l,ah as u,r as y,$ as x,c as a,a5 as _,f as s,bh as f,bk as h}from"./index.5f7ffb46.js";const w="_payCenter_19c4e_1";var n={payCenter:w,"error-icon":"_error-icon_19c4e_5","error-text":"_error-text_19c4e_12"},b=i({name:"pay-center",setup(){const p=l(),r=u(),e=y({errorText:"",code:null,pay_channel:r.query.pay_channel,wxAppId:r.query.wxAppId,body:r.query.body,price:r.query.price,orderNo:r.query.orderNo,userId:r.query.userId}),d=()=>{const o=e.pay_channel;if(s().weixin)if(o==="wx_pub"){const t=f();console.log(t),t?(e.code=t,c()):h(e.wxAppId),document.title="\u5FAE\u4FE1\u652F\u4ED8"}else o=="alipay_qr"&&(e.errorText="\u8BF7\u4F7F\u7528\u652F\u4ED8\u5B9D\u626B\u7801");else s().alipay?o==="wx_pub"?e.errorText="\u8BF7\u4F7F\u7528\u5FAE\u4FE1\u626B\u7801":o=="alipay_qr"&&(document.title="\u652F\u4ED8\u5B9D\u652F\u4ED8",c()):e.errorText="\u8BF7\u5728\u5FAE\u4FE1\u6216\u652F\u4ED8\u5B9D\u5BA2\u6237\u7AEF\u6253\u5F00";e.errorText&&(document.title="ERROR")},c=()=>{p.replace({path:"/payDefine",query:{pay_channel:e.pay_channel,wxAppId:e.wxAppId,body:e.body,price:e.price,code:e.code,orderNo:e.orderNo,userId:e.userId}})};return x(()=>{d()}),()=>a("div",{class:n.payCenter},[a("div",{class:n["error-text"]},[e.errorText&&a(_,{class:n["error-icon"],name:"warning-o"},null),e.errorText])])}});export{b as default};