1 line
8.6 KiB
JavaScript
1 line
8.6 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-500cb8c9"],{5138:function(a,t,e){"use strict";e("6d6b")},"6d6b":function(a,t,e){var i=e("c940");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[a.i,i,""]]),i.locals&&(a.exports=i.locals);var o=e("499e").default;o("cc19689a",i,!0,{sourceMap:!1,shadowMode:!1})},ac0d:function(a,t,e){"use strict";e.d(t,"a",(function(){return n}));var i=document.documentElement,o=document.body,n={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var a=0;return i&&i.scrollTop?a=i.scrollTop:o&&(a=o.scrollTop),a},getClientHeight:function(){var a=0;return a=o.clientHeight&&i.clientHeight?Math.min(o.clientHeight,i.clientHeight):Math.max(o.clientHeight,i.clientHeight),a},getScrollHeight:function(){return Math.max(o.scrollHeight,i.scrollHeight)},handleScroll:function(){this.otherScroll();var a=document.documentElement.scrollTop||document.body.scrollTop;this.btnFlag=a>60,this.getScrollTop()+this.getClientHeight()+105>this.getScrollHeight()?(this.isLoadMore&&this.getMoreData(),this.isBottom=!0):this.isBottom=!1},otherScroll:function(){}}}},c940:function(a,t,e){var i=e("24fb");t=i(!1),t.push([a.i,"#page .list{border-bottom:.0625rem solid #ebebeb;background-color:#fff;padding:.625rem .875rem}#page .list li{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;line-height:1.5rem;font-size:14px}#page .list li:first-child span:last-child{color:#f15353}#page .list li:last-child{color:#8c8c8c}",""]),a.exports=t},d7e0:function(a,t,e){"use strict";e.r(t);var i=function(){var a=this,t=a.$createElement,e=a._self._c||t;return e("section",{attrs:{id:"page"}},[e("c-title",{attrs:{hide:!1,text:"查看明细"}}),e("van-tabs",{on:{click:a.handleClick},model:{value:a.active_tab,callback:function(t){a.active_tab=t},expression:"active_tab"}},[e("van-tab",{attrs:{name:"all",title:"全部"}}),e("van-tab",{attrs:{name:"income",title:a.income_name_text}}),e("van-tab",{attrs:{name:"pay",title:"支出"}})],1),e("div",[e("div",{directives:[{name:"show",rawName:"v-show",value:"all"==a.active_tab,expression:"active_tab=='all'"}]},[a.all_goload?e("van-pull-refresh",{attrs:{"success-text":"刷新成功"},on:{refresh:a.all_loadTop},model:{value:a.isLoading,callback:function(t){a.isLoading=t},expression:"isLoading"}},a._l(a.all_con,(function(t,i){return e("ul",{key:i,staticClass:"list"},[e("li",[e("span",[a._v(a._s(t.source_name))]),e("span",[a._v(a._s(t.change_value))])]),e("li",[e("span",[a._v(a._s(t.created_at))]),e("span",[a._v(a._s(t.value_type_name))])])])})),0):a._e()],1),e("div",{directives:[{name:"show",rawName:"v-show",value:"income"==a.active_tab,expression:"active_tab=='income'"}]},[a.income_goload?e("van-pull-refresh",{attrs:{"success-text":"刷新成功"},on:{refresh:a.income_loadTop},model:{value:a.isLoading,callback:function(t){a.isLoading=t},expression:"isLoading"}},a._l(a.income_con,(function(t,i){return e("ul",{key:i,staticClass:"list"},[e("li",[e("span",[a._v(a._s(t.source_name))]),e("span",[a._v(a._s(t.change_value))])]),e("li",[e("span",[a._v(a._s(t.created_at))]),e("span",[a._v(a._s(t.value_type_name))])])])})),0):a._e()],1),e("div",{directives:[{name:"show",rawName:"v-show",value:"pay"==a.active_tab,expression:"active_tab=='pay'"}]},[a.pay_goload?e("van-pull-refresh",{attrs:{"success-text":"刷新成功"},on:{refresh:a.pay_loadTop},model:{value:a.isLoading,callback:function(t){a.isLoading=t},expression:"isLoading"}},a._l(a.pay_con,(function(t,i){return e("ul",{key:i,staticClass:"list"},[e("li",[e("span",[a._v(a._s(t.source_name))]),e("span",[a._v(a._s(t.change_value))])]),e("li",[e("span",[a._v(a._s(t.created_at))]),e("span",[a._v(a._s(t.value_type_name))])])])})),0):a._e()],1)])],1)},o=[],n=(e("99af"),e("6968")),l=e("ac0d"),s=0,c=!1,r=!1,_=!1,d={mixins:[l["a"]],components:{cTitle:n["a"]},data:function(){return{all_con:[],income_con:[],pay_con:[],active_tab:"all",all_loading:!1,all_allLoaded:!1,all_goload:!0,all_isLoadMore:!0,all_page:1,all_total_page:0,income_loading:!1,income_allLoaded:!1,income_goload:!0,income_isLoadMore:!0,income_page:1,income_total_page:0,pay_loading:!1,pay_allLoaded:!1,pay_goload:!0,pay_isLoadMore:!0,pay_page:1,pay_total_page:0,income_name_text:"",isLoading:!1}},activated:function(){this.initData(),this.getData(),this.customizeIncome()},methods:{handleClick:function(a){var t=9999;switch(this.active_tab){case"all":t=0;break;case"income":t=1;break;case"pay":t=2;break;default:break}s!=t&&(s=t,this.getData())},getData:function(){0!=s||c?1!=s||r?2!=s||_||(_=!0,this.getPayData()):(r=!0,this.getIncomeData()):(c=!0,this.getAllData())},getUpData:function(){0==s?this.getAllData():1==s?this.getIncomeData():2==s&&this.getPayData()},getAllData:function(){var a=this;$http.get("plugin.froze.Frontend.Modules.Froze.Controllers.records.index",{service_type:0,page:this.all_page},"加载中").then((function(t){1==t.result&&(a.all_con=t.data.data,a.all_total_page=t.data.last_page,a.isLoading=!1)})).catch((function(a){}))},getIncomeData:function(){var a=this;$http.get("plugin.froze.Frontend.Modules.Froze.Controllers.records.index",{service_type:1,page:this.income_page},"加载中").then((function(t){1===t.result&&(a.income_con=t.data.data,a.income_total_page=t.data.last_page,a.isLoading=!1)})).catch((function(a){}))},getPayData:function(){var a=this;$http.get("plugin.froze.Frontend.Modules.Froze.Controllers.records.index",{service_type:2,page:this.pay_page},"加载中").then((function(t){1==t.result&&(a.pay_con=t.data.data,a.pay_total_page=t.data.last_page,a.isLoading=!1)})).catch((function(a){}))},getMoreData:function(){switch(s){case 0:this.getAllMoreData();break;case 1:this.getIncomeMoreData();break;case 2:this.getPayMoreData();break;default:break}},getAllMoreData:function(){var a=this;if(this.all_page!=this.all_total_page)return this.all_page>=this.all_total_page?(this.all_loading=!0,void(this.all_allLoaded=!0)):(this.all_page=this.all_page+1,void $http.get("plugin.froze.Frontend.Modules.Froze.Controllers.records.index",{service_type:s,page:this.all_page},"正在获取更多").then((function(t){if(1!=t.result)return a.all_page=a.all_page-1,a.all_loading=!0,a.all_allLoaded=!0,void(a.all_isLoadMore=!1);a.all_loading=!1,a.all_allLoaded=!1,a.all_con=a.all_con.concat(t.data.data)})).catch((function(a){})))},getIncomeMoreData:function(){var a=this;if(this.income_page!=this.income_total_page)return this.income_page>=this.income_total_page?(this.income_loading=!0,void(this.income_allLoaded=!0)):(this.income_page=this.income_page+1,void $http.get("plugin.froze.Frontend.Modules.Froze.Controllers.records.index",{service_type:s,page:this.income_page},"正在获取更多").then((function(t){if(1!==t.result)return a.income_page=a.income_page-1,a.income_loading=!0,a.income_allLoaded=!0,void(a.income_isLoadMore=!1);a.income_loading=!1,a.income_allLoaded=!1,a.income_con=a.income_con.concat(t.data.data)})).catch((function(a){})))},getPayMoreData:function(){var a=this;if(this.pay_page!=this.pay_total_page)return this.pay_page>=this.pay_total_page?(this.pay_loading=!0,void(this.pay_allLoaded=!0)):(this.pay_page=this.pay_page+1,void $http.get("plugin.froze.Frontend.Modules.Froze.Controllers.records.index",{service_type:s,page:this.all_page},"正在获取更多").then((function(t){if(1!==t.result)return a.pay_page=a.pay_page-1,a.pay_loading=!0,a.pay_allLoaded=!0,void(a.pay_isLoadMore=!1);a.pay_loading=!1,a.pay_allLoaded=!1,a.pay_con=a.pay_con.concat(t.data.data)})).catch((function(a){})))},initAllData:function(){this.all_loading=!1,this.all_allLoaded=!1,this.all_goload=!0,this.all_isLoadMore=!0,this.all_page=1,this.all_total_page=0,this.all_con=[]},initIncomeData:function(){this.income_loading=!1,this.income_allLoaded=!1,this.income_goload=!0,this.income_isLoadMore=!0,this.income_page=1,this.income_total_page=0,this.income_con=[]},initPayData:function(){this.pay_loading=!1,this.pay_allLoaded=!1,this.pay_goload=!0,this.pay_isLoadMore=!0,this.pay_page=1,this.pay_total_page=0,this.pay_con=[]},initData:function(){s=0,c=!1,r=!1,_=!1,this.initAllData(),this.initIncomeData(),this.initPayData()},all_loadTop:function(){this.initAllData(),this.getUpData()},income_loadTop:function(){this.initIncomeData(),this.getUpData(),this.$refs.income_loadmore.onTopLoaded()},pay_loadTop:function(){this.initPayData(),this.getUpData(),this.$refs.pay_loadmore.onTopLoaded()},customizeIncome:function(){var a=this.fun.initMailLanguage();this.income_name_text=a.income.income_name}}},p=d,h=p,g=(e("5138"),e("2877")),u=Object(g["a"])(h,i,o,!1,null,null,null);t["default"]=u.exports}}]); |