Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
educationStu
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
向伟
educationStu
Commits
844a620e
Commit
844a620e
authored
Feb 09, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
86f477e1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
447 additions
and
174 deletions
+447
-174
index.vue
src/pages/appointment/index.vue
+49
-3
mySubscribe.vue
src/pages/appointment/mySubscribe.vue
+363
-160
person.vue
src/pages/person/person.vue
+32
-5
timeTable.vue
src/pages/timetable/timeTable.vue
+2
-5
date.js
src/utils/date.js
+1
-1
No files found.
src/pages/appointment/index.vue
View file @
844a620e
...
...
@@ -97,8 +97,7 @@
@
click=
"checkCourseType2(item)"
>
预约
</view>
<view
class=
"yuyueBtn"
style=
"opacity: 0.5;"
v-if=
"item[0].State==4"
@
click=
"checkCourseType2(item)"
>
<view
class=
"yuyueBtn"
style=
"opacity: 0.5;"
v-if=
"item[0].State==4"
>
已预约
</view>
</view>
...
...
@@ -173,7 +172,8 @@
onMounted
}
from
'vue'
import
{
DateFormat
DateFormat
,
getToday
}
from
'../../utils/date.js'
import
Navbar
from
'../../components/navbar.vue'
export
default
{
...
...
@@ -209,6 +209,7 @@
data
.
isShowCalendar
=
false
this
.
getDateData
(
val
.
detail
)
data
.
msg
.
Date
=
DateFormat
(
val
.
detail
)
data
.
current
=
0
this
.
getTeacherList
()
console
.
log
(
86
,
data
.
msg
.
Date
)
},
...
...
@@ -324,6 +325,29 @@
})
},
checkCourse
(
index
)
{
if
(
data
.
basics
.
AdvanceDay
==
1
){
const
lateTime
=
new
Date
(
getToday
()
+
' '
+
data
.
basics
.
ScrollETime
).
getTime
()
const
nowTime
=
new
Date
().
getTime
()
if
(
nowTime
>
lateTime
){
uni
.
showToast
({
icon
:
'none'
,
title
:
`
${
data
.
basics
.
ScrollETime
}
点后不可预约明天课程`
})
return
}
}
if
(
data
.
basics
.
AppointDate
){
const
lateDate
=
new
Date
(
data
.
basics
.
AppointDate
).
getTime
()
const
curSubDate
=
new
Date
(
data
.
msg
.
Date
).
getTime
()
console
.
log
(
curSubDate
<
lateDate
)
if
(
curSubDate
<
lateDate
){
uni
.
showToast
({
icon
:
'none'
,
title
:
`需预约
${
data
.
basics
.
AppointDate
}
之后的日期`
})
return
}
}
let
curCourse
=
data
.
courselist
[
index
]
let
RemainTime
=
data
.
basics
.
NextAppointMinutes
-
curCourse
.
Minutes
//剩余课时
const
ShiftSortArr
=
[
curCourse
]
...
...
@@ -371,6 +395,28 @@
}
},
checkCourseType2
(
item
)
{
if
(
data
.
basics
.
AdvanceDay
==
1
){
const
lateTime
=
new
Date
(
getToday
()
+
' '
+
data
.
basics
.
ScrollETime
).
getTime
()
const
nowTime
=
new
Date
().
getTime
()
if
(
nowTime
>
lateTime
){
uni
.
showToast
({
icon
:
'none'
,
title
:
`
${
data
.
basics
.
ScrollETime
}
点后不可预约明天课程`
})
return
}
}
if
(
data
.
basics
.
AppointDate
){
const
lateDate
=
new
Date
(
data
.
basics
.
AppointDate
).
getTime
()
const
curSubDate
=
new
Date
(
data
.
msg
.
Date
).
getTime
()
if
(
curSubDate
<
lateDate
){
uni
.
showToast
({
icon
:
'none'
,
title
:
`需预约
${
data
.
basics
.
AppointDate
}
之后的日期`
})
return
}
}
let
total
=
item
.
reduce
((
pre
,
cur
)
=>
{
return
cur
.
Minutes
+
pre
},
0
)
...
...
src/pages/appointment/mySubscribe.vue
View file @
844a620e
This diff is collapsed.
Click to expand it.
src/pages/person/person.vue
View file @
844a620e
...
...
@@ -45,11 +45,12 @@
</view>
<view
class=
"courseInfo"
>
<view
class=
"title"
>
课程信息
</view>
<view
style=
"display: flex;justify-content: space-between;"
>
<view
class=
"title"
>
课程信息
</view>
<view
class=
"title"
@
click=
"jumpPage(`/pages/appointment/mySubscribe`)"
>
<
!--
<
view
class=
"title"
@
click=
"jumpPage(`/pages/appointment/mySubscribe`)"
>
约课记录
</view>
</view>
-->
</view>
<view
class=
"statistic"
>
...
...
@@ -77,6 +78,11 @@
</view>
<view
class=
"statisticName"
>
请假课时
</view>
</view>
<view
class=
"statisticItem"
@
click=
"jumpPage(`/pages/appointment/mySubscribe`)"
>
<view
class=
"time"
>
{{
yuyueNum
}}
</view>
<view
class=
"statisticName"
>
约课记录
</view>
</view>
</view>
<view
class=
"courseBox"
>
<view
class=
"left"
>
...
...
@@ -176,6 +182,7 @@
pageData
:
{
AssistList
:
[]
},
yuyueNum
:
0
});
const
methods
=
{
jumpPage
(
url
)
{
...
...
@@ -193,6 +200,22 @@
phoneNumber
:
num
,
});
},
getyuyue
()
{
const
msg
=
{
pageIndex
:
1
,
pageSize
:
1
,
StartTime
:
''
,
EntTime
:
''
,
State
:
0
,
TeacherId
:
0
,
}
proxy
.
$request
(
"/AppletCenter/GetMyAppointPageList"
,
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
data
.
yuyueNum
=
res
.
Data
.
Count
}
})
},
};
let
that
=
methods
;
return
{
...
...
@@ -203,6 +226,7 @@
onShow
()
{
if
(
this
.
$isLogin
())
{
this
.
getData
();
this
.
getyuyue
()
}
}
};
...
...
@@ -300,16 +324,18 @@
.statistic
{
/* height: 70rpx; */
display
:
flex
;
justify-content
:
space-between
;
margin-bottom
:
70
rpx
;
}
.statisticItem
{
min-width
:
80
rpx
;
width
:
1
80
rpx
;
/* height: 70rpx; */
display
:
flex
;
flex-wrap
:
wrap
;
align-content
:
space-between
;
margin-right
:
100
rpx
;
/* margin-right: 100rpx; */
flex-shrink
:
1
;
}
.statisticItem
.time
{
...
...
@@ -334,6 +360,7 @@
font-weight
:
500
;
color
:
#666666
;
white-space
:
nowrap
;
text-align
:
center
;
}
.courseBox
{
...
...
src/pages/timetable/timeTable.vue
View file @
844a620e
...
...
@@ -74,11 +74,8 @@
<van-toast
id=
"van-toast"
/>
<view
class=
"btnfixed"
>
<image
@
click=
"goappointment"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/
book
.png"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/
yuyuebtn
.png"
mode=
"widthFix"
></image>
<view
style=
"font-size: 22rpx;color: #4C50E7;text-align: center;"
>
约课
</view>
</view>
</view>
</
template
>
...
...
@@ -591,7 +588,7 @@
}
.btnfixed
image
{
width
:
3
0px
;
width
:
5
0px
;
height
:
auto
;
}
</
style
>
src/utils/date.js
View file @
844a620e
...
...
@@ -72,7 +72,7 @@ export let getdate = (time, tomorrow) => {
let
d
=
year
+
"-"
+
month
+
'-'
+
day
return
d
}
export
let
DateFormat
=
(
time
,
separator
=
'-'
)
=>
{
export
let
DateFormat
=
(
time
=
null
,
separator
=
'-'
)
=>
{
let
date
=
new
Date
(
time
)
let
year
=
date
.
getFullYear
()
let
month
=
date
.
getMonth
()
<
9
?
'0'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment