seamwang 1 år sedan
förälder
incheckning
9ada72a4c7

+ 37 - 33
src/api/course.js

@@ -2,133 +2,137 @@ import fetch from '@/common/utils/fetch.js'
2 2
 
3 3
 // 获取课程列表
4 4
 export function _optionCourse (params) {
5
-  return fetch('/parents/Mycourses/option_course', params)
5
+	return fetch('/parents/Mycourses/option_course', params)
6 6
 }
7 7
 //智能报课获取周期
8 8
 export function _intelligentDates () {
9
-  return fetch('/parents/Intelligent/getLigentDate')
9
+	return fetch('/parents/Intelligent/getLigentDate')
10 10
 }
11 11
 //智能报课获取兴趣
12 12
 export function _intelligentInterests () {
13
-  return fetch('/parents/Intelligent/getLigentCategory')
13
+	return fetch('/parents/Intelligent/getLigentCategory')
14
+}
15
+//智能报课关键词检索
16
+export function _intelligentGetKeys (params) {
17
+	return fetch('/parents/Intelligent/getKeywords', params)
14 18
 }
15 19
 //智能报课获取课程
16 20
 export function _intelligentCourses (params) {
17
-  return fetch('/parents/Intelligent/pickLigentCourse', params)
21
+	return fetch('/parents/Intelligent/pickLigentCourse', params)
18 22
 }
19 23
 // 获取课程筛选选项 parents/Mycourses/advanced_filter
20 24
 export function _filter (params) {
21
-  return fetch('/parents/Mycourses/advanced_filter', params)
25
+	return fetch('/parents/Mycourses/advanced_filter', params)
22 26
 }
23 27
 // 课程详情 parents/Mycourses/course_details
24 28
 export function _detail (params) {
25
-  return fetch('/parents/Mycourses/course_details', params)
29
+	return fetch('/parents/Mycourses/course_details', params)
26 30
 }
27 31
 // 课程套餐详情 parents/Mycourses/course_gift
28 32
 export function _gift (params) {
29
-  return fetch('/parents/Mycourses/course_gift', params)
33
+	return fetch('/parents/Mycourses/course_gift', params)
30 34
 }
31 35
 // 课程评价 parents/Mycourses/now_details_comment
32 36
 export function _comments (params) {
33
-  return fetch('/parents/Mycourses/now_details_comment', params, 'POST', false)
37
+	return fetch('/parents/Mycourses/now_details_comment', params, 'POST', false)
34 38
 }
35 39
 // 添加购物车 parents/Commit/join_shop
36 40
 export function _joinShop (params, showFail = true) {
37
-  return fetch('/parents/Commit/join_shop', params, 'POST', showFail)
41
+	return fetch('/parents/Commit/join_shop', params, 'POST', showFail)
38 42
 }
39 43
 // 批量添加购物车
40 44
 export function _joinShops (params) {
41
-  return fetch('/parents/Commit/joinShopMulti', params)
45
+	return fetch('/parents/Commit/joinShopMulti', params)
42 46
 }
43 47
 // 购物车列表 /parents/Shopping/index
44 48
 export function _shopList (params) {
45
-  return fetch('/parents/Shopping/index', params)
49
+	return fetch('/parents/Shopping/index', params)
46 50
 }
47 51
 // 删除购物车 /parents/Shopping/del_shopping
48 52
 export function _delShop (params) {
49
-  return fetch('/parents/Shopping/del_shopping', params)
53
+	return fetch('/parents/Shopping/del_shopping', params)
50 54
 }
51 55
 // 生成订单 parents/Commit/order
52 56
 export function _createOrder (params) {
53
-  return fetch('/parents/Commit/order', params)
57
+	return fetch('/parents/Commit/order', params)
54 58
 }
55 59
 // 订单列表 parents/Ordercentre/index
56 60
 export function _orderCenter (params) {
57
-  return fetch('/parents/Ordercentre/index', params)
61
+	return fetch('/parents/Ordercentre/index', params)
58 62
 }
59 63
 // 退课数据 get_dropcourse_byorder
60 64
 export function _dropList (params) {
61
-  return fetch('/parents/dropcourse/get_dropcourse_byorder', params)
65
+	return fetch('/parents/dropcourse/get_dropcourse_byorder', params)
62 66
 }
63 67
 // 订单支付
64 68
 export function _payOrder (params) {
65
-  return fetch('/parents/pay/payment', params)
69
+	return fetch('/parents/pay/payment', params)
66 70
 }
67 71
 // 取消订单 /parents/Ordercentre/del_order
68 72
 export function _cancelOrder (params) {
69
-  return fetch('/parents/Ordercentre/del_order', params)
73
+	return fetch('/parents/Ordercentre/del_order', params)
70 74
 }
71 75
 // 进行退课 /parents/dropcourse/to_drop_course
72 76
 export function _dropCourse (params) {
73
-  return fetch('/parents/dropcourse/to_drop_course', params)
77
+	return fetch('/parents/dropcourse/to_drop_course', params)
74 78
 }
75 79
 // 历史课程 /parents/Mycourses/course_history
76 80
 export function _courseHistory (params) {
77
-  return fetch('/parents/Mycourses/course_history', params)
81
+	return fetch('/parents/Mycourses/course_history', params)
78 82
 }
79 83
 // 我的课程 /parents/Mycourses/course_history
80 84
 export function _nowCourse (params) {
81
-  return fetch('/parents/Mycourses/now_course', params)
85
+	return fetch('/parents/Mycourses/now_course', params)
82 86
 }
83 87
 // 课程表 /parents/Mycourses/date_course
84 88
 export function _dateCourse (params) {
85
-  return fetch('/parents/Mycourses/date_course', params)
89
+	return fetch('/parents/Mycourses/date_course', params)
86 90
 }
87 91
 // 考勤记录 /parents/attendance/get_attendance
88 92
 export function _attendance (params) {
89
-  return fetch('/parents/attendance/get_attendance', params)
93
+	return fetch('/parents/attendance/get_attendance', params)
90 94
 }
91 95
 // 课堂详情 /parents/dailyclass/get_dailyclass_details
92 96
 export function _dailiClass (params) {
93
-  return fetch('/parents/dailyclass/get_dailyclass_details', params)
97
+	return fetch('/parents/dailyclass/get_dailyclass_details', params)
94 98
 }
95 99
 // 安全交接情况 /parents/sign/get_sign
96 100
 export function _getSignIn (params) {
97
-  return fetch('/parents/sign/get_sign', params)
101
+	return fetch('/parents/sign/get_sign', params)
98 102
 }
99 103
 // 进行安全交接 /parents/sign/to_sign
100 104
 export function _toSignIn (params) {
101
-  return fetch('/parents/sign/to_sign', params)
105
+	return fetch('/parents/sign/to_sign', params)
102 106
 }
103 107
 // 进行评价 /parents/Todayclass/comment
104 108
 export function _tocomment (params) {
105
-  return fetch('/parents/Todayclass/comment', params)
109
+	return fetch('/parents/Todayclass/comment', params)
106 110
 }
107 111
 // 评价详情
108 112
 export function _commentDetail (params) {
109
-  return fetch('/parents/dailyclass/get_satisfaction', params)
113
+	return fetch('/parents/dailyclass/get_satisfaction', params)
110 114
 }
111 115
 // 获取请假类型
112 116
 export function _leaveType (params) {
113
-  return fetch('/teacher/leave/get_leave_type', params)
117
+	return fetch('/teacher/leave/get_leave_type', params)
114 118
 }
115 119
 // 申请请假
116 120
 export function _askLeave (params) {
117
-  return fetch('/parents/schedule/student_leave', params)
121
+	return fetch('/parents/schedule/student_leave', params)
118 122
 }
119 123
 //获取学生课程档案
120 124
 export function _getStudentFiles (params) {
121
-  return fetch('/parents/courseFiles/get_list', params)
125
+	return fetch('/parents/courseFiles/get_list', params)
122 126
 }
123 127
 //获取年级
124 128
 export function _getGrades () {
125
-  return fetch('/parents/init/get_grades')
129
+	return fetch('/parents/init/get_grades')
126 130
 }
127 131
 //获取班级
128 132
 export function _getClasses (params) {
129
-  return fetch('/parents/init/get_classes', params)
133
+	return fetch('/parents/init/get_classes', params)
130 134
 }
131 135
 //修改信息
132 136
 export function _fixStudent (params) {
133
-  return fetch('/parents/init/edit_student', params)
137
+	return fetch('/parents/init/edit_student', params)
134 138
 }

+ 1 - 1
src/components/calendar.vue

@@ -234,7 +234,7 @@ export default {
234 234
     right: 0;
235 235
     width: 0;
236 236
     height: 0;
237
-    border-color: #4db8e4 transparent;
237
+    border-color: #39b54a transparent;
238 238
     border-width: 0 0 12px 12px;
239 239
     border-style: solid;
240 240
   }

+ 72 - 37
src/pages/class/gift.vue

@@ -14,8 +14,14 @@
14 14
       <swiper @change="swipeChange" :current="cur" class="swipe">
15 15
         <swiper-item @touchmove.stop>
16 16
           <view class="btn-check-group padding">
17
-            <checkbox-group @change="checkboxChange" class="flex justify-between" style="flex-wrap: wrap;" id="week">
18
-              <label class="btn-check-label margin" :class="{ 'bg-light-green': params.week.includes(item.key + '') }" v-for="item in days" :key="item.key">
17
+            <checkbox-group @change="checkboxChange" class="flex justify-between border-bottom" style="flex-wrap: wrap;" id="week">
18
+              <label class="btn-check-label margin" :class="{ 'bg-light-green': params.week.includes(item.key + '') }" v-for="item in days.week" :key="item.key">
19
+                <checkbox :value="item.key" />
20
+                {{ item.value }}
21
+              </label>
22
+            </checkbox-group>
23
+            <checkbox-group @change="checkboxChange" class="flex justify-between" style="flex-wrap: wrap;" id="tuoguan">
24
+              <label class="btn-check-label margin" :class="{ 'bg-light-green': params.week.includes(item.key + '') }" v-for="item in days.tuoguan" :key="item.key">
19 25
                 <checkbox :value="item.key" />
20 26
                 {{ item.value }}
21 27
               </label>
@@ -27,8 +33,11 @@
27 33
         </swiper-item>
28 34
         <swiper-item @touchmove.stop>
29 35
           <view class="btn-check-group padding">
30
-            <view class="margin">
31
-              <input v-model="serachKey" placeholder="输入兴趣内容  如:画画" class="margin-top input-border" @confirm="search" />
36
+            <view class="margin-bottom">
37
+              <view class="flex align-center">
38
+                <input v-model="serachKey" placeholder="输入兴趣内容  如:画画" class="margin-top input-border" @confirm="search" />
39
+                <text class="cuIcon-search margin-left" style="font-size: 36rpx;" @tap="search"></text>
40
+              </view>
32 41
               <view class="flex margin-top-sm">
33 42
                 <view v-for="(h, i) in params.hobbyOther" :key="i" class="hobby"
34 43
                   >{{ h }}
@@ -72,11 +81,6 @@
72 81
           </view>
73 82
           <view v-else>
74 83
             <view class="VerticalBox">
75
-              <scroll-view class="VerticalNav nav" scroll-y scroll-with-animation :scroll-top="verticalNavTop" :style="'height:calc(100vh - 70px - 40px - ' + topHeader + 'px)'">
76
-                <view class="cu-item" :class="index == tabCur ? 'text-green cur' : ''" v-for="(item, index) in attends" :key="index" @tap="TabSelect" :data-id="index">
77
-                  {{ weekList[index] }}
78
-                </view>
79
-              </scroll-view>
80 84
               <scroll-view
81 85
                 class="VerticalMain padding-sm"
82 86
                 scroll-y
@@ -85,17 +89,17 @@
85 89
                 :scroll-into-view="'main-' + mainCur"
86 90
                 @scroll="VerticalMain"
87 91
               >
88
-                <radio-group @change="changeClass" style="width: 100%;" v-for="(attend, i) in attends" :key="i">
89
-                  <view class="cu-item bg-white padding margin-bottom-sm" v-for="(item, index) in attend.list" v-show="i == mainCur" :key="index" :id="'main-' + index">
92
+                <checkbox-group style="width: 100%;" v-model="checked">
93
+                  <view class="cu-item bg-white padding margin-bottom-sm" v-for="(item, i) in attends" :key="i">
90 94
                     <view class="cu-bar solid-bottom">
91 95
                       <view>
92
-                        <label>
96
+                        <label @tap="classChange(item.class_attend_id, i)">
93 97
                           <view class="flex justify-between align-center">
94 98
                             <view
95 99
                               ><text>{{ item.attend_name }}</text></view
96 100
                             >
97 101
                             <view>
98
-                              <radio :value="item.class_attend_id" :checked="checked.includes(item.class_attend_id)" class="cyan" style="transform: scale(0.7);" />
102
+                              <checkbox :value="item.class_attend_id" :checked="checked.includes(item.class_attend_id)" class="round cyan" style="transform: scale(0.7);" />
99 103
                             </view>
100 104
                           </view>
101 105
                         </label>
@@ -108,15 +112,15 @@
108 112
                             <checkbox
109 113
                               :value="prop.id"
110 114
                               class="cyan"
111
-                              :checked="checked_props[mainCur].class_attend_id === item.class_attend_id && checked_props[mainCur].prop.includes(prop.id + '')"
112 115
                               style="transform: scale(0.7);"
116
+                              :checked="checked_props[i].class_attend_id === item.class_attend_id && checked_props[i].prop.includes(prop.id)"
113 117
                             />{{ prop.name }}<text>¥{{ prop.money }}</text>
114 118
                           </view>
115 119
                         </label>
116 120
                       </checkbox-group>
117 121
                     </view>
118 122
                   </view>
119
-                </radio-group>
123
+                </checkbox-group>
120 124
               </scroll-view>
121 125
             </view>
122 126
             <view class="static shadow">
@@ -141,7 +145,7 @@
141 145
 </template>
142 146
 
143 147
 <script>
144
-import { _intelligentDates, _intelligentInterests, _intelligentCourses, _joinShops } from '@/api/course'
148
+import { _intelligentDates, _intelligentInterests, _intelligentCourses, _intelligentGetKeys, _joinShops } from '@/api/course'
145 149
 import shopCart from '@/components/shop-cart.vue'
146 150
 import { mapGetters } from 'vuex'
147 151
 export default {
@@ -168,7 +172,8 @@ export default {
168 172
       days: [], //周期
169 173
       interests: [], //兴趣
170 174
       attends: [], //课程
171
-      weekList: [], //日期
175
+      week: [], //记录日期
176
+      tuoguan: [], //记录托管
172 177
       params: {
173 178
         week: [],
174 179
         hobby: [],
@@ -211,14 +216,33 @@ export default {
211 216
     getHobbyConfig() {
212 217
       _intelligentInterests().then(res => {
213 218
         // this.interests = res.data
214
-        const choose = res.data[5]
219
+        const choose = res.data[res.data.length - 1]
215 220
         this.params.hobby = [choose.id]
216 221
         this.keys = choose.names
217 222
       })
218 223
     },
219 224
     search() {
225
+      if (!this.serachKey) {
226
+        uni.showToast({
227
+          title: '请输入关键字',
228
+          icon: 'none'
229
+        })
230
+        return false
231
+      }
220 232
       this.interests = this.keys.filter(item => item.includes(this.serachKey))
221 233
     },
234
+    check_key(key) {
235
+      const params = { week: this.params.week.join(','), student_id: this.kid, keywords: key }
236
+      _intelligentGetKeys(params).then(res => {
237
+        if (res.data.length < 1) {
238
+          uni.showToast({
239
+            title: '未找到相关课程',
240
+            icon: 'none',
241
+            duration: 2000
242
+          })
243
+        }
244
+      })
245
+    },
222 246
     get_options() {
223 247
       const params = Object.assign({}, this.params)
224 248
       params.week = params.week.join(',')
@@ -227,13 +251,14 @@ export default {
227 251
       _intelligentCourses(params).then(res => {
228 252
         this.attends = res.data
229 253
         this.checked = [] //初始化选项
230
-        Object.keys(this.attends).forEach(item => {
231
-          const class_attend_id = this.attends[item].list[0].class_attend_id
232
-          const prop = this.attends[item].list[0].prop.length > 0 ? [this.attends[item].list[0].prop[0].id + ''] : []
233
-          this.$set(this.checked, item, class_attend_id)
234
-          this.$set(this.checked_props, item, { class_attend_id: class_attend_id, prop: prop })
235
-        })
236
-        this.weekList = this.attends.map(item => item.week)
254
+        if (this.attends.length > 0) {
255
+          this.attends.map((item, index) => {
256
+            const class_attend_id = item.class_attend_id
257
+            this.$set(this.checked, index, class_attend_id)
258
+            const prop = item.prop.length > 0 ? [item.prop[0].id] : []
259
+            this.$set(this.checked_props, index, { class_attend_id: class_attend_id, prop: prop })
260
+          })
261
+        }
237 262
       })
238 263
     },
239 264
     delHobby(key) {
@@ -244,6 +269,7 @@ export default {
244 269
         this.params.hobbyOther = this.params.hobbyOther.filter(item => item != key)
245 270
       } else {
246 271
         this.params.hobbyOther.push(key)
272
+        this.check_key(key)
247 273
       }
248 274
     },
249 275
     checkboxChange(e) {
@@ -251,7 +277,12 @@ export default {
251 277
       const values = e.detail.value
252 278
       switch (type) {
253 279
         case 'week':
254
-          this.params.week = values
280
+          this.week = values
281
+          this.params.week = this.tuoguan.concat(this.week)
282
+          break
283
+        case 'tuoguan':
284
+          this.tuoguan = values
285
+          this.params.week = this.week.concat(this.tuoguan)
255 286
           break
256 287
         case 'hobby':
257 288
           this.params.hobby = values
@@ -265,7 +296,7 @@ export default {
265 296
         uni.showToast({ title: '请先选择周期', icon: 'none' })
266 297
         return false
267 298
       }
268
-      if (index === 2 && this.params.hobby.length < 1) {
299
+      if (index === 2 && this.params.hobbyOther.length < 1) {
269 300
         uni.showToast({ title: '请先选择兴趣', icon: 'none' })
270 301
         return false
271 302
       }
@@ -282,21 +313,24 @@ export default {
282 313
     changeDisableBtn() {
283 314
       this.disableBtn = true
284 315
     },
285
-    changeClass(e) {
286
-      const value = Number(e.detail.value)
287
-      this.checked[this.mainCur] = value
288
-      this.$set(this.checked, this.mainCur, value)
289
-      this.$set(this.checked_props, this.mainCur, { class_attend_id: value, prop: [] })
290
-      console.log(this.checked_props)
316
+    classChange(class_attend_id, i) {
317
+      if (this.checked.includes(class_attend_id)) {
318
+        this.$set(this.checked, i, null)
319
+        this.$set(this.checked_props, i, { class_attend_id: null, prop: [] })
320
+      } else {
321
+        this.$set(this.checked, i, class_attend_id)
322
+        this.$set(this.checked_props, i, { class_attend_id: class_attend_id, prop: [] })
323
+      }
291 324
     },
292 325
     propChange(e) {
293 326
       const parentId = e.target.dataset.id
294
-      const values = e.detail.value
295
-      if (!this.checked.includes(parentId)) {
296
-        this.$set(this.checked, this.mainCur, parentId)
327
+      const values = e.detail.value.map(item => Number(item))
328
+      if (values.length > 0 && !this.checked.includes(parentId)) {
329
+        this.$set(this.checked, this.checked.length, parentId)
297 330
       }
331
+      let index = this.checked.findIndex(e => e == parentId)
298 332
       const item = { class_attend_id: parentId, prop: values }
299
-      this.$set(this.checked_props, this.mainCur, item)
333
+      this.$set(this.checked_props, index, item)
300 334
     },
301 335
     TabSelect(e) {
302 336
       this.tabCur = e.currentTarget.dataset.id
@@ -396,6 +430,7 @@ export default {
396 430
   }
397 431
 }
398 432
 .input-border {
433
+  width: 80%;
399 434
   height: 80rpx;
400 435
   border-radius: 4px;
401 436
   border: 1px solid #eee;

+ 0 - 229
src/pages/class/gift1.vue

@@ -1,229 +0,0 @@
1
-<template>
2
-  <view>
3
-    <cu-custom :isBack="true" title="一键报课"></cu-custom>
4
-    <view class="VerticalBox">
5
-      <scroll-view class="VerticalNav nav" scroll-y scroll-with-animation :scroll-top="verticalNavTop" :style="'height:calc(100vh - 70px - ' + topHeader + 'px)'">
6
-        <view class="cu-item" :class="index == tabCur ? 'text-green cur' : ''" v-for="(item, index) in attends" :key="index" @tap="TabSelect" :data-id="index">
7
-          {{ weekList[index] }}
8
-        </view>
9
-      </scroll-view>
10
-      <scroll-view
11
-        class="VerticalMain padding-sm"
12
-        scroll-y
13
-        scroll-with-animation
14
-        :style="'height:calc(100vh - 70px - ' + topHeader + 'px)'"
15
-        :scroll-into-view="'main-' + mainCur"
16
-        @scroll="VerticalMain"
17
-      >
18
-        <radio-group @change="changeClass" style="width: 100%;" v-for="(attend, i) in attends" :key="i">
19
-          <view class="cu-item bg-white padding margin-bottom-sm" v-for="(item, index) in attend" v-show="i == mainCur" :key="index" :id="'main-' + index">
20
-            <view class="cu-bar solid-bottom">
21
-              <view>
22
-                <label>
23
-                  <view class="flex justify-between align-center">
24
-                    <view
25
-                      ><text>{{ item.attend_name }}</text></view
26
-                    >
27
-                    <view>
28
-                      <radio
29
-                        :value="item.class_attend_id"
30
-                        :disabled="!item.enable"
31
-                        :class="{ disabled: !item.enable }"
32
-                        :checked="checked.includes(item.class_attend_id)"
33
-                        class="cyan"
34
-                        style="transform: scale(0.7);"
35
-                      />
36
-                    </view>
37
-                  </view>
38
-                </label>
39
-              </view>
40
-            </view>
41
-            <view v-if="item.prop.length > 0">
42
-              <checkbox-group class="checkbox-group margin-top-xs" :data-id="item.class_attend_id" @change="propChange">
43
-                <label v-for="prop in item.prop" :key="prop.id">
44
-                  <view>
45
-                    <checkbox
46
-                      :value="prop.id"
47
-                      :disabled="!item.enable"
48
-                      :class="{ disabled: !item.enable }"
49
-                      :checked="checked_props[mainCur].class_attend_id === item.class_attend_id && checked_props[mainCur].prop.includes(prop.id + '')"
50
-                      class="cyan"
51
-                      style="transform: scale(0.7);"
52
-                    />{{ prop.name }}<text>¥{{ prop.money }}</text>
53
-                  </view>
54
-                </label>
55
-              </checkbox-group>
56
-            </view>
57
-          </view>
58
-        </radio-group>
59
-      </scroll-view>
60
-    </view>
61
-    <view class="static shadow">
62
-      <view class="static-order flex">
63
-        <shop-cart :class_attend_id="attend_id" @changeDisableBtn="changeDisableBtn"></shop-cart>
64
-        <button class="cu-btn round bg-student text-white margin-left-xs" @tap="addCart">报课</button>
65
-      </view>
66
-    </view>
67
-  </view>
68
-</template>
69
-
70
-<script>
71
-import { _gift, _joinShops } from '@/api/course'
72
-import { mapGetters } from 'vuex'
73
-import shopCart from '@/components/shop-cart.vue'
74
-export default {
75
-  components: {
76
-    shopCart
77
-  },
78
-  data() {
79
-    return {
80
-      topHeader: this.globalCustomBarHeight,
81
-      package_id: 0,
82
-      attends: [],
83
-      weekList: [],
84
-      attend_id: 0, // 添加成功课程
85
-      checked: [], // 选中
86
-      checked_props: [], // 选中工具
87
-      tabCur: 1,
88
-      mainCur: 1,
89
-      verticalNavTop: 0,
90
-      disableBtn: false // 避免多次重复点击
91
-    }
92
-  },
93
-  computed: {
94
-    ...mapGetters(['kid'])
95
-  },
96
-  onLoad(options) {
97
-    const id = decodeURIComponent(options.package_id)
98
-    this.package_id = id
99
-    this.init()
100
-  },
101
-  onShow() {
102
-    this.disableBtn = false
103
-  },
104
-  methods: {
105
-    init() {
106
-      _gift({ class_package_id: this.package_id }).then(res => {
107
-        this.attends = res.data.attends
108
-        Object.keys(this.attends).forEach(item => {
109
-          this.$set(this.checked_props, item, { prop: [] })
110
-        })
111
-        this.weekList = res.data.week_list
112
-      })
113
-    },
114
-    changeDisableBtn() {
115
-      this.disableBtn = true
116
-    },
117
-    addCart() {
118
-      if (this.disableBtn) return false
119
-      this.disableBtn = true
120
-      const _self = this
121
-      const list = this.checked_props
122
-        .filter(item => item.class_attend_id)
123
-        .map(item => {
124
-          return {
125
-            class_attend_id: item.class_attend_id,
126
-            prop: item.prop.join(','),
127
-            student_id: this.kid
128
-          }
129
-        })
130
-      if (list.length < 1) {
131
-        uni.showToast({ title: '请先选择课程', icon: 'none' })
132
-        this.disableBtn = false
133
-        return false
134
-      }
135
-      _joinShops({ list }).then(res => {
136
-        if (res.code === 1) {
137
-          _self.globalNavigateTo('classCart')
138
-        } else {
139
-          this.disableBtn = false
140
-        }
141
-      })
142
-    },
143
-    TabSelect(e) {
144
-      this.tabCur = e.currentTarget.dataset.id
145
-      this.mainCur = e.currentTarget.dataset.id
146
-      this.verticalNavTop = (e.currentTarget.dataset.id - 1) * 50
147
-    },
148
-    changeClass(e) {
149
-      const value = Number(e.detail.value)
150
-      this.checked[this.mainCur] = value
151
-      this.$set(this.checked, this.mainCur, value)
152
-      this.$set(this.checked_props, this.mainCur, { class_attend_id: value, prop: [] })
153
-    },
154
-    propChange(e) {
155
-      const parentId = e.target.dataset.id
156
-      const values = e.detail.value
157
-      if (!this.checked.includes(parentId)) {
158
-        this.$set(this.checked, this.mainCur, parentId)
159
-      }
160
-      const item = { class_attend_id: parentId, prop: values }
161
-      this.$set(this.checked_props, this.mainCur, item)
162
-    },
163
-    VerticalMain(e) {}
164
-  }
165
-}
166
-</script>
167
-
168
-<style lang="scss" scoped>
169
-::v-deep radio.disabled::before,
170
-::v-deep checkbox.disabled::before {
171
-  color: #e1e1e1 !important;
172
-}
173
-.static {
174
-  position: fixed;
175
-  left: 0;
176
-  right: 0;
177
-  bottom: 0;
178
-  display: flex;
179
-  background: #fff;
180
-  height: 70px;
181
-  align-items: center;
182
-  padding: 0 0.8rem;
183
-  justify-content: flex-end;
184
-}
185
-.fixed {
186
-  position: fixed;
187
-  z-index: 99;
188
-}
189
-.VerticalNav.nav {
190
-  width: 200upx;
191
-  white-space: initial;
192
-}
193
-
194
-.VerticalNav.nav .cu-item {
195
-  width: 100%;
196
-  text-align: center;
197
-  background-color: #fff;
198
-  margin: 0;
199
-  border: none;
200
-  height: 50px;
201
-  position: relative;
202
-}
203
-
204
-.VerticalNav.nav .cu-item.cur {
205
-  background-color: #f1f1f1;
206
-}
207
-
208
-.VerticalNav.nav .cu-item.cur::after {
209
-  content: '';
210
-  width: 8upx;
211
-  height: 30upx;
212
-  border-radius: 10upx 0 0 10upx;
213
-  position: absolute;
214
-  background-color: currentColor;
215
-  top: 0;
216
-  right: 0upx;
217
-  bottom: 0;
218
-  margin: auto;
219
-}
220
-
221
-.VerticalBox {
222
-  display: flex;
223
-}
224
-
225
-.VerticalMain {
226
-  background-color: #f1f1f1;
227
-  flex: 1;
228
-}
229
-</style>

+ 1 - 0
src/pages/index/index.vue

@@ -206,6 +206,7 @@ export default {
206 206
         }
207 207
       ],
208 208
       price: [],
209
+      page_size: 10,
209 210
       params: {
210 211
         page_num: 1,
211 212
         course_name: '',

+ 1 - 1
src/pages/studentcenter/index.vue

@@ -184,7 +184,7 @@ export default {
184 184
         normal_num: {
185 185
           title: '正常',
186 186
           times: 3,
187
-          color: '#4DB8E4'
187
+          color: '#39b54a'
188 188
         },
189 189
         absenteeism_num: {
190 190
           title: '旷课',