new Vue({
  el: '#app',
  data: {
  	total:20,//总页数
  	currentPage:1,//当前页数
  	list:[],//列表集合
  	patient:null,
  	teamCode:null
  },
  methods:{
  	msgListView: function(page){
  		var vm=this;
  		if(page){
  			vm.currentPage=page;
  			var data = {
					patient:vm.patient,
					teamCode:vm.teamCode,
					page:page,
					pagesize:10
  			}
  			recordAPI.consultList(data).then(function(res){
  				if(res.status==200){ 
						if(res.data.length>0){  						
  						vm.list=res.data;
  						$(".consultation-list").animate({scrollTop:0},0);//滚回顶部
  						$(".slimScrollBar").css('top',0);
  					}else{
  						top.toastr.info("没有更多内容了");
  					}
  				}else{
  					top.toastr.error(res.msg);
  				}
  			})
  		}
  	}
  },
  mounted(){
  	this.patient = localStorage.getItem("severPatientCode");
  	this.teamCode = JSON.parse(localStorage.getItem("severPatientTeam")).id;
  	this.msgListView(this.currentPage);
  },
})