1 |
- !function(){function e(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function r(r){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?e(Object(a),!0).forEach((function(e){n(r,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(a)):e(Object(a)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(a,e))}))}return r}function n(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function t(e,r,n,t,a,o,i){try{var l=e[o](i),c=l.value}catch(d){return void n(d)}l.done?r(c):Promise.resolve(c).then(t,a)}var a=document.createElement("style");a.innerHTML="._paywxresult_1bih4_1{overflow:hidden;min-height:100vh}._paywxresult_1bih4_1 :gloabl ._van-cell_1bih4_5{padding:.32rem .42667rem}._paywxresult_1bih4_1 :gloabl ._van-cell__title_1bih4_8,._paywxresult_1bih4_1 :gloabl ._van-cell__value_1bih4_9{flex:auto;font-size:.42667rem;color:#4f4f4f}._paywxresult_1bih4_1 :gloabl ._van-button_1bih4_14{font-size:.42667rem;width:86%;margin:.53333rem auto}._paywxresult_1bih4_1 :gloabl ._van-loading__spinner_1bih4_19{width:1.33333rem;height:1.33333rem}._container_1bih4_23{background:#fff;padding:.4rem 0}._order-loading_1bih4_27{padding:.4rem 0;margin-top:.4rem;background-color:#fff;text-align:center;font-size:.4rem}._order-loading_1bih4_27>p{margin-bottom:.4rem}._error-text_1bih4_37{font-size:.4rem;width:100%;text-align:center;color:#3f3f3f;margin-top:2.66667rem}._error-icon_1bih4_44{display:block;color:#ffb07b;font-size:.58667rem;margin-bottom:.53333rem}\n",document.head.appendChild(a),System.register(["./ResizeObserver.es-legacy.8d60aee1.js","./index-legacy.610f0a70.js","./index-legacy.fd89cccf.js"],(function(e){"use strict";var n,a,o,i,l,c,d,u,p,s,y,_,f,b,v,g,h,m,w,x;return{setters:[function(e){n=e.d,a=e.Q,o=e.P,i=e.S,l=e.V,c=e.j,d=e.F,u=e.bC,p=e.aT,s=e.N,y=e.D,_=e.f,f=e.bS,b=e.bU,v=e.T,g=e.y,h=e.g,m=e.bT},function(e){w=e.C},function(e){x=e.C}],execute:function(){var O="_paywxresult_1bih4_1",S="_container_1bih4_23",P="_order-loading_1bih4_27",j="_error-text_1bih4_37",I="_error-icon_1bih4_44";e("default",n({name:"pay-result",setup:function(){var e=a(),n=o(),N=i({errorText:"",browserStatus:!1,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}),k=function(){var e,n=(e=regeneratorRuntime.mark((function e(){var n,t,a,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!(parseFloat(N.price)<=0)){e.next=4;break}return v("支付金额异常"),e.abrupt("return");case 4:return t={merOrderNo:N.orderNo,paymentChannel:N.pay_channel,userId:N.userId,code:N.code},e.next=7,g.post("/api-student/open/userOrder/executePayment/v2",{data:r({},t)});case 7:a=e.sent,o=a.data,N.isYeePay=-1!==(null===(n=o.paymentVender)||void 0===n?void 0:n.indexOf("yeepay")),console.log(o,"data"),B(o.reqParams),e.next=18;break;case 14:e.prev=14,e.t0=e.catch(0),console.log(e.t0),window.location.replace(location.origin+h.payBackPath+"#/tradeDetail?orderNo="+N.orderNo);case 18:case"end":return e.stop()}}),e,null,[[0,14]])})),function(){var r=this,n=arguments;return new Promise((function(a,o){var i=e.apply(r,n);function l(e){t(i,a,o,l,c,"next",e)}function c(e){t(i,a,o,l,c,"throw",e)}l(void 0)}))});return function(){return n.apply(this,arguments)}}(),q=function(e){var r;r=function(){window.AlipayJSBridge.call("tradePay",{tradeNO:e},(function(e){e.resultCode,window.location.replace(location.origin+h.payBackPath+"#/tradeDetail?orderNo="+N.orderNo),window.AlipayJSBridge.call("closeWebview")}))},window.AlipayJSBridge?r&&r():document.addEventListener("AlipayJSBridgeReady",r,!1)},B=function(e){if("alipay_qr"==N.pay_channel)if(N.isYeePay)q(e.tradeNO);else{var r,n,t="false"===e.prod_mode?(null==e||null===(r=e.expend)||void 0===r?void 0:r.qrcode_url)+"?payment_id="+e.id+"&pay_channel="+e.pay_channel:null==e||null===(n=e.expend)||void 0===n?void 0:n.qrcode_url;window.location.href=t}else if("alipay_wap"==N.pay_channel){var a;window.location.href=null==e||null===(a=e.expend)||void 0===a?void 0:a.pay_info}else if("wx_pub"==N.pay_channel){var o;console.log(N.isYeePay,null==e?void 0:e.expend,"payInfo");var i=N.isYeePay?JSON.parse(e.prePayTn):null!=e&&e.expend?JSON.parse(null==e||null===(o=e.expend)||void 0===o?void 0:o.pay_info):e;N.payInfo=i,void 0===window.WeixinJSBridge?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",T,!1):document.attachEvent&&document.attachEvent("WeixinJSBridgeReady",T)(document).attachEvent("onWeixinJSBridgeReady",T):T()}},T=function(){var e=N.payInfo;window.WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:e.appId,timeStamp:e.timeStamp,nonceStr:e.nonceStr,package:e.package||e.packageValue,signType:e.signType,paySign:e.paySign},(function(e){"get_brand_wcpay_request:cancel"==e.err_msg||e.err_msg,window.location.replace(location.origin+h.payBackPath+"#/tradeDetail?orderNo="+N.orderNo)}))},J=function(){var e=f();e?(N.code=e,k()):m(N.wxAppId)};return l((function(){!function(){var r,t=n.query,a=-1!==(null===(r=N.paymentType)||void 0===r?void 0:r.indexOf("yeepay"));if(t.orderNo&&t.pay_channel)if(_().weixin)N.browserStatus=!0,J();else if(_().alipay)if(a){var o=f("auth_code");o?(N.code=o,N.browserStatus=!0,k()):b(N.alipayAppId)}else N.browserStatus=!0,k();else N.errorText="请在微信或支付宝客户端打开",document.title="ERROR";else y.confirm({message:"支付订单信息错误请重新支付",showCancelButton:!1}).then((function(){e.back()}))}()})),function(){return c("div",{class:O},[N.browserStatus&&c(d,null,[c("div",{class:S},[c(x,{border:!1},{default:function(){return[c(w,{title:"订单金额",value:"¥ "+u(N.price)},null),c(w,{title:"订单信息",value:N.body},null)]}})]),c("div",{class:P},[c("p",null,["wx_pub"==N.pay_channel?"微信支付":"支付宝支付"]),c(p,{type:"spinner",color:"#01C1B5"},null)])]),!N.browserStatus&&c("div",{class:j},[N.errorText&&c(s,{class:I,name:"warning-o"},null),N.errorText])])}}}))}}}))}();
|