1 line
9.2 KiB
JavaScript
1 line
9.2 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["bundle-pages-bank_add-bank_add"],{"0f93":function(t,e,n){"use strict";n.r(e);var i=n("6a63"),a=n.n(i);for(var r in i)"default"!==r&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e["default"]=a.a},1666:function(t,e,n){var i=n("24fb");e=i(!1),e.push([t.i,"@charset \"UTF-8\";\n/* 颜色变量 */\n/** S Font's size **/\n/** E Font's size **/[data-v-441c16e0]:export{red_theme:#ff2c3c;orange_theme:#f7971e;pink_theme:#fa444d;gold_theme:#e0a356;blue_theme:#2f80ed;green_theme:#2ec840}.add-bank[data-v-441c16e0]{padding:0 %?30?%}.add-bank uni-input[data-v-441c16e0]{flex:1;margin:%?30?% 0;text-align:right}.btn[data-v-441c16e0]{width:%?690?%;height:%?88?%;margin:0 %?30?%;margin-top:%?40?%;box-sizing:border-box;background-color:#40affa}",""]),t.exports=e},"2f27":function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return i}));var i={uToast:n("af9c").default},a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",[n("v-uni-view",{staticClass:"add-bank bg-white"},[n("v-uni-view",{staticClass:"black md flex row-between"},[n("v-uni-view",[t._v("提现银行:")]),n("v-uni-input",{attrs:{type:"text",placeholder:"请填写银行名称,如中国银行"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),n("v-uni-view",{staticClass:"black md flex row-between"},[n("v-uni-view",[t._v("银行支行:")]),n("v-uni-input",{attrs:{type:"text",placeholder:"请填写银行支行,如北京路支行"},model:{value:t.form.branch,callback:function(e){t.$set(t.form,"branch",e)},expression:"form.branch"}})],1),n("v-uni-view",{staticClass:"black md flex row-between"},[n("v-uni-view",[t._v("开户姓名:")]),n("v-uni-input",{attrs:{type:"text",placeholder:"请填写开户人姓名,如张三"},model:{value:t.form.nickname,callback:function(e){t.$set(t.form,"nickname",e)},expression:"form.nickname"}})],1),n("v-uni-view",{staticClass:"black md flex row-between"},[n("v-uni-view",[t._v("银行账号:")]),n("v-uni-input",{attrs:{type:"text",placeholder:"请填写银行卡账号"},model:{value:t.form.account,callback:function(e){t.$set(t.form,"account",e)},expression:"form.account"}})],1)],1),1==t.type?[n("v-uni-view",{staticClass:"btn flex row-center br60 md white",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.addBankFunc.apply(void 0,arguments)}}},[t._v("确认添加")])]:t._e(),2==t.type?[n("v-uni-view",{staticClass:"btn flex row-center br60 md white",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.editBankFunc.apply(void 0,arguments)}}},[t._v("确认编辑")])]:t._e(),n("u-toast",{ref:"uToast"})],2)},r=[]},"47b9":function(t,e,n){"use strict";var i=n("7109"),a=n.n(i);a.a},"57bd":function(t,e,n){"use strict";n.r(e);var i=n("fa0f"),a=n.n(i);for(var r in i)"default"!==r&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e["default"]=a.a},"6a63":function(t,e,n){"use strict";n("c975"),n("a9e3"),n("b64b"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={name:"u-toast",props:{zIndex:{type:[Number,String],default:""}},data:function(){return{isShow:!1,timer:null,config:{params:{},title:"",type:"",duration:2e3,isTab:!1,url:"",icon:!0,position:"center",callback:null,back:!1},tmpConfig:{}}},computed:{iconName:function(){if(["error","warning","success","info"].indexOf(this.tmpConfig.type)>=0&&this.tmpConfig.icon){var t=this.$u.type2icon(this.tmpConfig.type);return t}},uZIndex:function(){return this.isShow?this.zIndex?this.zIndex:this.$u.zIndex.toast:"999999"}},methods:{show:function(t){var e=this;this.tmpConfig=this.$u.deepMerge(this.config,t),this.timer&&(clearTimeout(this.timer),this.timer=null),this.isShow=!0,this.timer=setTimeout((function(){e.isShow=!1,clearTimeout(e.timer),e.timer=null,"function"===typeof e.tmpConfig.callback&&e.tmpConfig.callback(),e.timeEnd()}),this.tmpConfig.duration)},hide:function(){this.isShow=!1,this.timer&&(clearTimeout(this.timer),this.timer=null)},timeEnd:function(){if(this.tmpConfig.url){if("/"!=this.tmpConfig.url[0]&&(this.tmpConfig.url="/"+this.tmpConfig.url),Object.keys(this.tmpConfig.params).length){var t="";/.*\/.*\?.*=.*/.test(this.tmpConfig.url)?(t=this.$u.queryParams(this.tmpConfig.params,!1),this.tmpConfig.url=this.tmpConfig.url+"&"+t):(t=this.$u.queryParams(this.tmpConfig.params),this.tmpConfig.url+=t)}this.tmpConfig.isTab?uni.switchTab({url:this.tmpConfig.url}):uni.navigateTo({url:this.tmpConfig.url})}else this.tmpConfig.back&&this.$u.route({type:"back"})}}};e.default=i},"70ee":function(t,e,n){"use strict";var i=n("f9c8"),a=n.n(i);a.a},7109:function(t,e,n){var i=n("1666");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("4f06").default;a("4e25e73e",i,!0,{sourceMap:!1,shadowMode:!1})},"817f":function(t,e,n){var i=n("24fb");e=i(!1),e.push([t.i,"@charset \"UTF-8\";\n/* 颜色变量 */\n/** S Font's size **/\n/** E Font's size **/[data-v-52764960]:export{red_theme:#ff2c3c;orange_theme:#f7971e;pink_theme:#fa444d;gold_theme:#e0a356;blue_theme:#2f80ed;green_theme:#2ec840}.u-toast[data-v-52764960]{position:fixed;z-index:-1;transition:opacity .3s;text-align:center;color:#fff;border-radius:%?8?%;background:#585858;display:flex;flex-direction:row;align-items:center;justify-content:center;font-size:%?28?%;opacity:0;pointer-events:none;padding:%?18?% %?40?%}.u-toast.u-show[data-v-52764960]{opacity:1}.u-icon[data-v-52764960]{margin-right:%?10?%;display:flex;flex-direction:row;align-items:center;line-height:normal}.u-position-center[data-v-52764960]{left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);max-width:70%}.u-position-top[data-v-52764960]{left:50%;top:20%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.u-position-bottom[data-v-52764960]{left:50%;bottom:20%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.u-type-primary[data-v-52764960]{color:#2979ff;background-color:#ecf5ff;border:1px solid #d7eafe}.u-type-success[data-v-52764960]{color:#19be6b;background-color:#dbf1e1;border:1px solid #bef5c8}.u-type-error[data-v-52764960]{color:#fa3534;background-color:#fef0f0;border:1px solid #fde2e2}.u-type-warning[data-v-52764960]{color:#f90;background-color:#fdf6ec;border:1px solid #faecd8}.u-type-info[data-v-52764960]{color:#909399;background-color:#f4f4f5;border:1px solid #ebeef5}.u-type-default[data-v-52764960]{color:#fff;background-color:#585858}",""]),t.exports=e},"8b94":function(t,e,n){"use strict";n.r(e);var i=n("2f27"),a=n("57bd");for(var r in a)"default"!==r&&function(t){n.d(e,t,(function(){return a[t]}))}(r);n("47b9");var o,s=n("f0c5"),u=Object(s["a"])(a["default"],i["b"],i["c"],!1,null,"441c16e0",null,!1,i["a"],o);e["default"]=u.exports},"9def":function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return i}));var i={uIcon:n("031d").default},a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"u-toast",class:[t.isShow?"u-show":"","u-type-"+t.tmpConfig.type,"u-position-"+t.tmpConfig.position],style:{zIndex:t.uZIndex}},[n("v-uni-view",{staticClass:"u-icon-wrap"},[t.tmpConfig.icon?n("u-icon",{staticClass:"u-icon",attrs:{name:t.iconName,size:30,color:t.tmpConfig.type}}):t._e()],1),n("v-uni-text",{staticClass:"u-text"},[t._v(t._s(t.tmpConfig.title))])],1)},r=[]},af9c:function(t,e,n){"use strict";n.r(e);var i=n("9def"),a=n("0f93");for(var r in a)"default"!==r&&function(t){n.d(e,t,(function(){return a[t]}))}(r);n("70ee");var o,s=n("f0c5"),u=Object(s["a"])(a["default"],i["b"],i["c"],!1,null,"52764960",null,!1,i["a"],o);e["default"]=u.exports},f9c8:function(t,e,n){var i=n("817f");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("4f06").default;a("4f897604",i,!0,{sourceMap:!1,shadowMode:!1})},fa0f:function(t,e,n){"use strict";var i=n("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n("5530"));n("96cf");var r=i(n("1da1")),o=n("51e5"),s={data:function(){return{type:1,form:{name:"",branch:"",account:"",nickname:""}}},onLoad:function(){try{var t=this.$Route.query.id;t&&(this.getBankFunc(t),this.type=2)}catch(e){console.log(e)}},methods:{addBankFunc:function(){var t=this;return(0,r.default)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,(0,o.apiAddBank)((0,a.default)({},t.form));case 2:e.sent,t.$refs.uToast.show({title:"添加成功",type:"success"}),setTimeout((function(){uni.navigateBack()}),1e3);case 5:case"end":return e.stop()}}),e)})))()},editBankFunc:function(){var t=this;return(0,r.default)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,(0,o.apiEditBank)((0,a.default)({},t.form));case 2:e.sent,t.$refs.uToast.show({title:"修改成功",type:"success"}),setTimeout((function(){uni.navigateBack()}),1e3);case 5:case"end":return e.stop()}}),e)})))()},getBankFunc:function(t){var e=this;return(0,r.default)(regeneratorRuntime.mark((function n(){var i,a;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,(0,o.apigetBankDetail)({id:t});case 2:for(a in i=n.sent,i)console.log(i[a]),e.$set(e.form,a,i[a]);case 4:case"end":return n.stop()}}),n)})))()}}};e.default=s}}]); |