exhibitionList.js 956 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. const app = require('../../utils/util.js');
  2. Page({
  3. data: {
  4. active: 0,
  5. xcpArr: [],
  6. vType:["理论阵地","我的学院","特色课程","特色管理"]
  7. },
  8. goSeevideo(e) {
  9. let id = e.currentTarget.dataset.item.id
  10. wx.navigateTo({
  11. url: '/pages/dbVideo/dbVideo?id=' + id,
  12. })
  13. },
  14. onChange(event) {
  15. let tag = event.detail.name + 1;
  16. wx.request({
  17. method: "POST",
  18. url: app.globalData.publicUrl + '/wx/course/listByCourseTag?tag=' + tag,
  19. success: (e) => {
  20. this.setData({
  21. xcpArr: e.data.list,
  22. })
  23. }
  24. })
  25. },
  26. onLoad: function (options) {
  27. this.setData({
  28. active: Number(options.id)
  29. })
  30. let _active = this.data.active + 1
  31. wx.request({
  32. method: "post",
  33. url: app.globalData.publicUrl + '/wx/course/listByCourseTag?tag=' + _active,
  34. success: (e) => {
  35. this.setData({
  36. xcpArr: e.data.list,
  37. })
  38. }
  39. })
  40. }
  41. })