52.954d130fbc61c1ea79e5.js 4.8 KB

12
  1. webpackJsonp([52],{"5+Eg":function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var s=e("wQWh"),l=e("3KG0"),a={name:"walletBill",filters:{formatDate:function(t){t*=1e3;var i=new Date(t);return Object(l.a)(i,"yyyy-MM-dd hh:mm")}},data:function(){return{scrollTop:null,fullscreenLoading:!0,AmountChangeType:s.b,tab:0,title:"资金账户",tabsList:[{id:0,title:"资金账户"},{id:1,title:"合约账户"},{id:2,title:"交易账户"},{id:3,title:"赏金账户"},{id:4,title:"外汇账户"}],currenciesList:[],openOptionsType:0,choiceFlag:!1,choiceList:[],currencyName:"",depositOrWithdrawal:"all",depositOrWithdrawalColorWithdrawal:{color:"#f6465b"},depositOrWithdrawalColorDeposit:{color:"#1FAE87"},loading:!0,finished:!1,offset:15,page:0,page_size:100,billList:[]}},mounted:function(){var t=this,i=this.$route.query.tab?Number(this.$route.query.tab):0;this.tab=i,this.title=this.tabsList[this.tabsList.findIndex(function(t){return t.id==i})].title,window.scrollTo(0,0),this.getlist(),setTimeout(function(){t.fullscreenLoading=!1},5e3)},watch:{$route:{handler:function(t,i){var e=this,s=Number(t.query.tab);this.tab=s,this.billList=[],this.fullscreenLoading=!0,this.getlist(),setTimeout(function(){e.fullscreenLoading=!1},5e3)},deep:!0}},methods:{currency:function(){if(!this.choiceFlag)return this.openOptionsType=1,this.choiceList=this.currenciesList,void this.openHiddenBox();this.choiceClose()},type:function(){if(!this.choiceFlag){this.openOptionsType=2;return this.choiceList=[{type:"all",title:"全部"},{type:"withdrawal",title:"支出"},{type:"deposit",title:"收入"}],void this.openHiddenBox()}this.choiceClose()},openHiddenBox:function(){this.choiceFlag=!0,this.scrollTop=document.scrollingElement.scrollTop,console.log(this.scrollTop),document.body.classList.add("dialog-open"),document.body.style.top=-this.scrollTop+"px"},closeHiddenBox:function(){this.choiceFlag=!1,document.body.classList.remove("dialog-open"),document.scrollingElement.scrollTop=this.scrollTop},choiceClick:function(t){1==this.openOptionsType?this.currencyName=this.choiceList[t].title:2==this.openOptionsType&&(this.depositOrWithdrawal=this.choiceList[t].type),this.page=0,this.billList=[],this.getlist(),this.choiceClose()},choiceClose:function(){this.choiceList=[],this.openOptionsType=0,this.closeHiddenBox()},getlist:function(){var t=this;this.$nextTick(function(){var i={wallet_type:t.tab+1,deposit_or_withdrawal:t.depositOrWithdrawal,currency:t.currencyName,page_page:t.page_size,page:t.page};t.$api.wallet.getBillFlow(i).then(function(i){t.currenciesList=i.data.currencies,i.data.list.length>0&&(t.billList=t.billList.concat(i.data.list)),t.fullscreenLoading=!1,t.loading=!1,t.finished=!i.data.has_more})})},onLoad:function(){var t=this;this.finished||(this.page=this.page+1,setTimeout(function(){t.getlist()},300))}}},n={render:function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{directives:[{name:"loading",rawName:"v-loading.fullscreen.lock",value:t.fullscreenLoading,expression:"fullscreenLoading",modifiers:{fullscreen:!0,lock:!0}}],staticClass:"walletBill"},[e("p",{staticClass:"walletBill_title"},[t._v(t._s(t.$t(t.tabsList[t.tab].title))+t._s(t.$t("历史账单")))]),t._v(" "),e("div",{staticClass:"bill"},[e("van-list",{attrs:{finished:t.finished,"loading-text":t.$t("加载中"),"finished-text":t.$t("没有更多了"),offset:t.offset},on:{load:t.onLoad},model:{value:t.loading,callback:function(i){t.loading=i},expression:"loading"}},[e("div",{staticClass:"bill_header"},[e("div",{staticClass:"bill_info"},[t._v("\n "+t._s(t.$t("账单信息"))+"\n ")]),t._v(" "),e("div",{staticClass:"bill_num"},[t._v("\n "+t._s(t.$t("数量"))+"\n ")]),t._v(" "),e("div",{staticClass:"bill_type"},[t._v("\n "+t._s(t.$t("类别"))+"\n ")]),t._v(" "),e("div",{staticClass:"bill_balance"},[t._v("\n "+t._s(t.$t("余额"))+"\n ")])]),t._v(" "),t._l(t.billList,function(i,s){return e("div",{key:s,staticClass:"bill_data"},[e("div",{staticClass:"bill_info info"},[e("p",{staticClass:"info_name"},[t._v(t._s(i.currency))]),t._v(" "),e("p",{staticClass:"info_time"},[t._v(t._s(t._f("formatDate")(i.created_at)))])]),t._v(" "),e("div",{staticClass:"bill_num num"},[e("p",{staticClass:"num_n",style:"withdrawal"==i.deposit_or_withdrawal?t.depositOrWithdrawalColorWithdrawal:t.depositOrWithdrawalColorDeposit},[t._v("\n "+t._s(i.fee)+"\n ")])]),t._v(" "),e("div",{staticClass:"bill_type type"},[e("p",{staticClass:"type_type"},[t._v("\n "+t._s(t.$t(t.AmountChangeType[i.change_type]))+"\n ")])]),t._v(" "),e("div",{staticClass:"bill_balance balance"},[e("p",{staticClass:"balance_amount"},[t._v(t._s(i.balance_after))])])])})],2)],1)])},staticRenderFns:[]};var o=e("VU/8")(a,n,!1,function(t){e("XWXQ")},"data-v-0f778da6",null);i.default=o.exports},XWXQ:function(t,i){}});
  2. //# sourceMappingURL=52.954d130fbc61c1ea79e5.js.map