index.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. Component({
  2. data: {
  3. selected: 0,
  4. show: true,
  5. color: "#7A7E83",
  6. selectedColor: "#00B760",
  7. list: [
  8. {
  9. "pagePath": "pages/index/resume",
  10. "text": "简历",
  11. "iconPath": "/static/img/resume.png",
  12. "selectedIconPath": "/static/img/resume-fill.png"
  13. },
  14. {
  15. "pagePath": "pages/index/position",
  16. "text": "求职",
  17. "iconPath": "/static/img/position.png",
  18. "selectedIconPath": "/static/img/position-fill.png"
  19. },
  20. {
  21. "pagePath": "pages/index/communicate",
  22. "text": "沟通",
  23. "iconPath": "/static/img/message.png",
  24. "selectedIconPath": "/static/img/message-fill.png"
  25. },
  26. {
  27. "pagePath": "pages/index/my",
  28. "text": "企业",
  29. "iconPath": "/static/img/company.png",
  30. "selectedIconPath": "/static/img/company-fill.png"
  31. }
  32. ]
  33. },
  34. lifetimes: {
  35. },
  36. created(){
  37. console.log(11111111111111111111)
  38. },
  39. methods: {
  40. switchTab(e) {
  41. console.log(e, '======================')
  42. const data = e.currentTarget.dataset
  43. const url = data.path
  44. wx.switchTab({
  45. url
  46. })
  47. this.setData({
  48. selected: data.index
  49. })
  50. }
  51. }
  52. })