opinion.js 667 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. /**
  29. * 生命周期函数--监听页面加载
  30. */
  31. onLoad: function (e) {
  32. },
  33. updatePage: function (e) {
  34. this.setData({
  35. currentTab: e.detail.current
  36. })
  37. }
  38. })