Browse Source

no message

seamwang 1 year ago
parent
commit
c186926472
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/pages/class/gift.vue

+ 4 - 1
src/pages/class/gift.vue

@@ -171,6 +171,7 @@ export default {
171
       serachKey: '', //关键字搜素
171
       serachKey: '', //关键字搜素
172
       keys: [], //兴趣选项
172
       keys: [], //兴趣选项
173
       days: [], //周期
173
       days: [], //周期
174
+      daysMap: { 星期一: '1', 星期二: '2', 星期三: '3', 星期四: '4', 星期五: '5' },
174
       interests: [], //兴趣
175
       interests: [], //兴趣
175
       attends: [], //课程
176
       attends: [], //课程
176
       week: [], //记录日期
177
       week: [], //记录日期
@@ -276,8 +277,10 @@ export default {
276
         if (this.attends.length > 0) {
277
         if (this.attends.length > 0) {
277
           this.attends.map((course, index) => {
278
           this.attends.map((course, index) => {
278
             const list = course.list
279
             const list = course.list
280
+            const week = course.week
281
+            const dayKey = this.daysMap[week]
279
             const item = list[0]
282
             const item = list[0]
280
-            const class_attend_id = item.status > 0 ? item.class_attend_id : null
283
+            const class_attend_id = item.status == 0 || !this.params.week.includes(dayKey) ? null : item.class_attend_id
281
             this.$set(this.checked, index, [class_attend_id])
284
             this.$set(this.checked, index, [class_attend_id])
282
             const prop = item.prop.length > 0 ? [item.prop[0].id] : []
285
             const prop = item.prop.length > 0 ? [item.prop[0].id] : []
283
             this.$set(this.checked_props, index, [{ class_attend_id: class_attend_id, prop: prop }])
286
             this.$set(this.checked_props, index, [{ class_attend_id: class_attend_id, prop: prop }])