webpackJsonp([42],{"5jjz":function(e,t){},OB4v:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={data:function(){return{loading:!1,finished:!1,refreshing:!1,page:1,isShow:!1,res:[],searchValue:this.$store.state.userInfo.classid,classArray:[]}},methods:{goTo:function(e){this.$router.push(e)},goBack:function(){if(this.$router.isBack=!0,window.history.length<=1)return this.$router.push({path:"/"}),!1;this.$router.go(-1)},search:function(){this.page=1,this.getFind()},getFind:function(){var e=this;this.loading=!0;var t={oid:this.$store.state.userInfo.organizeid,cid:this.searchValue,page:this.page,cn:this.searchValue};this.ajax.get(this.$store.state.api+"getClassMate",t).then(function(t){0==t.data[0].length?(e.isShow=!0,e.res=""):e.isShow=!1,e.page++,e.loading=!1,e.refreshing=!1,e.finished=!1,e.res=t.data[0],console.log(e.res)}).catch(function(t){e.loading=!1,e.refreshing=!1,console.error(t)})},onRefresh:function(){this.page=1,this.getFind()},onSearch:function(){this.page=1,this.getFind()},onLoad:function(){var e=this,t={oid:this.$store.state.userInfo.organizeid,cid:this.searchValue,page:this.page,cn:this.searchValue};this.ajax.get(this.$store.state.api+"getClassMate",t).then(function(t){e.loading=!1,e.refreshing=!1,e.res=e.res.concat(t.data[0]);var s=e.res.length?e.res[0].num:0;console.log(e.res.length),console.log(e.res[0].num),e.res.length<s?(e.page++,e.loading=!1):(e.finished=!0,e.loading=!0)}).catch(function(t){e.loading=!1,e.refreshing=!1,console.error(t)})},getClass:function(){var e=this,t={cid:this.$store.state.userInfo.organizeid};this.ajax.get(this.$store.state.api+"findClassByTeacher",t).then(function(t){e.classArray=t.data[0],console.log(e.res)}).catch(function(e){console.error(e)})}},created:function(){this.getFind(),this.getClass()}},i={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"pb_content2"},[a("div",{staticClass:"pb_head"},[a("van-icon",{staticClass:"pb_back",attrs:{name:"arrow-left",color:"#fff",size:"1.2rem"},on:{click:e.goBack}}),e._v(" "),a("span",[e._v("我的同学")])],1),e._v(" "),a("div",{staticClass:"cm_body"},[a("div",{staticStyle:{display:"flex","justify-content":"center"}},[a("el-select",{staticStyle:{margin:"10px auto",width:"90%","border-radius":"100px",overflow:"hidden"},on:{change:e.search},model:{value:e.searchValue,callback:function(t){e.searchValue=t},expression:"searchValue"}},[a("el-option",{attrs:{label:"所有班级",value:""}}),e._v(" "),e._l(e.classArray,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})],2)],1),e._v(" "),a("van-pull-refresh",{attrs:{"looing-text":"释放刷新","pulling-text":"下拉刷新"},on:{refresh:e.onRefresh},model:{value:e.refreshing,callback:function(t){e.refreshing=t},expression:"refreshing"}},[a("van-list",{attrs:{finished:e.finished,"finished-text":"没有更多啦",offset:"10","immediate-check":!1},on:{load:e.onLoad},model:{value:e.loading,callback:function(t){e.loading=t},expression:"loading"}},[e.isShow?a("van-empty",{staticClass:"custom-image",attrs:{image:s("0vHl"),description:"暂无数据",color:"#fff"}}):e._e(),e._v(" "),e._l(e.res,function(t,i){return a("div",{key:i,staticClass:"cm_person"},[a("div",{staticClass:"cm_img"},[a("img",{attrs:{src:t.smailheadportrait?t.smailheadportrait:s("eMeI")}})]),e._v(" "),a("span",[e._v(e._s(t.name))]),e._v(" "),a("div",{staticClass:"cm_arrow"},[a("van-icon",{staticClass:"pb_back",attrs:{name:"arrow",color:"#fff",size:"1.2rem"},on:{click:function(s){return e.goTo("/cmDetail?id="+t.userid)}}})],1)])})],2)],1)],1)])},staticRenderFns:[]};var n=s("VU/8")(a,i,!1,function(e){s("5jjz")},"data-v-1fbee9d8",null);t.default=n.exports}});
//# sourceMappingURL=42.bc07e385de9a0679c7f4.js.map