index.359cea3b.js 6.6 KB

12345
  1. <<<<<<<< HEAD:dist/assets/index.359cea3b.js
  2. import{d as y,ag as f,aV as g,r as h,$ as m,c as a,F as w,b3 as b,L as x,a5 as v,b6 as S,e as l,o as q,m as I,bh as C,bf as N}from"./index.ffe80dbe.js";import{C as R}from"./index.914765a1.js";import{C as c}from"./index.ea031708.js";const B="_paywxresult_1bih4_1",T="_container_1bih4_23";var t={paywxresult:B,"van-cell":"_van-cell_1bih4_5","van-cell__title":"_van-cell__title_1bih4_8","van-cell__value":"_van-cell__value_1bih4_9","van-button":"_van-button_1bih4_14","van-loading__spinner":"_van-loading__spinner_1bih4_19",container:T,"order-loading":"_order-loading_1bih4_27","error-text":"_error-text_1bih4_37","error-icon":"_error-icon_1bih4_44"},J=y({name:"pay-result",setup(){const d=f(),o=g(),e=h({errorText:"",browserStatus:!1,code:null,pay_channel:o.query.pay_channel,wxAppId:o.query.wxAppId,body:o.query.body,price:o.query.price,orderNo:o.query.orderNo,userId:o.query.userId,payInfo:{}});console.log(e.errorText);const p=()=>{const n=o.query;console.log(n),!n.orderNo||!n.pay_channel?S({message:"\u652F\u4ED8\u8BA2\u5355\u4FE1\u606F\u9519\u8BEF\u8BF7\u91CD\u65B0\u652F\u4ED8",showCancelButton:!1}).then(()=>{d.back()}):l().weixin?(e.browserStatus=!0,_()):l().alipay?(e.browserStatus=!0,i()):(e.errorText="\u8BF7\u5728\u5FAE\u4FE1\u6216\u652F\u4ED8\u5B9D\u5BA2\u6237\u7AEF\u6253\u5F00",document.title="ERROR")},i=async()=>{try{try{if(parseFloat(e.price)<=0){q("\u652F\u4ED8\u91D1\u989D\u5F02\u5E38");return}const n={merOrderNo:e.orderNo,paymentChannel:e.pay_channel,userId:e.userId};e.pay_channel=="wx_pub"&&(n.code=e.code);const{data:r}=await I.post("/api-student/open/userOrder/executePayment",{data:{...n}});console.log(r,"payment"),u(r.reqParams)}catch(n){console.log(n)}}catch{}},u=n=>{if(e.pay_channel=="alipay_qr"){const r=n.prod_mode==="false"?n.expend.qrcode_url+"?payment_id="+n.id+"&pay_channel="+n.pay_channel:n.expend.qrcode_url;window.location.href=r}else if(e.pay_channel=="alipay_wap")window.location.href=n.expend.pay_info;else if(e.pay_channel=="wx_pub"){const r=JSON.parse(n.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 n=e.payInfo;window.WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:n.appId,timeStamp:n.timeStamp,nonceStr:n.nonceStr,package:n.package,signType:n.signType,paySign:n.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)})},_=()=>{const n=C();n?(e.code=n,i()):N(e.wxAppId)};return m(()=>{p()}),()=>a("div",{class:t.paywxresult},[e.browserStatus&&a(w,null,[a("div",{class:t.container},[a(R,{border:!1},{default:()=>[a(c,{title:"\u8BA2\u5355\u91D1\u989D",value:"\uFFE5 "+b(e.price)},null),a(c,{title:"\u8BA2\u5355\u4FE1\u606F",value:e.body},null)]})]),a("div",{class:t["order-loading"]},[a("p",null,[e.pay_channel=="wx_pub"?"\u5FAE\u4FE1\u652F\u4ED8":"\u652F\u4ED8\u5B9D\u652F\u4ED8"]),a(x,{type:"spinner",color:"#01C1B5"},null)])]),!e.browserStatus&&a("div",{class:t["error-text"]},[e.errorText&&a(v,{class:t["error-icon"],name:"warning-o"},null),e.errorText])])}});export{J as default};
  3. ========
  4. import{d as y,ag as m,ah as f,r as g,$ as h,c as a,F as w,b6 as b,L as x,a5 as v,b9 as S,f as l,o as q,m as I,bm as C,bk as N}from"./index.1c621181.js";import{C as R}from"./index.2db9d877.js";import{C as c}from"./index.fd5ae97b.js";const B="_paywxresult_1bih4_1",T="_container_1bih4_23";var t={paywxresult:B,"van-cell":"_van-cell_1bih4_5","van-cell__title":"_van-cell__title_1bih4_8","van-cell__value":"_van-cell__value_1bih4_9","van-button":"_van-button_1bih4_14","van-loading__spinner":"_van-loading__spinner_1bih4_19",container:T,"order-loading":"_order-loading_1bih4_27","error-text":"_error-text_1bih4_37","error-icon":"_error-icon_1bih4_44"},J=y({name:"pay-result",setup(){const d=m(),o=f(),e=g({errorText:"",browserStatus:!1,code:null,pay_channel:o.query.pay_channel,wxAppId:o.query.wxAppId,body:o.query.body,price:o.query.price,orderNo:o.query.orderNo,userId:o.query.userId,payInfo:{}});console.log(e.errorText);const p=()=>{const n=o.query;console.log(n),!n.orderNo||!n.pay_channel?S({message:"\u652F\u4ED8\u8BA2\u5355\u4FE1\u606F\u9519\u8BEF\u8BF7\u91CD\u65B0\u652F\u4ED8",showCancelButton:!1}).then(()=>{d.back()}):l().weixin?(e.browserStatus=!0,_()):l().alipay?(e.browserStatus=!0,i()):(e.errorText="\u8BF7\u5728\u5FAE\u4FE1\u6216\u652F\u4ED8\u5B9D\u5BA2\u6237\u7AEF\u6253\u5F00",document.title="ERROR")},i=async()=>{try{try{if(parseFloat(e.price)<=0){q("\u652F\u4ED8\u91D1\u989D\u5F02\u5E38");return}const n={merOrderNo:e.orderNo,paymentChannel:e.pay_channel,userId:e.userId};e.pay_channel=="wx_pub"&&(n.code=e.code);const{data:r}=await I.post("/api-student/open/userOrder/executePayment",{data:{...n}});console.log(r,"payment"),u(r.reqParams)}catch(n){console.log(n)}}catch{}},u=n=>{if(e.pay_channel=="alipay_qr"){const r=n.prod_mode==="false"?n.expend.qrcode_url+"?payment_id="+n.id+"&pay_channel="+n.pay_channel:n.expend.qrcode_url;window.location.href=r}else if(e.pay_channel=="alipay_wap")window.location.href=n.expend.pay_info;else if(e.pay_channel=="wx_pub"){const r=JSON.parse(n.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 n=e.payInfo;window.WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:n.appId,timeStamp:n.timeStamp,nonceStr:n.nonceStr,package:n.package,signType:n.signType,paySign:n.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)})},_=()=>{const n=C();n?(e.code=n,i()):N(e.wxAppId)};return h(()=>{p()}),()=>a("div",{class:t.paywxresult},[e.browserStatus&&a(w,null,[a("div",{class:t.container},[a(R,{border:!1},{default:()=>[a(c,{title:"\u8BA2\u5355\u91D1\u989D",value:"\uFFE5 "+b(e.price)},null),a(c,{title:"\u8BA2\u5355\u4FE1\u606F",value:e.body},null)]})]),a("div",{class:t["order-loading"]},[a("p",null,[e.pay_channel=="wx_pub"?"\u5FAE\u4FE1\u652F\u4ED8":"\u652F\u4ED8\u5B9D\u652F\u4ED8"]),a(x,{type:"spinner",color:"#01C1B5"},null)])]),!e.browserStatus&&a("div",{class:t["error-text"]},[e.errorText&&a(v,{class:t["error-icon"],name:"warning-o"},null),e.errorText])])}});export{J as default};
  5. >>>>>>>> online:dist/assets/index.5e435f2e.js