Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
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
viitto
mallapp
Commits
9755ce78
Commit
9755ce78
authored
Feb 04, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
3e602c91
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
12 deletions
+53
-12
appointment.vue
pages/appointment/appointment.vue
+51
-10
zzx-calendar.vue
pages/appointment/components/zzx-calendar/zzx-calendar.vue
+2
-2
No files found.
pages/appointment/appointment.vue
View file @
9755ce78
...
...
@@ -118,7 +118,7 @@
<
template
>
<view
class=
"appointment"
>
<view
class=
"appointment-box"
>
<zzx-calendar
ref=
'zzx'
@
selected-change=
"datechange"
@
getweekMode =
'getweekMode'
@
days-change=
'dayschage'
></zzx-calendar>
<zzx-calendar
ref=
'zzx'
:dotList=
'dotList'
@
selected-change=
"datechange"
@
getweekMode =
'getweekMode'
@
days-change=
'dayschage'
></zzx-calendar>
</view>
<view
style=
"position:relative;"
>
...
...
@@ -249,7 +249,9 @@ import tabbars from '@/components/tabbar/index';
TeacherId
:
0
,
},
showteacher
:
0
,
//0为约课 1位老师进去查看自己的约课情况
totalData
:[],
fullDate
:
''
,
dotList
:[],
}
},
onLoad
(
options
)
{
...
...
@@ -267,8 +269,9 @@ import tabbars from '@/components/tabbar/index';
this
.
showteacher
=
options
.
teacher
;
this
.
list
=
[{
name
:
'综合排序'
},
{
name
:
'课程'
}]
}
this
.
msg
.
SelectStartTime
=
formatDate
(
new
Date
(),
'yyyy-MM-dd'
),
this
.
msg
.
SelectEndTime
=
formatDate
(
new
Date
(),
'yyyy-MM-dd'
),
// this.msg.SelectStartTime = formatDate(new Date(), 'yyyy-MM-dd'),
// this.msg.SelectEndTime = formatDate(new Date(), 'yyyy-MM-dd'),
this
.
fullDate
=
formatDate
(
new
Date
(),
'yyyy-MM-dd'
)
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
...
...
@@ -287,7 +290,7 @@ import tabbars from '@/components/tabbar/index';
}
this
.
getPointCourseClassList
()
this
.
getTeacherList
()
this
.
init
()
}
},
created
()
{
...
...
@@ -297,10 +300,16 @@ import tabbars from '@/components/tabbar/index';
methods
:{
datechange
(
e
){
console
.
log
(
e
)
this
.
msg
.
SelectStartTime
=
e
.
fullDate
;
this
.
msg
.
SelectEndTime
=
e
.
fullDate
;
this
.
init
()
this
.
fullDate
=
e
.
fullDate
// this.msg.SelectStartTime = e.fullDate;
// this.msg.SelectEndTime = e.fullDate;
// this.init()
this
.
totalData
.
forEach
(
x
=>
{
let
time
=
x
.
DateYear
+
'-'
+
x
.
DateMonth
+
'-'
+
x
.
DateDay
if
(
this
.
fullDate
==
time
){
this
.
subscribeList
=
x
.
PlanList
}
})
},
getweekMode
(
e
){
...
...
@@ -396,14 +405,46 @@ import tabbars from '@/components/tabbar/index';
dayschage
(
obj
){
let
start
=
formatDate
(
new
Date
(
obj
.
start
),
'yyyy-MM-dd'
)
let
end
=
formatDate
(
new
Date
(
obj
.
end
),
'yyyy-MM-dd'
)
this
.
msg
.
SelectStartTime
=
start
this
.
msg
.
SelectEndTime
=
end
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
};
this
.
showAuth
=
true
;
}
else
{
if
(
this
.
showteacher
==
1
){
this
.
msg
.
TeacherId
=
this
.
u
.
UserTeacher
}
this
.
init
()
}
},
init
(){
this
.
request2
({
url
:
'/api/AppletPoint/GetTeacherCourseList'
,
data
:
this
.
msg
},
res
=>
{
this
.
subscribeList
=
res
.
data
[
0
].
PlanList
// this.subscribeList = res.data[0].PlanList
this
.
totalData
=
res
.
data
this
.
dotList
=
[]
this
.
totalData
.
forEach
(
x
=>
{
let
time
=
x
.
DateYear
+
'-'
+
x
.
DateMonth
+
'-'
+
x
.
DateDay
if
(
this
.
fullDate
==
time
){
this
.
subscribeList
=
x
.
PlanList
}
if
(
x
.
haveCourseCount
>
0
){
let
obj
=
{
date
:
time
}
this
.
dotList
.
push
(
obj
)
}
})
console
.
log
(
this
.
dotList
)
}
);
},
...
...
pages/appointment/components/zzx-calendar/zzx-calendar.vue
View file @
9755ce78
...
...
@@ -125,6 +125,7 @@
},
watch
:{
dotList
:
function
(
newvalue
){
console
.
log
(
newvalue
,
'newvalue'
)
const
days
=
this
.
days
.
slice
(
0
);
newvalue
.
forEach
(
item
=>
{
const
index
=
days
.
findIndex
(
ditem
=>
ditem
.
fullDate
===
item
.
date
);
...
...
@@ -296,7 +297,6 @@
}
},
changeMode
()
{
console
.
log
(
2
)
const
premode
=
this
.
weekMode
;
let
isweek
=
false
;
if
(
premode
)
{
...
...
@@ -463,7 +463,7 @@
// border-radius: 10upx;
position
:
absolute
;
top
:
1px
;
right
:
6
px
;
right
:
2
px
;
}
}
</
style
>
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