1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- // pages/Components/lessonsList/lessonsList.js
- Component({
- lifetimes: {
- attached: function () {
- // 在组件实例进入页面节点树时执行
- },
- detached: function () {
- // 在组件实例被从页面节点树移除时执行
- },
- },
- /**
- * 组件的属性列表
- */
- properties: {
- list: {
- type: Array,
- value: []
- },
- showBtn: {
- type: Boolean,
- value: true,
- },
- showDate: {
- type: Boolean,
- value: true,
- },
- action: {
- type: String,
- value: '0'
- }
- },
- /**
- * 组件的初始数据
- */
- data: {
- },
- /**
- * 组件的方法列表
- */
- methods: {
- toPages: function (e) {
- let item = this.properties.list.filter(o => o.attenceStudentId == e.currentTarget.dataset.id)[0]
- let action = e.currentTarget.dataset.action
- if (action == 1) {
- item.classRoomId = ''// 补课不指定教室
- item.curDate = item.beginTime.substring(0, 10)
- }
- wx.navigateTo({
- url: e.currentTarget.dataset.url + '?data=' + JSON.stringify({ source: item, action: (action ? action : 0), dayScope: 14 }),
- })
- },
- }
- })
|