// pages/appointment/appointment.js import Dialog from '../../miniprogram_npm/@vant/weapp/dialog/dialog'; Page({ /** * 页面的初始数据 */ data: { hasAddress: true, calendarcolor: '#45A6B5', timeActive: '0' }, /** * 生命周期函数--监听页面加载 */ onLoad(options) { }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady() { }, /** * 生命周期函数--监听页面显示 */ onShow() { Dialog.confirm({ title: '', confirmButtonText: '去充值', cancelButtonText: '实体卡激活', confirmButtonColor: '#333333', cancelButtonColor: '#333333', message: '您当前的检测次数为0,先充值次数', }).then(() => { // on confirm }).catch(() => { // on cancel }); }, handleTime (e) { console.log(e); var timeActiveIndex = e.currentTarget.dataset.time this.setData({ timeActive: timeActiveIndex }) } })