|
@@ -9,11 +9,9 @@ import {
|
|
|
CellGroup,
|
|
|
Dialog,
|
|
|
Stepper,
|
|
|
- Sticky,
|
|
|
Tag,
|
|
|
Popup,
|
|
|
- Toast,
|
|
|
- Icon
|
|
|
+ Toast
|
|
|
} from 'vant'
|
|
|
import { defineComponent } from 'vue'
|
|
|
import { getWeekCh } from '@/helpers/utils'
|
|
@@ -21,7 +19,7 @@ import styles from './practice.module.less'
|
|
|
import { orderStatus } from '@/views/order-detail/orderStatus'
|
|
|
import ColResult from '@/components/col-result'
|
|
|
import { tradeOrder } from '@/student/trade/tradeOrder'
|
|
|
-import icon3 from '../images/icon3.png'
|
|
|
+// import icon3 from '../images/icon3.png'
|
|
|
import Tips from './tips'
|
|
|
import { useStatisticTracking } from '@/helpers/hooks'
|
|
|
|
|
@@ -30,7 +28,7 @@ export default defineComponent({
|
|
|
props: {
|
|
|
userInfo: {
|
|
|
type: Object,
|
|
|
- default: {}
|
|
|
+ default: () => ({})
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
@@ -129,7 +127,7 @@ export default defineComponent({
|
|
|
computed: {
|
|
|
showSelectList() {
|
|
|
const arr: any = this.selectCourseList
|
|
|
- let list = [...arr]
|
|
|
+ const list = [...arr]
|
|
|
list.forEach((item: any) => {
|
|
|
item.title =
|
|
|
dayjs(item.startTime).format('YYYY-MM-DD') +
|
|
@@ -166,12 +164,12 @@ export default defineComponent({
|
|
|
async getList(date?: Date) {
|
|
|
try {
|
|
|
const tempDate = date || dayjs().add(1, 'day').toDate()
|
|
|
- let params = {
|
|
|
+ const params = {
|
|
|
day: dayjs(tempDate).format('DD'),
|
|
|
month: dayjs(tempDate).format('MM'),
|
|
|
year: dayjs(tempDate).format('YYYY')
|
|
|
}
|
|
|
- let res = await request.post(
|
|
|
+ const res = await request.post(
|
|
|
'/api-student/courseSchedule/createPracticeCourseCalendar',
|
|
|
{
|
|
|
data: {
|
|
@@ -183,17 +181,19 @@ export default defineComponent({
|
|
|
}
|
|
|
)
|
|
|
const result = res.data || []
|
|
|
- let tempObj = {}
|
|
|
+ const tempObj = {}
|
|
|
result.forEach((item: any) => {
|
|
|
tempObj[item.date] = item
|
|
|
})
|
|
|
this.calendarList = tempObj
|
|
|
this.calendarStatus = result.length > 0
|
|
|
- } catch {}
|
|
|
+ } catch {
|
|
|
+ //
|
|
|
+ }
|
|
|
},
|
|
|
onSelectDay(obj: any) {
|
|
|
const result = obj || []
|
|
|
- let list = [...this.selectCourseList] as any
|
|
|
+ const list = [...this.selectCourseList] as any
|
|
|
|
|
|
result.forEach((item: any) => {
|
|
|
const isExist = list.some(
|
|
@@ -202,7 +202,7 @@ export default defineComponent({
|
|
|
!isExist && list.push({ ...item })
|
|
|
})
|
|
|
// 去掉不在
|
|
|
- let tempList: any[] = []
|
|
|
+ const tempList: any[] = []
|
|
|
list.forEach((item: any) => {
|
|
|
const isExist = result.some(
|
|
|
(course: any) => course.startTime === item.startTime
|
|
@@ -232,7 +232,7 @@ export default defineComponent({
|
|
|
},
|
|
|
async _lookCourse(callBack?: Function) {
|
|
|
try {
|
|
|
- let times = [] as any
|
|
|
+ const times = [] as any
|
|
|
this.selectCourseList.forEach((item: any) => {
|
|
|
times.push({
|
|
|
startTime: item.startTime,
|