<<<<<<<< HEAD:dist/assets/index-8c573a57.js
import{d as g,P as x,x as h,y as S,a as r,A as d,X as l,C as v,I,N as b,D as q,U as c,bg as u,bi as N,b$ as A}from"./index-4228b913.js";import{C as B}from"./index-dba80704.js";import{C as p}from"./index-c6087578.js";const P="_paydefine_gyhp9_1",T="_amount_gyhp9_16",i={paydefine:P,amount:T,"error-text":"_error-text_gyhp9_27","error-icon":"_error-icon_gyhp9_34"},F=g({name:"pay-define",setup(){const n=x(),e=h({browserStatus:!1,errorText:"",code:null,pay_channel:n.query.pay_channel,wxAppId:n.query.wxAppId,paymentType:n.query.paymentType,alipayAppId:n.query.alipayAppId,body:n.query.body,price:n.query.price,orderNo:n.query.orderNo,userId:n.query.userId,payInfo:{},isYeePay:!1}),y=async()=>{var a;try{if(parseFloat(e.price)<=0){b("支付金额异常");return}const o={merOrderNo:e.orderNo,paymentChannel:e.pay_channel,userId:e.userId,code:e.code},{data:t}=await q.post("/edu-app/open/userOrder/executePayment",{hideLoading:!1,data:{...o}});e.isYeePay=((a=t.paymentVender)==null?void 0:a.indexOf("yeepay"))!==-1,f(t.reqParams)}catch(o){console.log(o)}},f=a=>{if(e.pay_channel=="alipay_qr")if(e.isYeePay)_(a.prePayTn);else{const o=a.prod_mode==="false"?a.expend.qrcode_url+"?payment_id="+a.id+"&pay_channel="+a.pay_channel:a.expend.qrcode_url;window.location.href=o}else if(e.pay_channel=="wx_pub"){const o=e.isYeePay?JSON.parse(a.prePayTn):JSON.parse(a.expend.pay_info);e.payInfo=o,typeof window.WeixinJSBridge>"u"?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",s,!1):document.attachEvent&&document.attachEvent("WeixinJSBridgeReady",s)(document).attachEvent("onWeixinJSBridgeReady",s):s()}},m=a=>{window.AlipayJSBridge?a&&a():document.addEventListener("AlipayJSBridgeReady",a,!1)},_=a=>{m(function(){window.AlipayJSBridge.call("tradePay",{tradeNO:a},function(o){o.resultCode=="9000",window.location.replace(location.origin+"/classroom-app/#/payment-result?orderNo="+e.orderNo),window.AlipayJSBridge.call("closeWebview")})})},s=()=>{const a=e.payInfo;window.WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:a.appId,timeStamp:a.timeStamp,nonceStr:a.nonceStr,package:a.package,signType:a.signType,paySign:a.paySign},o=>{o.err_msg=="get_brand_wcpay_request:cancel"||o.err_msg=="get_brand_wcpay_request:fail",window.location.replace(location.origin+"/classroom-app/#/payment-result?orderNo="+e.orderNo)})},w=()=>{const a=e.pay_channel,o=e.paymentType.indexOf("yeepay")!==-1;if(c().weixin)if(a==="wx_pub"){const t=u();t?e.code=t:N(e.wxAppId),e.browserStatus=!0,document.title="微信支付"}else a=="alipay_qr"&&(e.errorText="请使用支付宝扫码");else if(c().alipay){if(a==="wx_pub")e.errorText="请使用微信扫码";else if(a=="alipay_qr"){if(o){const t=u("auth_code");t?e.code=t:A(e.alipayAppId)}e.browserStatus=!0,document.title="支付宝支付"}}else e.errorText="请在微信或支付宝客户端打开";e.errorText&&(document.title="ERROR")};return S(()=>{console.log(e),w()}),()=>r("div",{class:i.paydefine},[e.browserStatus&&r("div",{class:i.container},[r("div",{class:i.amount},[r("span",null,[d("￥ ")]),l(e.price)]),r(B,{inset:!0},{default:()=>[r(p,{title:"订单信息",value:e.body,valueClass:i.values},null),r(p,{title:"支付方式",value:e.pay_channel==="wx_pub"?"微信":"支付宝"},null),r(p,{title:"实付金额",value:`￥ ${l(e.price)}元`},null)]}),r(v,{type:"primary",block:!0,size:"large",onClick:y,round:!0},{default:()=>[d("立即支付")]})]),!e.browserStatus&&r("div",{class:i.container},[r("div",{class:i["error-text"]},[e.errorText&&r(I,{class:i["error-icon"],name:"warning-o"},null),e.errorText])])])}});export{F as default};
========
import{d as g,P as x,x as h,y as S,a as r,A as d,X as l,C as v,I,N as b,D as q,U as c,bg as u,bi as N,b$ as A}from"./index-c4313132.js";import{C as B}from"./index-2eadea9f.js";import{C as p}from"./index-33791411.js";const P="_paydefine_gyhp9_1",T="_amount_gyhp9_16",i={paydefine:P,amount:T,"error-text":"_error-text_gyhp9_27","error-icon":"_error-icon_gyhp9_34"},F=g({name:"pay-define",setup(){const n=x(),e=h({browserStatus:!1,errorText:"",code:null,pay_channel:n.query.pay_channel,wxAppId:n.query.wxAppId,paymentType:n.query.paymentType,alipayAppId:n.query.alipayAppId,body:n.query.body,price:n.query.price,orderNo:n.query.orderNo,userId:n.query.userId,payInfo:{},isYeePay:!1}),y=async()=>{var a;try{if(parseFloat(e.price)<=0){b("支付金额异常");return}const o={merOrderNo:e.orderNo,paymentChannel:e.pay_channel,userId:e.userId,code:e.code},{data:t}=await q.post("/edu-app/open/userOrder/executePayment",{hideLoading:!1,data:{...o}});e.isYeePay=((a=t.paymentVender)==null?void 0:a.indexOf("yeepay"))!==-1,f(t.reqParams)}catch(o){console.log(o)}},f=a=>{if(e.pay_channel=="alipay_qr")if(e.isYeePay)_(a.prePayTn);else{const o=a.prod_mode==="false"?a.expend.qrcode_url+"?payment_id="+a.id+"&pay_channel="+a.pay_channel:a.expend.qrcode_url;window.location.href=o}else if(e.pay_channel=="wx_pub"){const o=e.isYeePay?JSON.parse(a.prePayTn):JSON.parse(a.expend.pay_info);e.payInfo=o,typeof window.WeixinJSBridge>"u"?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",s,!1):document.attachEvent&&document.attachEvent("WeixinJSBridgeReady",s)(document).attachEvent("onWeixinJSBridgeReady",s):s()}},m=a=>{window.AlipayJSBridge?a&&a():document.addEventListener("AlipayJSBridgeReady",a,!1)},_=a=>{m(function(){window.AlipayJSBridge.call("tradePay",{tradeNO:a},function(o){o.resultCode=="9000",window.location.replace(location.origin+"/classroom-app/#/payment-result?orderNo="+e.orderNo),window.AlipayJSBridge.call("closeWebview")})})},s=()=>{const a=e.payInfo;window.WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:a.appId,timeStamp:a.timeStamp,nonceStr:a.nonceStr,package:a.package,signType:a.signType,paySign:a.paySign},o=>{o.err_msg=="get_brand_wcpay_request:cancel"||o.err_msg=="get_brand_wcpay_request:fail",window.location.replace(location.origin+"/classroom-app/#/payment-result?orderNo="+e.orderNo)})},w=()=>{const a=e.pay_channel,o=e.paymentType.indexOf("yeepay")!==-1;if(c().weixin)if(a==="wx_pub"){const t=u();t?e.code=t:N(e.wxAppId),e.browserStatus=!0,document.title="微信支付"}else a=="alipay_qr"&&(e.errorText="请使用支付宝扫码");else if(c().alipay){if(a==="wx_pub")e.errorText="请使用微信扫码";else if(a=="alipay_qr"){if(o){const t=u("auth_code");t?e.code=t:A(e.alipayAppId)}e.browserStatus=!0,document.title="支付宝支付"}}else e.errorText="请在微信或支付宝客户端打开";e.errorText&&(document.title="ERROR")};return S(()=>{console.log(e),w()}),()=>r("div",{class:i.paydefine},[e.browserStatus&&r("div",{class:i.container},[r("div",{class:i.amount},[r("span",null,[d("￥ ")]),l(e.price)]),r(B,{inset:!0},{default:()=>[r(p,{title:"订单信息",value:e.body,valueClass:i.values},null),r(p,{title:"支付方式",value:e.pay_channel==="wx_pub"?"微信":"支付宝"},null),r(p,{title:"实付金额",value:`￥ ${l(e.price)}元`},null)]}),r(v,{type:"primary",block:!0,size:"large",onClick:y,round:!0},{default:()=>[d("立即支付")]})]),!e.browserStatus&&r("div",{class:i.container},[r("div",{class:i["error-text"]},[e.errorText&&r(I,{class:i["error-icon"],name:"warning-o"},null),e.errorText])])])}});export{F as default};
>>>>>>>> 0f2588f61580675e1c866dc0769d4ceb917efcec:dist/assets/index-f59b8e3a.js
