index.js 631 B

123456789101112131415161718192021222324252627282930313233343536
  1. let app = getApp()
  2. import {
  3. actionRecord
  4. } from '~/api/global'
  5. Component({
  6. data: {
  7. state: false
  8. },
  9. lifetimes: {
  10. attached() {
  11. let state = app.globalData.activityPop
  12. if (this.data.state != state) {
  13. this.setData({
  14. state
  15. })
  16. }
  17. },
  18. },
  19. methods: {
  20. close() {
  21. getApp().globalData.activityPop = false;
  22. this.setData({
  23. state: false
  24. })
  25. },
  26. async jumpDet() {
  27. await actionRecord({
  28. action: 'NEW_YEAR_ACTIVITY_BANNER'
  29. })
  30. this.close()
  31. wx.navigateTo({
  32. url: '/pages/activityList/index',
  33. })
  34. }
  35. }
  36. })