practicalCourse.js 888 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // components/practicalCourse/practicalCourse.js
  2. Component({
  3. /**
  4. * 组件的属性列表
  5. */
  6. properties: {
  7. showBot: { type: Boolean, value: true },
  8. isList: { type: Boolean, value: false },
  9. obj: Object
  10. },
  11. /**
  12. * 组件的初始数据
  13. */
  14. data: {
  15. },
  16. attached: function () {
  17. let isTitle = '活动课'
  18. if (this.properties.isList) {
  19. isTitle = this.properties.obj.stage
  20. }
  21. this.setData({ isTitle: isTitle })
  22. },
  23. /**
  24. * 组件的方法列表
  25. */
  26. methods: {
  27. // 立即报名
  28. signUp(event) {
  29. let code = event.currentTarget.dataset['code']
  30. wx.navigateTo({
  31. url: "/pages/classList/practicalInfo/practicalInfo?type=shijian&id=" + code
  32. })
  33. },
  34. // 查看往期---即列表页
  35. lookBack() {
  36. wx.navigateTo({
  37. url: "/pages/classList/classList?s=2&n=活动课"
  38. })
  39. }
  40. }
  41. })