new Vue({
	el: "#app",
	data: {
		records: [
			{time: "2017年11月11日 13:13:13",
			type: "预约挂号",
			doctor: "张三",
			zhiwu: "主任医生",
			keshi: "骨科",
			yiyuan: "上饶医院",
			id: "1",
		}, {
			time: "2017年11月11日 13:13:13",
			type: "预约挂号",
			doctor: "张三",
			zhiwu: "主任医生",
			keshi: "骨科",
			yiyuan: "上饶医院",
			id: "2",}, 
		],
		pageNo:1,
	},
	mounted: function() {
		//分页初始化
		$("#page").paging({
			pageNo: 1,
			totalPage: 50,
			totalSize: 20,
			callback: function(num) {
				//回调的页数
				alert("查询第" + num + "页");
			}
		})

		EventBus.$emit("jump-step", {
			step: 3
		}); //step:跳转的步数
		
		this.initlist(this.pageNo)
	},
	methods: {
		initlist:function(pageNo){
			var vm=this
			var oauthInfo = JSON.parse(sessionStorage.getItem("oauthInfo"));			
            var param ={
                type:'101',
                appid:httpRequest.client_id,
				toUserId:oauthInfo.id,
				page:pageNo,
				size:5
            }
			jiuzhenAPI.getRemind(param).then(function(res){
				vm.records=res
			})
		},
		cancelbtn: function(id) {
			mineJiuZhenDialogForm.cancelAppointment(id).then(function(layerid) {
				top.layer.close(layerid)
			})
		},
		satisfactionbtn: function(id) {
			mineJiuZhenDialogForm.satisfaction(id)
		},
	}
});