1 |
- require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/users/user_payment/index"],{"0998":function(e,t,i){"use strict";var n=i("2d76"),a=i.n(n);a.a},"2d76":function(e,t,i){},"525e":function(e,t,i){"use strict";i.r(t);var n=i("af3a"),a=i("9df6");for(var r in a)["default"].indexOf(r)<0&&function(e){i.d(t,e,(function(){return a[e]}))}(r);i("0998");var o=i("f0c5"),c=Object(o["a"])(a["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);t["default"]=c.exports},"633a":function(e,t,i){"use strict";(function(e,t){var n=i("4ea4");i("59a4");n(i("66fd"));var a=n(i("525e"));e.__webpack_require_UNI_MP_PLUGIN__=i,t(a.default)}).call(this,i("bc2e")["default"],i("543d")["createPage"])},"9df6":function(e,t,i){"use strict";i.r(t);var n=i("b4f9"),a=i.n(n);for(var r in n)["default"].indexOf(r)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(r);t["default"]=a.a},af3a:function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){}));var n=function(){var e=this.$createElement,t=(this._self._c,this.active?null:this.picList.length),i=this.active?null:this.picList.length;this.$mp.data=Object.assign({},{$root:{g0:t,g1:i}})},a=[]},b4f9:function(e,t,i){"use strict";(function(e){var n=i("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i("4818"),r=i("8e8a"),o=i("bcf5"),c=i("26cb"),s=n(i("5c3b")),u=(i("5c29"),{components:{home:function(){Promise.all([i.e("common/vendor"),i.e("components/home/index")]).then(function(){return resolve(i("377d"))}.bind(null,i)).catch(i.oe)},payment:function(){Promise.all([i.e("common/vendor"),i.e("components/payment/index")]).then(function(){return resolve(i("a3c7"))}.bind(null,i)).catch(i.oe)}},mixins:[s.default],data:function(){return{now_money:0,navRecharge:["账户充值","佣金转入"],active:0,number:"",userinfo:{},placeholder:"0.00",from:"",isAuto:!1,isShowAuth:!1,picList:[],activePic:0,money:"",numberPic:"",rechar_id:0,password:"",goodsList:[],pay_order_id:"",payMode:[{name:"微信支付",icon:"icon-weixinzhifu",value:"weixin",title:"微信快捷支付",payStatus:!0}],pay_close:!1,payType:"",totalPrice:"0",formContent:"",type:"",rechargeAttention:[],moneyMaxLeng:8}},computed:(0,c.mapGetters)(["isLogin"]),watch:{isLogin:{handler:function(e,t){e&&(this.getOrderPayType(),this.getUserInfo(),this.getRecharge())},deep:!0}},onLoad:function(e){this.isLogin?(this.getOrderPayType(),this.getUserInfo(),this.getRecharge()):(0,r.toLogin)()},onShow:function(){e.removeStorageSync("form_type_cart")},methods:{onLunch:function(){this.getOrderPayType(),this.getUserInfo(),this.getRecharge()},inputNum:function(e){var t=e.detail.value,i=t.indexOf(".");this.moneyMaxLeng=i>-1?i+3:8},picCharge:function(e,t){this.activePic=e,void 0===t?(this.rechar_id=0,this.numberPic=""):(this.money="",this.rechar_id=t.id,this.numberPic=t.price)},getRecharge:function(){var e=this;(0,a.getRechargeApi)().then((function(t){e.picList=t.data.recharge_quota,e.picList[0]&&(e.rechar_id=e.picList[0].id,e.numberPic=e.picList[0].price),e.rechargeAttention=t.data.recharge_attention||[]})).catch((function(t){e.$util.Tips({title:t})}))},getOrderPayType:function(){var t=this;(0,o.orderOfflinePayType)().then((function(e){var i=e.data,n=(i.ali_pay_status,i.pay_weixin_open);t.payMode[0].payStatus=!!n})).catch((function(t){e.showToast({title:t,icon:"none"})}))},onLoadFun:function(){this.getOrderPayType(),this.getUserInfo(),this.getRecharge(),this.isShowAuth=!1},authColse:function(e){this.isShowAuth=e},navRecharges:function(e){this.active=e},getUserInfo:function(){var e=this;(0,a.getUserInfo)().then((function(t){e.$set(e,"userinfo",t.data)}))},changePayType:function(e){this.payType="alipay"==e?"alipay":"routine"},onChangeFun:function(e){var t=e,i=t.action||null,n=void 0!=t.value?t.value:null;i&&this[i]&&this[i](n)},payClose:function(){this.pay_close=!1},payCheck:function(e){this.createMemberCard(e)},createMemberCard:function(t){e.showLoading({title:"正在加载…"}),e.showLoading({title:"正在支付"});var i=this,n=parseFloat(this.money);if(0==this.rechar_id){if(Number.isNaN(n))return i.$util.Tips({title:"充值金额必须为数字"});if(n<=0)return i.$util.Tips({title:"充值金额不能为0"})}(0,a.rechargeRecharge)({price:parseFloat(this.totalPrice),type:0,rechar_id:this.rechar_id,from:"alipay"===this.payType?"alipay":"routine"}).then((function(t){e.hideLoading();var n=t.data.data,a="";a=e.requestOrderPayment?"requestOrderPayment":"requestPayment",e[a]({timeStamp:n.timestamp,nonceStr:n.nonceStr,package:n.package,signType:n.signType,paySign:n.paySign,success:function(e){return i.$util.Tips({title:"支付成功",icon:"success"},{tab:5,url:"/pages/users/user_money/index"})},fail:function(){return i.$util.Tips({title:"支付失败"})},complete:function(e){if("requestPayment:cancel"==e.errMsg)return i.$util.Tips({title:"取消支付"})}})})).catch((function(t){return e.hideLoading(),i.$util.Tips({title:t})}))},submitSub:function(t){var i=this,n=t.detail.value.number;if(i.active){if(parseFloat(n)<0||NaN==parseFloat(n)||void 0==n||""==n)return i.$util.Tips({title:"请输入金额"});e.showModal({title:"转入余额",content:"转入余额后无法再次转出,确认是否转入余额",success:function(e){if(e.confirm)(0,a.rechargeRoutine)({price:parseFloat(n),type:1}).then((function(e){return i.$util.Tips({title:"转入成功",icon:"success"},{tab:5,url:"/pages/users/user_money/index"})})).catch((function(e){return i.$util.Tips({title:e})}));else if(e.cancel)return i.$util.Tips({title:"已取消"})}})}else this.pay_close=!0,this.totalPrice=0==this.rechar_id?parseFloat(this.money):parseFloat(this.numberPic)}}});t.default=u}).call(this,i("543d")["default"])}},[["633a","common/runtime","common/vendor"]]]);
|