index.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. Page({
  2. /**
  3. * 页面的初始数据
  4. */
  5. data: {
  6. active: 0, //tabs 选中下标
  7. swiperBannerList: [{
  8. id: "001",
  9. url: "/static/banner/icon-1.jpg",
  10. src: ''
  11. }, {
  12. id: "002",
  13. url: "/static/banner/icon-2.jpg",
  14. src: ''
  15. }, {
  16. id: "003",
  17. url: "/static/banner/icon-3.png",
  18. src: ''
  19. }], //轮播图列表
  20. /* 宫格列表 */
  21. gridList: [{
  22. id: '001',
  23. text: '寻找面料',
  24. icon: '/static/login/Phone.png'
  25. }, {
  26. id: '002',
  27. text: '面料设计',
  28. icon: '/static/login/identity.png'
  29. }, {
  30. id: '003',
  31. text: '平面设计',
  32. icon: '/static/login/username.png'
  33. }, {
  34. id: '004',
  35. text: '产品策划',
  36. icon: '/static/login/verificationcode.png'
  37. }, {
  38. id: '005',
  39. text: '寻找主播',
  40. icon: '/static/login/verificationcode.png'
  41. }, {
  42. id: '006',
  43. text: '摄影摄像',
  44. icon: '/static/login/identity.png'
  45. }, {
  46. id: '007',
  47. text: '商业培训',
  48. icon: '/static/login/username.png'
  49. }],
  50. },
  51. /**
  52. * 生命周期函数--监听页面加载
  53. */
  54. onLoad: function (options) {
  55. },
  56. gridJumpPage(even) {
  57. const {
  58. name
  59. } = even.target.dataset
  60. console.log(name)
  61. },
  62. /**
  63. * 生命周期函数--监听页面初次渲染完成
  64. */
  65. onReady: function () {
  66. },
  67. /**
  68. * 生命周期函数--监听页面显示
  69. */
  70. onShow: function () {
  71. this.getTabBar().init();
  72. },
  73. /**
  74. * 生命周期函数--监听页面隐藏
  75. */
  76. onHide: function () {
  77. },
  78. /**
  79. * 生命周期函数--监听页面卸载
  80. */
  81. onUnload: function () {
  82. },
  83. /**
  84. * 页面相关事件处理函数--监听用户下拉动作
  85. */
  86. onPullDownRefresh: function () {
  87. },
  88. /**
  89. * 页面上拉触底事件的处理函数
  90. */
  91. onReachBottom: function () {
  92. },
  93. /**
  94. * 用户点击右上角分享
  95. */
  96. onShareAppMessage: function () {
  97. }
  98. })