(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["otherpages/member/account_edit/account_edit"],{"6f48":function(a,t,e){},"80e5":function(a,t,e){"use strict";(function(a){e("6b76");n(e("66fd"));var t=n(e("a4e8"));function n(a){return a&&a.__esModule?a:{default:a}}a(t.default)}).call(this,e("543d")["createPage"])},a4e8:function(a,t,e){"use strict";e.r(t);var n=e("ce53"),r=e("bd89");for(var i in r)"default"!==i&&function(a){e.d(t,a,(function(){return r[a]}))}(i);e("fa5f");var o,s=e("f0c5"),c=Object(s["a"])(r["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],o);t["default"]=c.exports},bd89:function(a,t,e){"use strict";e.r(t);var n=e("d84f"),r=e.n(n);for(var i in n)"default"!==i&&function(a){e.d(t,a,(function(){return n[a]}))}(i);t["default"]=r.a},ce53:function(a,t,e){"use strict";var n={loadingCover:function(){return e.e("components/loading-cover/loading-cover").then(e.bind(null,"cd2f"))},nsShowToast:function(){return Promise.all([e.e("common/vendor"),e.e("components/ns-show-toast/ns-show-toast")]).then(e.bind(null,"f505"))}},r=function(){var a=this,t=a.$createElement,e=(a._self._c,a.$lang("name")),n=a.$lang("mobilePhone"),r=a.$lang("accountType");a.$mp.data=Object.assign({},{$root:{m0:e,m1:n,m2:r}})},i=[];e.d(t,"b",(function(){return r})),e.d(t,"c",(function(){return i})),e.d(t,"a",(function(){return n}))},d84f:function(a,t,e){"use strict";(function(a){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(e("18e3")),r=i(e("4c22"));function i(a){return a&&a.__esModule?a:{default:a}}var o=function(){Promise.all([e.e("common/vendor"),e.e("components/ns-show-toast/ns-show-toast")]).then(function(){return resolve(e("f505"))}.bind(null,e)).catch(e.oe)},s={data:function(){return{formData:{realname:"",mobile:"",withdraw_type:"",bank_account:"",branch_bank_name:""},payList:[],index:0,flag:!1,transferType:[]}},components:{nsShowToast:o},onLoad:function(a){a.id&&(this.formData.id=a.id)},mixins:[r.default],onShow:function(){this.$langConfig.refresh(),this.getTransferType(),this.formData.id&&this.getAccountDetail(this.formData.id)},methods:{getAccountDetail:function(a){var t=this;this.$api.sendRequest({url:"/api/memberbankaccount/info",data:{id:this.formData.id},success:function(a){0==a.code&&a.data&&(t.formData.realname=a.data.realname,t.formData.mobile=a.data.mobile,t.formData.bank_account=a.data.bank_account,t.formData.branch_bank_name=a.data.branch_bank_name,t.formData.withdraw_type=a.data.withdraw_type,"bank"==t.formData.withdraw_type?t.index=2:"wechatpay"==t.formData.withdraw_type?t.index=0:"alipay"==t.formData.withdraw_type&&(t.index=1)),t.$refs.loadingCover&&t.$refs.loadingCover.hide()},fail:function(a){t.$refs.loadingCover&&t.$refs.loadingCover.hide()}})},getTransferType:function(){var a=this;this.payList=[],this.$api.sendRequest({url:"/api/memberwithdraw/transferType",success:function(t){if(t.code>=0&&t.data){for(var e in a.transferType=t.data,a.transferType)a.formData.withdraw_type||"wechatpay"!=e||(a.formData.withdraw_type=e),a.payList.push(a.transferType[e]);a.payList.reverse(),!a.formData.id&&a.$refs.loadingCover&&a.$refs.loadingCover.hide()}}})},bindPickerChange:function(a){this.index=a.detail.value;var t="";for(var e in this.transferType)this.transferType[e]==this.payList[this.index]&&(t=e);this.formData.withdraw_type=t},vertify:function(){var a=[{name:"realname",checkType:"required",errorMsg:"请输入姓名"},{name:"mobile",checkType:"required",errorMsg:"请输入手机号"},{name:"mobile",checkType:"phoneno",errorMsg:"请输入正确的手机号"}];"bank"==this.formData.withdraw_type&&a.push({name:"branch_bank_name",checkType:"required",errorMsg:"请输入银行名称"}),"wechatpay"!=this.formData.withdraw_type&&a.push({name:"bank_account",checkType:"required",errorMsg:"请输入提现账号"});var t=n.default.check(this.formData,a);return!!t||(this.$util.showToast({title:n.default.error}),this.flag=!1,!1)},saveAccount:function(){var t=this;if(!this.flag&&(this.flag=!0,this.vertify())){var e=this.formData.id?"edit":"add";this.$api.sendRequest({url:"/api/memberbankaccount/"+e,data:{id:this.formData.id,realname:this.formData.realname,mobile:this.formData.mobile,withdraw_type:this.formData.withdraw_type,bank_account:this.formData.bank_account,branch_bank_name:this.formData.branch_bank_name},success:function(e){t.formData.id?t.$util.showToast({title:"修改成功"}):t.$util.showToast({title:"添加成功"}),0==e.code?a.navigateBack({delta:1}):t.flag=!1},fail:function(a){t.flag=!1}})}}}};t.default=s}).call(this,e("543d")["default"])},fa5f:function(a,t,e){"use strict";var n=e("6f48"),r=e.n(n);r.a}},[["80e5","common/runtime","common/vendor"]]]);