index.js 636 B

123456789101112131415161718192021222324252627282930
  1. let app = getApp()
  2. Component({
  3. data: {
  4. state: false
  5. },
  6. lifetimes: {
  7. attached() {
  8. let state = app.globalData.activityPop
  9. if (this.data.state != state) {
  10. this.setData({
  11. state
  12. })
  13. }
  14. },
  15. },
  16. methods: {
  17. close() {
  18. getApp().globalData.activityPop = false;
  19. this.setData({
  20. state: false
  21. })
  22. },
  23. jumpDet() {
  24. this.close()
  25. wx.navigateTo({
  26. url: '/pages/activityList/index',
  27. })
  28. }
  29. }
  30. })