(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["my/wallet/index"],{262:function(e,n,t){"use strict";(function(e){t(5);o(t(4));var n=o(t(263));function o(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=t,e(n.default)}).call(this,t(1)["createPage"])},263:function(e,n,t){"use strict";t.r(n);var o=t(264),i=t(266);for(var a in i)"default"!==a&&function(e){t.d(n,e,(function(){return i[e]}))}(a);t(268);var c,s=t(11),r=Object(s["default"])(i["default"],o["render"],o["staticRenderFns"],!1,null,"1efc2e21",null,!1,o["components"],c);r.options.__file="my/wallet/index.vue",n["default"]=r.exports},264:function(e,n,t){"use strict";t.r(n);var o=t(265);t.d(n,"render",(function(){return o["render"]})),t.d(n,"staticRenderFns",(function(){return o["staticRenderFns"]})),t.d(n,"recyclableRender",(function(){return o["recyclableRender"]})),t.d(n,"components",(function(){return o["components"]}))},265:function(e,n,t){"use strict";var o;t.r(n),t.d(n,"render",(function(){return i})),t.d(n,"staticRenderFns",(function(){return c})),t.d(n,"recyclableRender",(function(){return a})),t.d(n,"components",(function(){return o}));try{o={uPopup:function(){return t.e("uview-ui/components/u-popup/u-popup").then(t.bind(null,529))}}}catch(s){if(-1===s.message.indexOf("Cannot find module")||-1===s.message.indexOf(".vue"))throw s;console.error(s.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范，文档：https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范，需手动引入，并在 components 中注册该组件")}var i=function(){var e=this,n=e.$createElement;e._self._c;e._isMounted||(e.e0=function(n){e.showpay=!0})},a=!1,c=[];i._withStripped=!0},266:function(e,n,t){"use strict";t.r(n);var o=t(267),i=t.n(o);for(var a in o)"default"!==a&&function(e){t.d(n,e,(function(){return o[e]}))}(a);n["default"]=i.a},267:function(e,n,t){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t={data:function(){return{showpay:!1,closeable:!0,openLists:[],openWay:2,myMoney:0,wallet:[],thisSelect:{}}},onLoad:function(){this.openLists=[{image:"../../static/images/my/weixin.png",text:"微信",id:2}]},onShow:function(){this.deploy(),this.getMoneyNum()},methods:{selectWay:function(e){this.openWay=e.id},deploy:function(){var e=this;this.$Request.get("/app/topupmoney/selectTopUpMoney").then((function(n){0==n.code&&(n.data.forEach((function(e){e.isSelect=!1})),e.wallet=n.data)}))},active:function(e){var n=this;this.wallet.forEach((function(t){t.id==e.id?(t.isSelect=!0,n.thisSelect=e):t.isSelect=!1})),console.log(this.wallet)},record:function(){e.navigateTo({url:"/my/wallet/walletDet"})},getMoneyNum:function(){var e=this;this.$Request.get("/app/userMoney/selectMyMoney").then((function(n){0==n.code&&(e.myMoney=n.data.money)}))},payment:function(){var n=this;n.showpay=!1,n.thisSelect.money?2==n.openWay?n.$Request.post("/app/wxPay/wxPayJsApiMoney",{money:n.thisSelect.money,type:3}).then((function(t){e.hideLoading(),e.requestPayment({provider:"wxpay",timeStamp:t.data.timestamp,nonceStr:t.data.noncestr,package:t.data.package,signType:t.data.signType,paySign:t.data.sign,success:function(t){e.showToast({title:"支付成功",icon:"success"}),n.getMoneyNum()},fail:function(n){console.log("fail:"+JSON.stringify(n)),e.showToast({title:"支付失败",icon:"none"})}})})):n.openWay:e.showToast({title:"请选择充值金额！",icon:"none"})},callPay:function(e){"undefined"===typeof WeixinJSBridge?(console.log(document.addEventListener,"999"),document.addEventListener?document.addEventListener("WeixinJSBridgeReady",this.onBridgeReady(e),!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",this.onBridgeReady(e)),document.attachEvent("onWeixinJSBridgeReady",this.onBridgeReady(e)))):(console.log(888),this.onBridgeReady(e))},onBridgeReady:function(n){console.log(n);var t=this;n.package&&WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:n.appid,timeStamp:n.timestamp,nonceStr:n.noncestr,package:n.package,signType:n.signType,paySign:n.sign},(function(o){"get_brand_wcpay_request:ok"===o.err_msg?(e.showLoading({title:"支付成功"}),e.hideLoading(),t.getMoneyNum(),e.navigateTo({url:"/pages/my/index"})):e.hideLoading(),WeixinJSBridge.log(n.err_msg)}))},isCheckPay:function(n,t,o){0==n?(console.log("999999999999"),this.setPayment(t,o)):(e.hideLoading(),e.showToast({title:"支付信息有误"}))},setPayment:function(n,t){console.log(777777777,n,t),e.requestPayment({provider:n,orderInfo:t,success:function(n){e.hideLoading(),e.showLoading({title:"支付成功",icon:"none"}),that.getMoneyNum()},fail:function(n){e.hideLoading()},complete:function(){e.hideLoading()}})}}};n.default=t}).call(this,t(1)["default"])},268:function(e,n,t){"use strict";t.r(n);var o=t(269),i=t.n(o);for(var a in o)"default"!==a&&function(e){t.d(n,e,(function(){return o[e]}))}(a);n["default"]=i.a},269:function(e,n,t){}},[[262,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/my/wallet/index.js.map