排队支付小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

126 lines
2.0 KiB

  1. // pages/pregnant-mother/pregnant-mother.js
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. background: ['demo-text-1', 'demo-text-2', 'demo-text-3'],
  8. indicatorDots: true,
  9. vertical: false,
  10. autoplay: true,
  11. interval: 2000,
  12. duration: 500,
  13. nvabarData: {
  14. title: '', //导航栏 中间的标题
  15. keyWord: '',
  16. search: true
  17. },
  18. height: ''
  19. },
  20. changeIndicatorDots() {
  21. this.setData({
  22. indicatorDots: !this.data.indicatorDots
  23. })
  24. },
  25. changeAutoplay() {
  26. this.setData({
  27. autoplay: !this.data.autoplay
  28. })
  29. },
  30. intervalChange(e) {
  31. this.setData({
  32. interval: e.detail.value
  33. })
  34. },
  35. durationChange(e) {
  36. this.setData({
  37. duration: e.detail.value
  38. })
  39. },
  40. /**
  41. * 生命周期函数--监听页面加载
  42. */
  43. onLoad(options) {
  44. },
  45. /**
  46. * 生命周期函数--监听页面初次渲染完成
  47. */
  48. onReady() {
  49. },
  50. /**
  51. * 生命周期函数--监听页面显示
  52. */
  53. onShow() {
  54. // 清除搜索框 调用子组件的清空函数
  55. this.selectComponent('#bar').clearInput();
  56. // 每个机型的尺寸不一致
  57. // 在app.js中获取到的 statusBarHeight 用于控制头部的高度
  58. this.setData({
  59. // height: app.globalData.height,
  60. })
  61. this.setData({
  62. 'nvabarData.inputValue': ''
  63. })
  64. if (typeof this.getTabBar === 'function' &&
  65. this.getTabBar()) {
  66. this.getTabBar().setData({
  67. selected: 1
  68. })
  69. }
  70. },
  71. search: function(e) {
  72. this.getTask(e.detail);
  73. },
  74. /**
  75. * 生命周期函数--监听页面隐藏
  76. */
  77. onHide() {
  78. },
  79. /**
  80. * 生命周期函数--监听页面卸载
  81. */
  82. onUnload() {
  83. },
  84. /**
  85. * 页面相关事件处理函数--监听用户下拉动作
  86. */
  87. onPullDownRefresh() {
  88. },
  89. /**
  90. * 页面上拉触底事件的处理函数
  91. */
  92. onReachBottom() {
  93. },
  94. /**
  95. * 用户点击右上角分享
  96. */
  97. onShareAppMessage() {
  98. }
  99. })