(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesA/pages/user-manage/user-manage"],{"67d1":function(e,t,a){"use strict";a.r(t);var n=a("eb33"),r=a("fc0e");for(var c in r)"default"!==c&&function(e){a.d(t,e,(function(){return r[e]}))}(c);a("cb6e");var s,i=a("f0c5"),o=Object(i["a"])(r["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],s);t["default"]=o.exports},"6c20":function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=c(a("a34a")),r=a("057a");function c(e){return e&&e.__esModule?e:{default:e}}function s(e,t,a,n,r,c,s){try{var i=e[c](s),o=i.value}catch(u){return void a(u)}i.done?t(o):Promise.resolve(o).then(n,r)}function i(e){return function(){var t=this,a=arguments;return new Promise((function(n,r){var c=e.apply(t,a);function i(e){s(c,n,r,i,o,"next",e)}function o(e){s(c,n,r,i,o,"throw",e)}i(void 0)}))}}var o=function(){Promise.all([a.e("common/vendor"),a.e("pagesA/components/charts/area-chart")]).then(function(){return resolve(a("d926"))}.bind(null,a)).catch(a.oe)},u={data:function(){return{userData:"",userList:"",searchName:"",params:{cycle:"all",page_index:1,page_size:5,search_name:""},chartData:{},totalPage:0}},components:{areaChart:o},onShow:function(){this.getData(),this.getList()},onReachBottom:function(){this.getMoreList()},methods:{clear:function(){this.params.search_name="",this.getData(),this.getList()},dateTab:function(e){this.params.cycle=e,this.params.page_index=1,this.getData(),this.getList()},skipUser:function(t){e.navigateTo({url:"../../../pages/complete-info/complete-info?user_id="+t})},skipOrder:function(t){e.navigateTo({url:"../../../pages/order-manage/order-manage?user_id=".concat(t.user_id,"&&nickname=").concat(t.user.nickname)})},getData:function(){var t=this;return i(n.default.mark((function a(){var c,s,i,o,u,l,f,d;return n.default.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,(0,r.getUserData)({cycle:t.params.cycle});case 2:c=a.sent;try{if(s=c.code,i=c.data,200===s){for(f in t.userData=i,o=i.line,u=[],l=[],o)l.push(o[f]),"all"!=t.params.cycle&&(d=f.indexOf("-"),f=f.substring(d+1,f.length)),u.push(f);t.chartData={categories:u,series:[{name:"数量",data:l}]}}else e.showModal({content:i||"获取数据失败",showCancel:!1})}catch(n){e.showModal({content:n||"获取数据失败",showCancel:!1})}case 4:case"end":return a.stop()}}),a)})))()},getList:function(t){var a=this;return i(n.default.mark((function c(){var s,i,o;return n.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.showLoading({title:"加载中..."}),n.next=3,(0,r.getUserList)(a.params);case 3:s=n.sent;try{i=s.code,o=s.data,200===i?(a.totalPage=Math.ceil(o.total/a.params.page_size),a.userList=t?a.userList.concat(o.list):o.list):e.showModal({content:o||"获取数据失败",showCancel:!1}),e.hideLoading()}catch(c){e.showModal({content:c||"获取数据失败",showCancel:!1}),e.hideLoading()}case 5:case"end":return n.stop()}}),c)})))()},getMoreList:function(){if(this.params.page_index>=this.totalPage)return e.showToast({title:"没有更多啦~",icon:"none"}),!1;this.params.page_index++,this.getList(!0)}}};t.default=u}).call(this,a("543d")["default"])},ba1f:function(e,t,a){"use strict";(function(e){a("fdf4");n(a("66fd"));var t=n(a("67d1"));function n(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=a,e(t.default)}).call(this,a("543d")["createPage"])},cb6e:function(e,t,a){"use strict";var n=a("cfd2"),r=a.n(n);r.a},cfd2:function(e,t,a){},eb33:function(e,t,a){"use strict";var n;a.d(t,"b",(function(){return r})),a.d(t,"c",(function(){return c})),a.d(t,"a",(function(){return n}));var r=function(){var e=this,t=e.$createElement,a=(e._self._c,e.__map(e.userList,(function(t,a){var n=e.__get_orig(t),r=t.user?e._f("getName")(t.user.nickname,10):null,c=t.account?parseInt(t.account):null;return{$orig:n,f0:r,m0:c}})));e._isMounted||(e.e0=function(t){e.params.page_index,e.getList()}),e.$mp.data=Object.assign({},{$root:{l0:a}})},c=[]},fc0e:function(e,t,a){"use strict";a.r(t);var n=a("6c20"),r=a.n(n);for(var c in n)"default"!==c&&function(e){a.d(t,e,(function(){return n[e]}))}(c);t["default"]=r.a}},[["ba1f","common/runtime","common/vendor"]]]);