appointment.js 1000 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // pages/appointment/appointment.js
  2. import Dialog from '../../miniprogram_npm/@vant/weapp/dialog/dialog';
  3. Page({
  4. /**
  5. * 页面的初始数据
  6. */
  7. data: {
  8. hasAddress: true,
  9. calendarcolor: '#45A6B5',
  10. timeActive: '0'
  11. },
  12. /**
  13. * 生命周期函数--监听页面加载
  14. */
  15. onLoad(options) {
  16. },
  17. /**
  18. * 生命周期函数--监听页面初次渲染完成
  19. */
  20. onReady() {
  21. },
  22. /**
  23. * 生命周期函数--监听页面显示
  24. */
  25. onShow() {
  26. Dialog.confirm({
  27. title: '',
  28. confirmButtonText: '去充值',
  29. cancelButtonText: '实体卡激活',
  30. confirmButtonColor: '#333333',
  31. cancelButtonColor: '#333333',
  32. message: '您当前的检测次数为0,先充值次数',
  33. }).then(() => {
  34. // on confirm
  35. }).catch(() => {
  36. // on cancel
  37. });
  38. },
  39. handleTime (e) {
  40. console.log(e);
  41. var timeActiveIndex = e.currentTarget.dataset.time
  42. this.setData({
  43. timeActive: timeActiveIndex
  44. })
  45. }
  46. })