exhibitionList.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //logs.js
  2. // const util = require('../../utils/util.js')
  3. const app = require('../../utils/util.js');
  4. Page({
  5. data: {
  6. active: 0,
  7. xcpArr: []
  8. },
  9. checkboxChange() {
  10. },
  11. goSeevideo(e) {
  12. var id = e.currentTarget.dataset.item.id
  13. wx.navigateTo({
  14. url: '/pages/dbVideo/dbVideo?id=' + id,
  15. })
  16. },
  17. onChange(event) {
  18. console.log(event)
  19. let _this = this;
  20. let tag = event.detail.name + 1;
  21. console.log(tag)
  22. wx.request({
  23. method: "POST",
  24. url: app.globalData.publicUrl + '/wx/course/listByCourseTag?tag=' + tag,
  25. success: (e) => {
  26. console.log(e, "我是tab点击回来的数据")
  27. _this.setData({
  28. xcpArr: e.data.list,
  29. })
  30. }
  31. })
  32. },
  33. onLoad: function (options) {
  34. var that = this;
  35. that.setData({
  36. active: Number(options.id)
  37. })
  38. // console.log(that.data.active)
  39. var _active = that.data.active + 1
  40. wx.request({
  41. method: "post",
  42. url: app.globalData.publicUrl + '/wx/course/listByCourseTag?tag=' + _active,
  43. success: (e) => {
  44. that.data.xcpArr = [];
  45. console.log(e.data.list)
  46. that.setData({
  47. xcpArr: e.data.list,
  48. })
  49. }
  50. })
  51. }
  52. })