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.

92 lines
1.9 KiB

  1. // Pages/travel/plan/main/index/index.js
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. currentTab : 0,
  8. list : [{
  9. iconPath: "/asset/img/icon-main.png",
  10. selectedIconPath: "/asset/img/icon-main0.png",
  11. text: "主日程"},{
  12. iconPath: "/asset/img/icon-wish.png",
  13. selectedIconPath: "/asset/img/icon-wish0.png",
  14. text: "愿望清单"
  15. },{
  16. iconPath: "/asset/img/icon-ass.png",
  17. selectedIconPath: "/asset/img/icon-ass0.png",
  18. text: "副日程"
  19. },{
  20. iconPath: "/asset/img/icon-member.png",
  21. selectedIconPath: "/asset/img/icon-member0.png",
  22. text: "成员"
  23. }]
  24. },
  25. switchTab: function (e) {
  26. let that = this;
  27. if (this.data.currentTab === e.target.dataset.current) {
  28. return false;
  29. } else {
  30. that.setData({
  31. currentTab: e.target.dataset.current,
  32. });
  33. }
  34. },
  35. /**
  36. * 生命周期函数--监听页面加载
  37. */
  38. onLoad: function (options) {
  39. },
  40. /**
  41. * 生命周期函数--监听页面初次渲染完成
  42. */
  43. onReady: function () {
  44. },
  45. /**
  46. * 生命周期函数--监听页面显示
  47. */
  48. onShow: function () {
  49. },
  50. /**
  51. * 生命周期函数--监听页面隐藏
  52. */
  53. onHide: function () {
  54. },
  55. /**
  56. * 生命周期函数--监听页面卸载
  57. */
  58. onUnload: function () {
  59. },
  60. /**
  61. * 页面相关事件处理函数--监听用户下拉动作
  62. */
  63. onPullDownRefresh: function () {
  64. },
  65. /**
  66. * 页面上拉触底事件的处理函数
  67. */
  68. onReachBottom: function () {
  69. },
  70. /**
  71. * 用户点击右上角分享
  72. */
  73. onShareAppMessage: function () {
  74. }
  75. })