text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-goods-payment-auth"],{"540c":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("c5f6");var n={data:function(){return{type:"",openid:"",orderId:"",state:""}},onLoad:function(t){this.orderId=t.order_id,this.money=Number(t.money),this.type=Number(t.type),this.uid=Number(t.uid),this.state=this.$common.getQueryString("state"),this.getCode()},methods:{getCode:function(){var t=this.$common.getQueryString("code");t&&this.getOpenId(t)},getOpenId:function(t){var e=this,i={code:t,scope:2,state:this.state};this.$api.getOpenId(i,function(t){t.status?(e.openid=t.data.openid,e.toPayHandler("wechatpay")):e.$common.errorToShow(t.msg)})},checkWXJSBridge:function(t){var e=this,i=setInterval(function(){"undefined"!=typeof window.WeixinJSBridge&&(clearTimeout(i),e.onBridgeReady(t))},200)},onBridgeReady:function(t){var e=this;window.WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:t.appid,timeStamp:t.timeStamp,nonceStr:t.nonceStr,package:t.package,signType:t.signType,paySign:t.paySign},function(i){"get_brand_wcpay_request:ok"===i.err_msg?e.$common.successToShow("支付成功"):"get_brand_wcpay_request:cancel"===i.err_msg?e.$common.errorToShow("取消支付"):e.$common.errorToShow("支付失败"),setTimeout(function(){e.$common.redirectTo("/pages/goods/payment/result?id="+t.payment_id)},1e3)})},toPayHandler:function(t){var e=this,i={payment_code:t,payment_type:this.type};i["ids"]=1==this.type||5==this.type||6==this.type?this.orderId:this.uid,1==this.type&&this.orderId?this.openid&&(i["params"]={trade_type:"JSAPI_OFFICIAL",openid:this.openid}):2==this.type&&this.money?this.openid&&(i["params"]={trade_type:"JSAPI_OFFICIAL",money:this.money,openid:this.openid}):5!=this.type&&6!=this.type||!this.recharge||(i["params"]={trade_type:"JSAPI_OFFICIAL",openid:this.openid,formid:this.orderId}),this.$api.pay(i,function(t){if(t.status){var i=t.data;e.checkWXJSBridge(i)}else e.$common.errorToShow(t.msg)})}}};e.default=n},"736f":function(t,e,i){"use strict";i.r(e);var n=i("864f"),a=i("d1e0");for(var o in a)"default"!==o&&function(t){i.d(e,t,function(){return a[t]})}(o);i("cb37");var r=i("2877"),s=Object(r["a"])(a["default"],n["a"],n["b"],!1,null,"23426a82",null);e["default"]=s.exports},"864f":function(t,e,i){"use strict";var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{staticClass:"content"},[i("v-uni-view",{staticClass:"content-c"},[i("v-uni-image",{staticClass:"load-img",attrs:{src:"/static/image/loading.gif",mode:""}}),i("v-uni-view",{staticClass:"load-text color-9"},[t._v("信息加载中.....")])],1)],1)},a=[];i.d(e,"a",function(){return n}),i.d(e,"b",function(){return a})},a357:function(t,e,i){var n=i("bb8a2");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("4f06").default;a("cbeb2b64",n,!0,{sourceMap:!1,shadowMode:!1})},bb8a2:function(t,e,i){e=t.exports=i("2350")(!1),e.push([t.i,".content[data-v-23426a82]{position:relative;height:80vh}.content-c[data-v-23426a82]{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);text-align:center}.load-img[data-v-23426a82]{width:%?100?%;height:%?100?%}.load-text[data-v-23426a82]{font-size:%?26?%}",""])},cb37:function(t,e,i){"use strict";var n=i("a357"),a=i.n(n);a.a},d1e0:function(t,e,i){"use strict";i.r(e);var n=i("540c"),a=i.n(n);for(var o in n)"default"!==o&&function(t){i.d(e,t,function(){return n[t]})}(o);e["default"]=a.a}}]);