Commit 9755ce78 authored by Mac's avatar Mac

1

parent 3e602c91
......@@ -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)
}
);
},
......
......@@ -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: 6px;
right: 2px;
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment