opinion.js 798 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. Page({
  2. /**
  3. * 页面的初始数据
  4. */
  5. data: {
  6. currentTab: 0,
  7. probType: ''
  8. },
  9. stopTouchMove: function () {
  10. return false;
  11. },
  12. switch1: function (e) {
  13. this.setData({
  14. currentTab: 1
  15. })
  16. },
  17. switch2: function (e) {
  18. this.setData({
  19. currentTab: 2
  20. })
  21. },
  22. handleTap: function (e) {
  23. this.setData({
  24. currentTab: 0,
  25. probType: e.currentTarget.dataset.type
  26. })
  27. },
  28. handleTap: function (e) {
  29. this.setData({
  30. currentTab: 0,
  31. probType: e.currentTarget.dataset.type
  32. })
  33. },
  34. /**
  35. * 生命周期函数--监听页面加载
  36. */
  37. onLoad: function (e) {
  38. },
  39. updatePage: function (e) {
  40. this.setData({
  41. currentTab: e.detail.current
  42. })
  43. }
  44. })