index.js 1.9 KB

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