1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- //logs.js
- // const util = require('../../utils/util.js')
- const app = require('../../utils/util.js');
- Page({
- data: {
- active: 0,
- xcpArr: []
- },
- checkboxChange() {
- },
- goSeevideo(e) {
- var id = e.currentTarget.dataset.item.id
- wx.navigateTo({
- url: '/pages/dbVideo/dbVideo?id=' + id,
- })
- },
- onChange(event) {
- console.log(event)
- let _this = this;
- let tag = event.detail.name + 1;
- console.log(tag)
- wx.request({
- method: "POST",
- url: app.globalData.publicUrl + '/wx/course/listByCourseTag?tag=' + tag,
- success: (e) => {
- console.log(e, "我是tab点击回来的数据")
- _this.setData({
- xcpArr: e.data.list,
- })
- }
- })
- },
- onLoad: function (options) {
- var that = this;
- that.setData({
- active: Number(options.id)
- })
- // console.log(that.data.active)
- var _active = that.data.active + 1
- wx.request({
- method: "post",
- url: app.globalData.publicUrl + '/wx/course/listByCourseTag?tag=' + _active,
- success: (e) => {
- that.data.xcpArr = [];
- console.log(e.data.list)
- that.setData({
- xcpArr: e.data.list,
- })
- }
- })
- }
- })
|