// pages/myAppointment/myAppointment.js Page({ /** * 页面的初始数据 */ data: { navItemActive: '0', dataList: [1,1,1,1,1,1,1,1,1], vanoverlayshow: false }, /** * 生命周期函数--监听页面加载 */ onLoad(options) { }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady() { }, /** * 生命周期函数--监听页面显示 */ onShow() { wx.showLoading({ title: '加载中...', mask: true }) setTimeout(() => { wx.hideLoading({ success: (res) => {}, }) }, 1500); }, /** * 生命周期函数--监听页面隐藏 */ onHide() { }, /** * 生命周期函数--监听页面卸载 */ onUnload() { }, handleOverlayCancel() { this.setData({ vanoverlayshow: false }) }, handleoverlayConfirm () { }, /** * 取消预约 */ handleCancel() { this.setData({ vanoverlayshow: true }) }, /** * 切换nav */ handleChangeNav(e) { var navItemActive = e.currentTarget.dataset.index this.setData({ navItemActive: navItemActive }) } })