(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/money/account"],{"014a":function(n,t,a){"use strict";a.r(t);var e=a("9e61"),o=a("b8fb");for(var i in o)["default"].indexOf(i)<0&&function(n){a.d(t,n,(function(){return o[n]}))}(i);a("991d");var c=a("f0c5"),u=Object(c["a"])(o["default"],e["b"],e["c"],!1,null,null,null,!1,e["a"],void 0);t["default"]=u.exports},"122e":function(n,t,a){"use strict";(function(n,t){var e=a("4ea4");a("2500");e(a("66fd"));var o=e(a("014a"));n.__webpack_require_UNI_MP_PLUGIN__=a,t(o.default)}).call(this,a("bc2e")["default"],a("543d")["createPage"])},"5fba":function(n,t,a){"use strict";(function(n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=a("3fcc"),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,e.aliInfo)({}).then((function(n){var a=n.data,e=t.navList[0].orderList;t.$set(e,"name",a.fullname),t.$set(e,"code",a.alino),t.$set(e,"id",a.id)}))},loadBank:function(){var n=this;(0,e.bankInfo)({}).then((function(t){var a=t.data,e=n.navList[1].orderList;n.$set(e,"name",a.fullname),n.$set(e,"code",a.bankno),n.$set(e,"bankName",a.bank),n.$set(e,"id",a.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,e.setBank)({type:t.type,name:t.name,phone:t.phone,payment:t.payment,bank:t.bank}).then((function(a){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,e.getBank)().then((function(t){var a;console.log(n.type),2==n.type&&(a=t.data.zfb),3==n.type&&(console.log(t.data.bank),a=t.data.bank,console.log(a)),console.log(a),a.name&&(n.name=a.name,n.phone=a.phone,n.payment=a.payment,n.bank=a.bank,n.bank_name=a.bank_name)}))},setBankInfo:function(t){var a=this;(0,e.setBankInfo)(t).then((function(t){n.showToast({title:"修改成功",duration:2e3,position:"top"}),a.$api.prePage().dataUp(),setTimeout((function(){n.navigateBack()}),1500)})).catch((function(n){console.log(n)}))},setAliInfo:function(t){var a=this;(0,e.setAliInfo)(t).then((function(t){n.showToast({title:"修改成功",duration:2e3,position:"top"}),a.$api.prePage().dataUp(),setTimeout((function(){n.navigateBack()}),1500)})).catch((function(n){console.log(n)}))}}};t.default=o}).call(this,a("543d")["default"])},"650c":function(n,t,a){},"991d":function(n,t,a){"use strict";var e=a("650c"),o=a.n(e);o.a},"9e61":function(n,t,a){"use strict";a.d(t,"b",(function(){return e})),a.d(t,"c",(function(){return o})),a.d(t,"a",(function(){}));var e=function(){var n=this.$createElement;this._self._c},o=[]},b8fb:function(n,t,a){"use strict";a.r(t);var e=a("5fba"),o=a.n(e);for(var i in e)["default"].indexOf(i)<0&&function(n){a.d(t,n,(function(){return e[n]}))}(i);t["default"]=o.a}},[["122e","common/runtime","common/vendor"]]]);