experienceClass.js 872 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // components/experienceClass/experienceClass.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. lookMore() {
  29. wx.navigateTo({
  30. url: "/pages/classList/classList?s=1&n=体验课"
  31. })
  32. },
  33. // 立即报名
  34. signUp(event) {
  35. let code = event.currentTarget.dataset['code']
  36. wx.navigateTo({
  37. url: "/pages/classList/practicalInfo/practicalInfo?type=tiyan&id=" + code
  38. })
  39. }
  40. }
  41. })