aca0bfe.js 6.6 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[30],{520:function(t,n,e){"use strict";e.d(n,"b",(function(){return c})),e.d(n,"c",(function(){return o})),e.d(n,"j",(function(){return d})),e.d(n,"a",(function(){return l})),e.d(n,"h",(function(){return w})),e.d(n,"k",(function(){return h})),e.d(n,"i",(function(){return m})),e.d(n,"f",(function(){return f})),e.d(n,"e",(function(){return _})),e.d(n,"d",(function(){return y})),e.d(n,"g",(function(){return v}));var r=e(1);function c(t){return Object(r.a)({url:"/api/memberaccount/info",data:t,forceLogin:!0})}function o(t){return Object(r.a)({url:"/api/memberaccount/page",data:t,forceLogin:!0})}function d(t){return Object(r.a)({url:"/api/memberwithdraw/info",data:t})}function l(t){return Object(r.a)({url:"/api/memberbankaccount/defaultinfo",data:t})}function w(t){return Object(r.a)({url:"/api/memberwithdraw/apply",data:t})}function h(t){return Object(r.a)({url:"/api/memberwithdraw/page",data:t})}function m(t){return Object(r.a)({url:"/api/memberwithdraw/detail",data:t})}function f(t){return Object(r.a)({url:"/memberrecharge/api/memberrecharge/page",data:t})}function _(t){return Object(r.a)({url:"/memberrecharge/api/memberrecharge/info",data:t})}function y(t){return Object(r.a)({url:"/memberrecharge/api/ordercreate/create",data:t})}function v(t){return Object(r.a)({url:"/memberrecharge/api/order/page",data:t})}},577:function(t,n,e){},665:function(t,n,e){"use strict";e(577)},762:function(t,n,e){"use strict";e.r(n);e(312),e(73);var r=e(520),c={name:"apply_withdrawal",layout:"member",components:{},data:function(){return{withdrawInfo:{config:{is_use:0,min:1,rate:0},member_info:{balance_money:0,balance_withdraw:0,balance_withdraw_apply:0}},bankAccountInfo:{},withdrawMoney:"",isSub:!1,loading:!0,yes:!0}},filters:{moneyFormat:function(t){return parseFloat(t).toFixed(2)}},created:function(){this.getWithdrawInfo(),this.getBankAccountInfo()},mounted:function(){var t=this;setTimeout((function(){t.yes=!1}),300)},methods:{getWithdrawInfo:function(){var t=this;Object(r.j)().then((function(n){n.code>=0&&n.data&&(t.withdrawInfo=n.data,0==t.withdrawInfo.config.is_use&&t.$router.push("/member")),t.loading=!1})).catch((function(n){t.loading=!1}))},getBankAccountInfo:function(){var t=this;Object(r.a)().then((function(n){n.code>=0&&n.data&&(t.bankAccountInfo=n.data)})).catch((function(t){}))},allTx:function(){this.withdrawMoney=this.withdrawInfo.member_info.balance_money},goAccount:function(){this.$router.push({path:"/member/account_list",query:{back:"/member/apply_withdrawal"}})},withdraw:function(){var t=this;if(this.bankAccountInfo.withdraw_type)return""==this.withdrawMoney||0==this.withdrawMoney||isNaN(parseFloat(this.withdrawMoney))?(this.$message({message:"请输入提现金额",type:"warning"}),!1):parseFloat(this.withdrawMoney)>parseFloat(this.withdrawInfo.member_info.balance_money)?(this.$message({message:"提现金额超出可提现金额",type:"warning"}),!1):parseFloat(this.withdrawMoney)<parseFloat(this.withdrawInfo.config.min)?(this.$message({message:"提现金额小于最低提现金额",type:"warning"}),!1):void(this.isSub||(this.isSub=!0,Object(r.h)({apply_money:this.withdrawMoney,transfer_type:this.bankAccountInfo.withdraw_type,realname:this.bankAccountInfo.realname,mobile:this.bankAccountInfo.mobile,bank_name:this.bankAccountInfo.branch_bank_name,account_number:this.bankAccountInfo.bank_account}).then((function(n){n.code>=0?t.$message({message:"提现申请成功!",type:"success",duration:2e3,onClose:function(){t.$router.push("/member/withdrawal")}}):(t.isSub=!1,t.$message({message:n.message,type:"warning"}))})).catch((function(n){t.isSub=!1,t.$message({message:n.message,type:"warning"})}))));this.$message({message:"请先添加提现方式",type:"warning"})}}},o=(e(665),e(7)),component=Object(o.a)(c,(function(){var t=this,n=t._self._c;return n("div",{staticClass:"box"},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.yes,expression:"yes"}],staticClass:"null-page"}),t._v(" "),n("el-card",{staticClass:"box-card"},[n("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[n("el-breadcrumb",{attrs:{separator:"/"}},[n("el-breadcrumb-item",{attrs:{to:{path:"/member/account"}}},[t._v("账户余额")]),t._v(" "),n("el-breadcrumb-item",[t._v("提现申请")])],1)],1),t._v(" "),n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"apply-withdrawal"},[n("div",{staticClass:"apply-wrap"},[t.bankAccountInfo.withdraw_type?n("div",{staticClass:"apply-account",on:{click:function(n){return t.goAccount()}}},[n("span",{staticClass:"ns-width"},[t._v("提现到:")]),t._v(" "),n("div",{staticClass:"apply-account-info"},["wechatpay"==t.bankAccountInfo.withdraw_type?n("span",[t._v("暂不支持微信提现,请选择支付宝")]):n("span",[t._v(t._s(t.bankAccountInfo.bank_account))]),t._v(" "),"alipay"==t.bankAccountInfo.withdraw_type?n("el-image",{attrs:{src:t.$img("public/uniapp/member/apply_withdrawal/alipay.png"),fit:"contain"}}):"bank"==t.bankAccountInfo.withdraw_type?n("el-image",{attrs:{src:t.$img("public/uniapp/member/apply_withdrawal/bank.png"),fit:"contain"}}):t._e(),t._v(" "),n("i",{staticClass:"iconfont iconarrow-right"})],1)]):n("div",{staticClass:"apply-account",on:{click:function(n){return t.goAccount()}}},[n("span",{staticClass:"ns-width"},[t._v("提现账户:")]),t._v(" "),n("div",{staticClass:"apply-account-info"},[n("span",{staticClass:"ns-text-color"},[t._v("请选择提现账户")])])]),t._v(" "),n("div",{staticClass:"apply-account-money demo-input-suffix"},[n("span",{staticClass:"ns-width"},[t._v("提现金额:")]),t._v(" "),n("el-input",{attrs:{type:"number",placeholder:"0",disabled:"wechatpay"==t.bankAccountInfo.withdraw_type},model:{value:t.withdrawMoney,callback:function(n){t.withdrawMoney=n},expression:"withdrawMoney"}},[n("template",{slot:"prepend"},[t._v("¥")])],2)],1),t._v(" "),n("div",{staticClass:"apply-account-desc"},[n("p",[n("span",{staticClass:"ns-width"}),n("span",[t._v("可提现余额为")]),n("span",{staticClass:"balance"},[t._v("¥"+t._s(t._f("moneyFormat")(t.withdrawInfo.member_info.balance_money)))]),n("span",{on:{click:t.allTx}},[t._v("全部提现")])]),t._v(" "),n("p",[n("span",{staticClass:"ns-width"}),t._v("最小提现金额为¥"+t._s(t._f("moneyFormat")(t.withdrawInfo.config.min))+",手续费为"+t._s(t.withdrawInfo.config.rate+"%"))])]),t._v(" "),n("div",{staticClass:"apply-account-btn"},[n("span",{staticClass:"ns-width"}),t._v(" "),n("el-button",{class:{disabled:""==t.withdrawMoney||0==t.withdrawMoney},attrs:{type:"primary",size:"medium",disabled:"wechatpay"==t.bankAccountInfo.withdraw_type},on:{click:t.withdraw}},[t._v("提现")])],1)])])])],1)}),[],!1,null,"56d44bf0",null);n.default=component.exports}}]);