index.9b0e8e86.js 6.4 KB

12345
  1. <<<<<<<< HEAD:dist/assets/index.973e79d5.js
  2. import{d as _,aV as f,r as m,$ as g,c as n,q as l,b3 as c,B as x,a5 as w,o as h,m as b,e as d,bh as v,bf as q}from"./index.ffe80dbe.js";import{C as S}from"./index.914765a1.js";import{C as i}from"./index.ea031708.js";const I="_paydefine_gyhp9_1",C="_amount_gyhp9_16";var o={paydefine:I,amount:C,"error-text":"_error-text_gyhp9_27","error-icon":"_error-icon_gyhp9_34"},R=_({name:"pay-define",setup(){const t=f(),e=m({browserStatus:!1,errorText:"",code:null,pay_channel:t.query.pay_channel,wxAppId:t.query.wxAppId,body:t.query.body,price:t.query.price,orderNo:t.query.orderNo,userId:t.query.userId,payInfo:{}}),p=async()=>{try{if(parseFloat(e.price)<=0){h("\u652F\u4ED8\u91D1\u989D\u5F02\u5E38");return}const a={merOrderNo:e.orderNo,paymentChannel:e.pay_channel,userId:e.userId};e.pay_channel=="wx_pub"&&(a.code=e.code),console.log(a,"payMap");const{data:r}=await b.post("/api-student/open/userOrder/executePayment",{hideLoading:!1,data:{...a}});console.log(r,"payment"),u(r.reqParams)}catch(a){console.log(a)}},u=a=>{if(e.pay_channel=="alipay_qr"){const r=a.prod_mode==="false"?a.expend.qrcode_url+"?payment_id="+a.id+"&pay_channel="+a.pay_channel:a.expend.qrcode_url;window.location.href=r}else if(e.pay_channel=="wx_pub"){const r=JSON.parse(a.expend.pay_info);e.payInfo=r,typeof window.WeixinJSBridge=="undefined"?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",s,!1):document.attachEvent&&document.attachEvent("WeixinJSBridgeReady",s)(document).attachEvent("onWeixinJSBridgeReady",s):s()}},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},r=>{r.err_msg=="get_brand_wcpay_request:cancel"||r.err_msg=="get_brand_wcpay_request:fail",window.location.replace(location.origin+"/orchestra-student/#/payment-result?orderNo="+e.orderNo)})},y=()=>{const a=e.pay_channel;if(d().weixin)if(a==="wx_pub"){const r=v();console.log(r),r?e.code=r:q(e.wxAppId),e.browserStatus=!0,document.title="\u5FAE\u4FE1\u652F\u4ED8"}else a=="alipay_qr"&&(e.errorText="\u8BF7\u4F7F\u7528\u652F\u4ED8\u5B9D\u626B\u7801");else d().alipay?a==="wx_pub"?e.errorText="\u8BF7\u4F7F\u7528\u5FAE\u4FE1\u626B\u7801":a=="alipay_qr"&&(e.browserStatus=!0,document.title="\u652F\u4ED8\u5B9D\u652F\u4ED8"):e.errorText="\u8BF7\u5728\u5FAE\u4FE1\u6216\u652F\u4ED8\u5B9D\u5BA2\u6237\u7AEF\u6253\u5F00";e.errorText&&(document.title="ERROR")};return g(()=>{console.log(e),y()}),()=>n("div",{class:o.paydefine},[e.browserStatus&&n("div",{class:o.container},[n("div",{class:o.amount},[n("span",null,[l("\uFFE5 ")]),c(e.price)]),n(S,{inset:!0},{default:()=>[n(i,{title:"\u8BA2\u5355\u4FE1\u606F",value:e.body,valueClass:o.values},null),n(i,{title:"\u652F\u4ED8\u65B9\u5F0F",value:e.pay_channel==="wx_pub"?"\u5FAE\u4FE1":"\u652F\u4ED8\u5B9D"},null),n(i,{title:"\u5B9E\u4ED8\u91D1\u989D",value:`\uFFE5 ${c(e.price)}\u5143`},null)]}),n(x,{type:"primary",block:!0,size:"large",onClick:p,round:!0},{default:()=>[l("\u7ACB\u5373\u652F\u4ED8")]})]),!e.browserStatus&&n("div",{class:o.container},[n("div",{class:o["error-text"]},[e.errorText&&n(w,{class:o["error-icon"],name:"warning-o"},null),e.errorText])])])}});export{R as default};
  3. ========
  4. import{d as _,ah as m,r as f,$ as g,c as n,q as l,b6 as c,B as x,a5 as w,o as h,m as b,f as d,bm as v,bk as q}from"./index.1c621181.js";import{C as S}from"./index.2db9d877.js";import{C as i}from"./index.fd5ae97b.js";const I="_paydefine_gyhp9_1",C="_amount_gyhp9_16";var o={paydefine:I,amount:C,"error-text":"_error-text_gyhp9_27","error-icon":"_error-icon_gyhp9_34"},R=_({name:"pay-define",setup(){const t=m(),e=f({browserStatus:!1,errorText:"",code:null,pay_channel:t.query.pay_channel,wxAppId:t.query.wxAppId,body:t.query.body,price:t.query.price,orderNo:t.query.orderNo,userId:t.query.userId,payInfo:{}}),p=async()=>{try{if(parseFloat(e.price)<=0){h("\u652F\u4ED8\u91D1\u989D\u5F02\u5E38");return}const a={merOrderNo:e.orderNo,paymentChannel:e.pay_channel,userId:e.userId};e.pay_channel=="wx_pub"&&(a.code=e.code),console.log(a,"payMap");const{data:r}=await b.post("/api-student/open/userOrder/executePayment",{hideLoading:!1,data:{...a}});console.log(r,"payment"),u(r.reqParams)}catch(a){console.log(a)}},u=a=>{if(e.pay_channel=="alipay_qr"){const r=a.prod_mode==="false"?a.expend.qrcode_url+"?payment_id="+a.id+"&pay_channel="+a.pay_channel:a.expend.qrcode_url;window.location.href=r}else if(e.pay_channel=="wx_pub"){const r=JSON.parse(a.expend.pay_info);e.payInfo=r,typeof window.WeixinJSBridge=="undefined"?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",s,!1):document.attachEvent&&document.attachEvent("WeixinJSBridgeReady",s)(document).attachEvent("onWeixinJSBridgeReady",s):s()}},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},r=>{r.err_msg=="get_brand_wcpay_request:cancel"||r.err_msg=="get_brand_wcpay_request:fail",window.location.replace(location.origin+"/orchestra-student/#/payment-result?orderNo="+e.orderNo)})},y=()=>{const a=e.pay_channel;if(d().weixin)if(a==="wx_pub"){const r=v();console.log(r),r?e.code=r:q(e.wxAppId),e.browserStatus=!0,document.title="\u5FAE\u4FE1\u652F\u4ED8"}else a=="alipay_qr"&&(e.errorText="\u8BF7\u4F7F\u7528\u652F\u4ED8\u5B9D\u626B\u7801");else d().alipay?a==="wx_pub"?e.errorText="\u8BF7\u4F7F\u7528\u5FAE\u4FE1\u626B\u7801":a=="alipay_qr"&&(e.browserStatus=!0,document.title="\u652F\u4ED8\u5B9D\u652F\u4ED8"):e.errorText="\u8BF7\u5728\u5FAE\u4FE1\u6216\u652F\u4ED8\u5B9D\u5BA2\u6237\u7AEF\u6253\u5F00";e.errorText&&(document.title="ERROR")};return g(()=>{console.log(e),y()}),()=>n("div",{class:o.paydefine},[e.browserStatus&&n("div",{class:o.container},[n("div",{class:o.amount},[n("span",null,[l("\uFFE5 ")]),c(e.price)]),n(S,{inset:!0},{default:()=>[n(i,{title:"\u8BA2\u5355\u4FE1\u606F",value:e.body,valueClass:o.values},null),n(i,{title:"\u652F\u4ED8\u65B9\u5F0F",value:e.pay_channel==="wx_pub"?"\u5FAE\u4FE1":"\u652F\u4ED8\u5B9D"},null),n(i,{title:"\u5B9E\u4ED8\u91D1\u989D",value:`\uFFE5 ${c(e.price)}\u5143`},null)]}),n(x,{type:"primary",block:!0,size:"large",onClick:p,round:!0},{default:()=>[l("\u7ACB\u5373\u652F\u4ED8")]})]),!e.browserStatus&&n("div",{class:o.container},[n("div",{class:o["error-text"]},[e.errorText&&n(w,{class:o["error-icon"],name:"warning-o"},null),e.errorText])])])}});export{R as default};
  5. >>>>>>>> online:dist/assets/index.9b0e8e86.js