(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/money/pay"],{483:function(e,n,o){"use strict";(function(e){var n=o(3);o(25);n(o(24));var t=n(o(484));wx.__webpack_require_UNI_MP_PLUGIN__=o,e(t.default)}).call(this,o(1)["createPage"])},484:function(e,n,o){"use strict";o.r(n);var t=o(485),i=o(487);for(var s in i)["default"].indexOf(s)<0&&function(e){o.d(n,e,(function(){return i[e]}))}(s);o(489);var a,r=o(39),d=Object(r["default"])(i["default"],t["render"],t["staticRenderFns"],!1,null,null,null,!1,t["components"],a);d.options.__file="pages/money/pay.vue",n["default"]=d.exports},485:function(e,n,o){"use strict";o.r(n);var t=o(486);o.d(n,"render",(function(){return t["render"]})),o.d(n,"staticRenderFns",(function(){return t["staticRenderFns"]})),o.d(n,"recyclableRender",(function(){return t["recyclableRender"]})),o.d(n,"components",(function(){return t["components"]}))},486:function(e,n,o){"use strict";var t;o.r(n),o.d(n,"render",(function(){return i})),o.d(n,"staticRenderFns",(function(){return a})),o.d(n,"recyclableRender",(function(){return s})),o.d(n,"components",(function(){return t}));var i=function(){var e=this,n=e.$createElement,o=(e._self._c,e.money.toFixed(2));e._isMounted||(e.e0=function(n){!e.payLoding&&e.confirm()}),e.$mp.data=Object.assign({},{$root:{g0:o}})},s=!1,a=[];i._withStripped=!0},487:function(e,n,o){"use strict";o.r(n);var t=o(488),i=o.n(t);for(var s in t)["default"].indexOf(s)<0&&function(e){o.d(n,e,(function(){return t[e]}))}(s);n["default"]=i.a},488:function(e,n,o){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t=o(305),i=o(51),s=(o(27),{data:function(){return{payType:1,payName:"weixin",orderInfo:{},money:0,now_money:0,orderKey:"",orderId:"",payLoding:!1,type:"",pinkid:"",store_id:0,point_id:0,shipping_type:1,goodsType:0}},computed:{},onLoad:function(e){var n=this;if(e.store_id&&(this.store_id=e.store_id),e.goodstype&&(this.goodsType=e.goodstype,console.log(this.goodsType,"this.goodsTypethis.goodsTypethis.goodsType")),1==e.type)console.log(e.ordid,e.money,"------------------------"),this.type=1,this.orderId=e.ordid,this.money=1*e.money;else{this.orderKey=e.key;var o=this.$api.prePage();(0,i.computedOrderkey)({orderkey:this.orderKey,couponId:o.couponChecked?o.couponChecked.id:"",addressId:o.addressData.id,useIntegral:o.checkedPoints?1:0,shipping_type:o.shipping_type}).then((function(e){var o=e.data;console.log(o),1==n.shipping_type&&(n.money=+o.result.pay_price+ +o.result.deposit),2==n.shipping_type&&(n.money=+o.result.pay_price+ +o.result.deposit-+o.result.pay_postage)}))}e.pinkid&&(this.pinkid=e.pinkid),e.point_id&&(this.point_id=e.point_id,console.log(this.point_id,"this.point_id+++++++++++++")),e.shipping_type&&(this.shipping_type=e.shipping_type),(0,t.balance)({}).then((function(e){var o=e.data;n.now_money=o.now_money}))},methods:{changePayType:function(e){this.payType=e,1==this.payType&&(this.payName="weixin"),2==this.payType&&(this.payName="ali"),3==this.payType&&(this.payName="yue")},orderMoneyPay:function(){var n=this;(0,i.orderPay)({uni:n.orderId,from:"routine",paytype:n.payName}).then((function(o){if("yue"==n.payName&&"SUCCESS"==o.data.status&&(200==o.status?n.paySuccessTo():n.$api.msg(msg)),"weixin"==n.payName||"routine"==n.payName){var t=o.data.result.jsConfig,i={timeStamp:t.timestamp,nonceStr:t.nonceStr,package:t.package,signType:t.signType,paySign:t.paySign,success:function(e){n.paySuccessTo()},fail:function(){e.switchTab({url:"/pages/cart/cart?state=0"})}};console.log("开始支付"),console.log("MP-WEIXIN++++++++++"),console.log(n.payName),"weixin"==n.payName&&(console.log("开始支付"),wx.requestPayment(i))}e.hideLoading(),n.payLoding=!1})).catch((function(e){n.payLoding=!1,console.log(e)}))},paySuccessTo:function(){e.hideLoading(),e.redirectTo({url:"/pages/money/paySuccess?orderid="+this.orderId+"&mun="+this.money})},confirm:async function(){var n=this;if(wx.getSetting({withSubscriptions:!0,success:function(e){"accept"==e["utyQMQe5vfiJt1CA3-Q3JnGd2_dQ3mdyY0K44Gpaut4"]&&console.log("订阅成功")}}),wx.requestSubscribeMessage)wx.requestSubscribeMessage({tmplIds:["utyQMQe5vfiJt1CA3-Q3JnGd2_dQ3mdyY0K44Gpaut4"],success:function(e){console.log(e,"订阅消息")},fail:function(e){console.log(e)},complete:function(){"yue"==n.payName&&+n.now_money