(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/money/account"],{"0205":function(n,t,e){"use strict";(function(n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=e("1fb9"),o={data:function(){return{type:0,payment:"",name:"",bank:"",phone:"",bank_name:"",loading:!1}},onLoad:function(n){this.type=n.type,this.getBank()},methods:{loadAli:function(n){var t=this;(0,a.aliInfo)({}).then((function(n){var e=n.data,a=t.navList[0].orderList;t.$set(a,"name",e.fullname),t.$set(a,"code",e.alino),t.$set(a,"id",e.id)}))},loadBank:function(){var n=this;(0,a.bankInfo)({}).then((function(t){var e=t.data,a=n.navList[1].orderList;n.$set(a,"name",e.fullname),n.$set(a,"code",e.bankno),n.$set(a,"bankName",e.bank),n.$set(a,"id",e.id)}))},changeTab:function(n){this.tabCurrentIndex=n.target.current},tabClick:function(n){this.tabCurrentIndex=n},confirm:function(){var t=this;if(!t.loading){if(""==t.name)return t.$api.msg("请输入姓名");if(""==t.payment){if(3==t.type)return t.$api.msg("请输入银行卡号");if(2==t.type)return t.$api.msg("请输入账号")}if(3==t.type){if(""==t.phone)return t.$api.msg("请输入手机号");if(""==t.bank)return t.$api.msg("请输入所属银行")}t.loading=!0,(0,a.setBank)({type:t.type,name:t.name,phone:t.phone,payment:t.payment,bank:t.bank}).then((function(e){t.loading=!1,n.showToast({title:"修改成功",duration:2e3,position:"top"}),console.log("修改成功"),t.$api.prePage().dataUp(),setTimeout((function(){n.navigateBack()}),1500)})).catch((function(n){t.loading=!1}))}},getBank:function(){var n=this;(0,a.getBank)().then((function(t){var e;console.log(n.type),2==n.type&&(e=t.data.zfb),3==n.type&&(console.log(t.data.bank),e=t.data.bank,console.log(e)),console.log(e),e.name&&(n.name=e.name,n.phone=e.phone,n.payment=e.payment,n.bank=e.bank,n.bank_name=e.bank_name)}))},setBankInfo:function(t){var e=this;(0,a.setBankInfo)(t).then((function(t){n.showToast({title:"修改成功",duration:2e3,position:"top"}),e.$api.prePage().dataUp(),setTimeout((function(){n.navigateBack()}),1500)})).catch((function(n){console.log(n)}))},setAliInfo:function(t){var e=this;(0,a.setAliInfo)(t).then((function(t){n.showToast({title:"修改成功",duration:2e3,position:"top"}),e.$api.prePage().dataUp(),setTimeout((function(){n.navigateBack()}),1500)})).catch((function(n){console.log(n)}))}}};t.default=o}).call(this,e("543d")["default"])},1961:function(n,t,e){"use strict";e.r(t);var a=e("dda5"),o=e("ef5e");for(var i in o)["default"].indexOf(i)<0&&function(n){e.d(t,n,(function(){return o[n]}))}(i);e("b6b2");var c=e("f0c5"),u=Object(c["a"])(o["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],void 0);t["default"]=u.exports},"8e30":function(n,t,e){},b6b2:function(n,t,e){"use strict";var a=e("8e30"),o=e.n(a);o.a},bb54:function(n,t,e){"use strict";(function(n,t){var a=e("4ea4");e("ab68");a(e("66fd"));var o=a(e("1961"));n.__webpack_require_UNI_MP_PLUGIN__=e,t(o.default)}).call(this,e("bc2e")["default"],e("543d")["createPage"])},dda5:function(n,t,e){"use strict";e.d(t,"b",(function(){return a})),e.d(t,"c",(function(){return o})),e.d(t,"a",(function(){}));var a=function(){var n=this.$createElement;this._self._c},o=[]},ef5e:function(n,t,e){"use strict";e.r(t);var a=e("0205"),o=e.n(a);for(var i in a)["default"].indexOf(i)<0&&function(n){e.d(t,n,(function(){return a[n]}))}(i);t["default"]=o.a}},[["bb54","common/runtime","common/vendor"]]]);