PayCenter.35097446.js 3.0 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["PayCenter"],{1098:function(e,t,r){},"32e7":function(e,t,r){"use strict";var n=r("1098"),o=r.n(n);o.a},"33dd":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"payCenter"},[r("div",{staticClass:"error-text"},[e.errorText?r("van-icon",{staticClass:"error-icon",attrs:{name:"warning-o"}}):e._e(),e._v("\n\t\t"+e._s(e.errorText)+"\n\t")],1)])},o=[],i=r("cf45"),a={name:"payCenter",data:function(){var e=this.$route.query;return{amount:Object(i["b"])(e.amount),orderNo:e.orderNo,sign:e.sign,payType:e.payType,errorText:null,orderBody:e.orderBody,orderSubject:e.orderSubject,code:null,platform:e.platform}},mounted:function(){var e=this.payType,t=window.navigator.userAgent.toLowerCase();if("micromessenger"==t.match(/MicroMessenger/i))if("wx_pub"===e){var r=Object(i["c"])("code");r?(this.code=r,this.onPayPage()):this.goAuth(),document.title="微信支付"}else"alipay_qr"==e&&(this.errorText="请使用支付宝扫码");else"alipayclient"==t.match(/AlipayClient/i)?"wx_pub"===e?this.errorText="请使用微信扫码":"alipay_qr"==e&&(document.title="支付宝支付",this.onPayPage()):this.errorText="请在微信或支付宝客户端打开";this.errorText&&(document.title="ERROR")},methods:{onPayPage:function(){this.$router.replace({path:"payDefine",query:{amount:this.amount,orderNo:this.orderNo,sign:this.sign,payType:this.payType,orderBody:this.orderBody,orderSubject:this.orderSubject,platform:this.platform,code:this.code}})},goAuth:function(){var e=encodeURIComponent(window.location.href),t="snsapi_base",r="wx8ce3393bf826b6e4",n="https://open.weixin.qq.com/connect/oauth2/authorize?appid=".concat(r,"&redirect_uri=").concat(e,"&response_type=code&scope=").concat(t,"&state=STATE&connect_redirect=1#wechat_redirect");window.location.replace(n)}},destroyed:function(){this.$toast.clear(),this.$dialog.close(),document.title="管乐迷"}},c=a,s=(r("32e7"),r("2877")),d=Object(s["a"])(c,n,o,!1,null,null,null);t["default"]=d.exports},cf45:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return i}));var n=function(){var e=navigator.userAgent;return{trident:e.indexOf("Trident")>-1,presto:e.indexOf("Presto")>-1,webKit:e.indexOf("AppleWebKit")>-1,gecko:e.indexOf("Gecko")>-1&&-1==e.indexOf("KHTML"),mobile:!!e.match(/AppleWebKit.*Mobile.*/),ios:!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:e.indexOf("EXAMAPPA")>-1||e.indexOf("Adr")>-1,iPhone:e.indexOf("EXAMAPPI")>-1,iPad:e.indexOf("iPad")>-1,webApp:-1==e.indexOf("Safari"),weixin:e.indexOf("MicroMessenger")>-1,qq:" qq"==e.match(/\sQQ/i)}},o=function(e){var t=parseFloat(e);if(isNaN(t))return"0.00";t=Math.round(100*t)/100;var r=t.toString(),n=r.indexOf(".");n<0&&(n=r.length,r+=".");while(r.length<=n+2)r+="0";return r},i=function(e){return decodeURIComponent((new RegExp("[?|&]"+e+"=([^&;]+?)(&|#|;|$)").exec(location.href)||[,""])[1].replace(/\+/g,"%20"))||null}}}]);