require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/users/team/account"],{4690:function(t,e,n){"use strict";n.r(e);var a=n("4979"),i=n.n(a);for(var c in a)["default"].indexOf(c)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(c);e["default"]=i.a},4979:function(t,e,n){"use strict";(function(t){var a=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=a(n("af34")),c=a(n("89cc")),o=n("92f9"),u=t.getWindowInfo().statusBarHeight,s={name:"",data:function(){return{sysHeight:u,tabActive:0,page:1,loadend:!1,hasTeamAuth:!1,moneyData:[],expend:"",income:"",disabled:!1}},mixins:[c.default],components:{NavBar:function(){n.e("components/NavBar").then(function(){return resolve(n("a7d8"))}.bind(null,n)).catch(n.oe)},tabBar:function(){n.e("pages/users/team/components/tabBar").then(function(){return resolve(n("7bec"))}.bind(null,n)).catch(n.oe)},emptyPage:function(){n.e("components/emptyPage").then(function(){return resolve(n("398a"))}.bind(null,n)).catch(n.oe)}},onLoad:function(t){this.tabActive=t.type||0,this.checkTeamAuth()},methods:{checkTeamAuth:function(){var t=this;(0,o.divisionTeamInfoApi)().then((function(e){[1,2,3].includes(Number(e.data.role_type||0))?(t.hasTeamAuth=!0,t.getRecordList()):t.noTeamAuth()}))},noTeamAuth:function(){t.showModal({title:"提示",content:"您暂无团队分销权限",showCancel:!1,success:function(){t.switchTab({url:"/pages/user/index"})}})},tabChange:function(t){this.tabActive=t,this.page=1,this.loadend=!1,this.moneyData=[],this.getRecordList()},getRecordList:function(){var t=this;(0,o.divisionTeamAccountApi)({page:this.page,limit:10,pm:0==this.tabActive?1:0}).then((function(e){t.income=e.data.income,t.expend=e.data.expend;var n=e.data,a=n.time,c=n.list,o=a.map((function(t){return{timeKey:t,list:c.filter((function(e){return e.time_key===t}))}})).filter((function(t){return t.list.length>0}));t.moneyData=1===t.page?o:[].concat((0,i.default)(t.moneyData),(0,i.default)(o)),t.loadend=c.length<10}))},extractCancel:function(t){var e=this;this.disabled||(this.disabled=!0,(0,o.extractCancelApi)(t).then((function(t){return e.disabled=!1,e.changeTime({start:0,stop:0}),e.$util.Tips({title:t.msg})})).catch((function(t){return e.$util.Tips({title:t})})))},jumpPath:function(e){t.navigateTo({url:e})}},onReachBottom:function(){this.loadend||(this.page++,this.getRecordList())}};e.default=s}).call(this,n("df3c")["default"])},"7d1e":function(t,e,n){"use strict";var a=n("9c4c"),i=n.n(a);i.a},"9c4c":function(t,e,n){},a7e2:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){}));var a=function(){var t=this.$createElement,e=(this._self._c,this.hasTeamAuth?this.moneyData.length:null);this.$mp.data=Object.assign({},{$root:{g0:e}})},i=[]},e3e6:function(t,e,n){"use strict";n.r(e);var a=n("a7e2"),i=n("4690");for(var c in i)["default"].indexOf(c)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(c);n("7d1e");var o=n("828b"),u=Object(o["a"])(i["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],void 0);e["default"]=u.exports},f4e3:function(t,e,n){"use strict";(function(t,e){var a=n("47a9");n("f076");a(n("3240"));var i=a(n("e3e6"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(i.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])}},[["f4e3","common/runtime","common/vendor"]]]);