regularCourse.js 917 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // components/regularCourse/regularCourse.js
  2. Component({
  3. /**
  4. * 组件的属性列表
  5. */
  6. properties: {
  7. showBot: {
  8. type: Boolean,
  9. value: true
  10. },
  11. isList: {
  12. type: Boolean,
  13. value: false
  14. },
  15. obj: Object
  16. },
  17. /**
  18. * 组件的初始数据
  19. */
  20. data: {
  21. },
  22. attached: function() {
  23. let isTitle = '常规课'
  24. if (this.properties.isList) {
  25. if (this.properties.obj.c_type == 'P01') {
  26. isTitle = '第' + this.properties.obj.c_step + '周'
  27. } else {
  28. isTitle = '第' + this.properties.obj.c_step + '月'
  29. }
  30. }
  31. this.setData({
  32. isTitle: isTitle
  33. })
  34. },
  35. /**
  36. * 组件的方法列表
  37. */
  38. methods: {
  39. lookMore() {
  40. wx.navigateTo({
  41. url: "/pages/classList/classList?s=3&n=常规课"
  42. })
  43. },
  44. goDetail(e) {
  45. console.log(e.currentTarget.dataset.id)
  46. wx.navigateTo({
  47. url: "/pages/classList/projectBox/projectBox?id=" + e.currentTarget.dataset.id
  48. })
  49. },
  50. }
  51. })