wkyy 2 years ago
parent
commit
7d6bb6c9bd

+ 10 - 1
apis/parents/homePage.js

@@ -1,2 +1,11 @@
 import requestStudent from '@/apis/utils/request.js';
-import Qs from 'qs';
+import Qs from 'qs';
+
+export function getMyLastSchedules(data) {
+	var url='/mobile/student/getMyLastSchedules';
+	return requestStudent({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}

+ 33 - 0
apis/teacher/callNames.js

@@ -0,0 +1,33 @@
+import requestTeacher from '@/apis/utils/request.js';
+import Qs from 'qs';
+
+export function rollCallSignIn(sheetId,studentList) {
+	var url='/mobile/teacher/rollCallSignIn';
+	return requestTeacher({
+		method: 'post',
+		// data: data,
+		data: {
+			sheetId: sheetId,
+			studentList: JSON.stringify(studentList)
+		},
+		url: url
+	})
+}
+
+export function rollCallDetail(data) {
+	var url='/mobile/teacher/rollCallDetail';
+	return requestTeacher({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+export function rollCallList(data) {
+	var url='/mobile/teacher/rollCallList';
+	return requestTeacher({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}

+ 11 - 0
apis/teacher/homePage.js

@@ -0,0 +1,11 @@
+import requestTeacher from '@/apis/utils/request.js';
+import Qs from 'qs';
+
+export function getMyLastSchedules(data) {
+	var url='/mobile/teacher/course/getMyLastSchedules';
+	return requestTeacher({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}

+ 11 - 0
apis/teacher/mine.js

@@ -0,0 +1,11 @@
+import requestTeacher from '@/apis/utils/request.js';
+import Qs from 'qs';
+
+export function updateTeacher(data) {
+	var url='/mobile/teacher/updateTeacher';
+	return requestTeacher({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}

+ 3 - 3
apis/teacher/myCourse.js

@@ -1,8 +1,8 @@
 import requestTeacher from '@/apis/utils/request.js';
 import Qs from 'qs';
 
-export function courseDetail(data) {
-	var url='/mobile/student/courseDetail';
+export function getScheduleDtl(data) {
+	var url='/mobile/teacher/course/getScheduleDtl';
 	return requestTeacher({
 		method: 'post',
 		data: data,
@@ -11,7 +11,7 @@ export function courseDetail(data) {
 }
 
 export function loadMySchedule(data) {
-	var url='/mobile/student/loadMySchedule';
+	var url='/mobile/teacher/course/loadMySchedule';
 	return requestTeacher({
 		method: 'post',
 		data: data,

+ 3 - 2
apis/utils/mixin.js

@@ -1,6 +1,6 @@
 var prefix = 'jp-education-teacher' + process.car.NODE_ENV + '_';
 function	getprefix(){
-		
+		// debugger
 		var url=window.location.href.split("#")[1]
 		if(url.indexOf("/pages/parents/") == 0){
 			return prefix+"parents-"
@@ -8,6 +8,7 @@ function	getprefix(){
 		if(url.indexOf("/pages/teacher/") == 0){
 			return prefix+"teacher-"
 		}
+		
 		return prefix
 	}
 var app = {
@@ -96,7 +97,7 @@ var app = {
 
 	getToken : (options) => {
 		//不同权限 ,不同token
-	
+	// console.log(getprefix() + 'token')
 		return uni.getStorageSync(getprefix() + 'token')
 	},
 	setToken : (value) => {

+ 2 - 2
config/.env.dev.js

@@ -9,8 +9,8 @@ const UNI_APP = {
 
 	//openId:"oK9Wr57rAcNzihDN2PEdptprT0As", 
 	// openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",//zkx
-	// openId:"123456",
-	openId:"oK9Wr59rru-i3bm7dtTtxnkR-i4s",//杨所
+	openId:"123456",
+	// openId:"oK9Wr59rru-i3bm7dtTtxnkR-i4s",//杨所
 	//openId:"oK9Wr5zv8lvirni3txbxRkmpg8d0",//
 	
 	

+ 1 - 1
pages/parents/classSchedule/classSchedule.vue

@@ -46,7 +46,7 @@
 				</view>
 				<view class="tag">
 					<view class="item">
-						{{item.classroom}}
+						{{item.classroomName}}
 					</view>
 					<view class="item">
 						{{item.coursePeriods}}

+ 195 - 205
pages/parents/homePage/homePage.vue

@@ -111,7 +111,7 @@
 			<view class="course-infos">
 				<view class="info-box" v-for="(item,index) in courseList" :key="index"
 					@click="gotoUrl('pages/parents/classSchedule/classScheduleDetails?id=' + item.sheetId)">
-					<view class="position today" v-if="item.courseDate == date">
+					<view class="position today" v-if="item.courseDate == day">
 					</view>
 					<view class="position tomorrow" v-if="item.courseDate == tomorrow">
@@ -122,7 +122,7 @@
 					</view>
 					<view class="location-time">
 						<view class="location">
-							{{item.classroom}}
+							{{item.classroomName}}
 						</view>
 						<view class="time">
 							{{item.coursePeriods}}
@@ -177,7 +177,7 @@
 					机构推荐
 				</view> -->
 			</view>
-			
+
 			<view class="infos-box">
 				<view class="picture">
 					<img src="../../../assets/img/classify1.png" alt="">
@@ -209,7 +209,7 @@
 					</view>
 				</view>
 			</view>
-<view class="infos-box">
+			<view class="infos-box">
 				<view class="picture">
 					<img src="../../../assets/img/classify1.png" alt="">
 				</view>
@@ -278,34 +278,38 @@
 </template>
 
 <script>
-	import * as classScheduleApi from '@/apis/parents/classSchedule.js'
+	import * as homePageApi from '@/apis/parents/homePage.js'
 	import * as mineApi from '@/apis/parents/mine.js'
 	import ParentsTabbar from '@/components/ParentsTabbar.vue'
-	
+
 	export default {
 		components: {
 			ParentsTabbar
 		},
 		data() {
 			return {
-				chosenList: [
-					{name: '全部'},
-					{name: '精品试听'},
-					{name: '为您优选'},
-					{name: '机构推荐'}
+				chosenList: [{
+						name: '全部'
+					},
+					{
+						name: '精品试听'
+					},
+					{
+						name: '为您优选'
+					},
+					{
+						name: '机构推荐'
+					}
 				],
 				chosenActive: 0,
-				date: '',
+				day: '',
 				tomorrow: '',
 				weekDate: [],
 				weekN: ["一", "二", "三", "四", "五", "六", "日"],
 				activeClass: 0,
 				weekDate1: '',
 				courseList: [],
-				form: {
-					studentName: '',
-					headPhoto: ''
-				},
+				form: {},
 				show: false,
 				studentList: [],
 				studentId: '',
@@ -315,31 +319,46 @@
 			}
 		},
 		onReady() {
-			if(this.carhelp.getStudentId()) {
+			let date = new Date() //当前日期
+			this.day = this.getFormatDate(date);
+			this.tomorrow = this.getFormatDate(new Date(date.setDate(date.getDate() + 1)));
+
+			if (this.carhelp.getStudentId()) {
 				this.studentId = this.carhelp.getStudentId().studentId;
 				this.getStudentDetail();
-				this.getToday();
+				this.getLatelyCourseList();
 			}
-			
+
 			this.getStudentList();
 		},
 		methods: {
-			chosenClick(item,index) {
+			getFormatDate(date) {
+				let myyear = date.getFullYear();
+				let mymonth = date.getMonth() + 1;
+				let myweekday = date.getDate();
+				if (mymonth < 10) {
+					mymonth = "0" + mymonth;
+				}
+				if (myweekday < 10) {
+					myweekday = "0" + myweekday;
+				}
+
+				return (myyear + "-" + mymonth + "-" + myweekday);
+			},
+			chosenClick(item, index) {
 				this.chosenActive = index;
 			},
-			getCourseList() {
-				this.courseList = [];
+			getLatelyCourseList() {
 				uni.showLoading({
 					title: "加载中",
 					mask: true,
 				})
-				classScheduleApi.loadMySchedule({
+				homePageApi.getMyLastSchedules({
 					studentId: this.studentId,
-					startDate: this.date,
-					endDate: this.weekDate[6].day
+					count: 2
 				}).then((response) => {
 					uni.hideLoading();
-					this.courseList =  response.data;
+					this.courseList = response.data;
 				}).catch(error => {
 					uni.showToast({
 						title: error,
@@ -347,70 +366,16 @@
 					})
 				})
 			},
-			getToday() {
-				this.weekDate = [];
-				let date = new Date(); //当前日期
-				let year = date.getFullYear(); //当前年
-				let month = date.getMonth() + 1; //当前月
-				let day = date.getDate(); //当天
-				let mydate = new Date(year, month - 1, day);
-				let weekday = mydate.getDay();
-				this.weekDate1 = new Date(year, month - 1, day + 1 - weekday);
-				this.getWeekDate(true);
-			},
-			getWeekDate(bl) {
-				let weekDate2 = new Date(this.weekDate1.getTime());
-				for (var i = 0; i < 7; i++) {
-					for (var j = 0; j < this.weekN.length; j++) {
-						if (i == j) {
-							this.weekDate.push({
-								week: this.weekN[j],
-								day: this.getFormatDate(new Date(weekDate2.setDate(this.weekDate1.getDate() + i))),
-								isDotShow: false
-							})
-						}
-					}
-				}
-			
-				if (bl) {
-					let date = new Date(); //当前日期
-					date = this.getFormatDate(date);
-					for (var m = 0; m < this.weekDate.length; m++) {
-						if (date == this.weekDate[m].day) {
-							this.activeClass = m;
-							this.date = this.weekDate[m].day;
-							this.tomorrow = this.weekDate[m+1].day;
-						}
-					}
-					this.getCourseList();
-				}
-			},
-			getFormatDate(date) {
-				let myyear = date.getFullYear();
-				let mymonth = date.getMonth() + 1;
-				let myweekday = date.getDate();
-				if (mymonth < 10) {
-					mymonth = "0" + mymonth;
-				}
-				if (myweekday < 10) {
-					myweekday = "0" + myweekday;
-				}
-			
-				return (myyear + "-" + mymonth + "-" + myweekday);
-			},
 			getStudentDetail() {
 				uni.showLoading({
 					title: "加载中",
 					mask: true,
 				})
-				// debugger
 				mineApi.getStudentDtl({
 					studentId: this.studentId
 				}).then((response) => {
 					uni.hideLoading();
-					// debugger
-					this.form.studentName = response.data.studentName;
-					this.form.headPhoto = response.data.headPhoto;
+					this.form = response.data;
 				}).catch(error => {
 					uni.showToast({
 						title: error,
@@ -419,9 +384,12 @@
 				})
 			},
 			confirm(e) {
-				this.carhelp.setStudentId({studentId: e[0].value});
+				this.carhelp.setStudentId({
+					studentId: e[0].value
+				});
 				this.studentId = e[0].value;
 				this.getStudentDetail();
+				this.getLatelyCourseList();
 			},
 			getStudentList() {
 				uni.showLoading({
@@ -436,7 +404,7 @@
 							value: list[i].studentId,
 							label: list[i].studentName
 						})
-					} 
+					}
 				}).catch(error => {
 					uni.showToast({
 						title: error,
@@ -449,48 +417,55 @@
 </script>
 
 <style lang="scss" scoped>
-	page{
+	page {
 		padding-bottom: 100px;
 	}
+
 	.navigation {
-      display: flex;
-	  justify-content: space-between;
-	  height: 44px;
-	  background-color: rgba(13, 186, 199, 1);
-	  padding: 0 16px;
-	  .title{
-		  line-height: 44px;
-		  color: #ffffff;
-		  font-size: 20px
-	  }
-	  .identity{
-		  display: flex;
-		  align-items:center;
-		  .picture{
-			  width: 24px;
-			  height: 24px;
-			  border-radius: 50px;
-			  overflow: hidden;
-			  margin-right: 4px;
-			  img{
-				  width: 100%;
-				  height: 100%;
-				  vertical-align: middle;
-			  }
-			  
-		  }
-		  .name{
-			  margin-right: 4px;
-			  color: rgba(255, 255, 255, 1);
-		  }
-		  .icon{
-			  img{
-				  vertical-align: middle;
-			  }
-		  }
-	  }
-		
-		
+		display: flex;
+		justify-content: space-between;
+		height: 44px;
+		background-color: rgba(13, 186, 199, 1);
+		padding: 0 16px;
+
+		.title {
+			line-height: 44px;
+			color: #ffffff;
+			font-size: 20px
+		}
+
+		.identity {
+			display: flex;
+			align-items: center;
+
+			.picture {
+				width: 24px;
+				height: 24px;
+				border-radius: 50px;
+				overflow: hidden;
+				margin-right: 4px;
+
+				img {
+					width: 100%;
+					height: 100%;
+					vertical-align: middle;
+				}
+
+			}
+
+			.name {
+				margin-right: 4px;
+				color: rgba(255, 255, 255, 1);
+			}
+
+			.icon {
+				img {
+					vertical-align: middle;
+				}
+			}
+		}
+
+
 	}
 
 	.head {
@@ -643,100 +618,115 @@
 		}
 	}
 
-.recommend{
-	margin:32px 16px ;
-	.title {
-		height: 20px;
-		line-height: 20px;
-		margin-bottom: 14px;
-		color: #333333;
-		font-weight: bold;
-	
-		img {
-			vertical-align: middle;
-			margin-right: 8px;
-		}
-	}
-	.classify{
-		display: flex;
-		margin-bottom: 24px;
-		.item{
-			border-radius: 12px;
-			line-height: 32px;
-			background-color: rgba(255, 255, 255, 1);
-			color: rgba(119, 119, 119, 1);
-			text-align: center;
-			border: 1px solid rgba(204, 204, 204, 1);
-			padding: 0 8px;
-			margin-left: 12px;
-		}
-		.chosen{
-			border: 1px solid rgba(13, 186, 199, 1);
-			color: rgba(13, 186, 199, 1);
-		}
-	}
-	.infos-box{
-		border-radius: 12px;
-		background-color: rgba(255, 255, 255, 1);
-		padding: 12px;
-		margin-bottom: 12px;
-		display: flex;
-		.picture{
-			width: 200rpx;
-			height: 200rpx;
-			border-radius: 4px;
-			overflow: hidden;
-			img{
-				width: 100%;
-				height: 100%;
+	.recommend {
+		margin: 32px 16px;
+
+		.title {
+			height: 20px;
+			line-height: 20px;
+			margin-bottom: 14px;
+			color: #333333;
+			font-weight: bold;
+
+			img {
+				vertical-align: middle;
+				margin-right: 8px;
 			}
 		}
-		.infos{
-			flex: 1;
-			margin-left: 12px;
-			.name{
-				color: rgba(51, 51, 51, 1);
-				font-size: 16px;
+
+		.classify {
+			display: flex;
+			margin-bottom: 24px;
+
+			.item {
+				border-radius: 12px;
+				line-height: 32px;
+				background-color: rgba(255, 255, 255, 1);
+				color: rgba(119, 119, 119, 1);
+				text-align: center;
+				border: 1px solid rgba(204, 204, 204, 1);
+				padding: 0 8px;
+				margin-left: 12px;
 			}
-			.tips{
-				display: flex;
-				margin-top: 8px;
-				.item{
-					padding: 0 8px;
-					line-height: 20px;
-					border-radius: 4px;
-					background-color: rgba(241, 243, 244, 1);
-					color: rgba(16, 16, 16, 1);
-					font-size: 12px;
-					margin-right: 8px;
+
+			.chosen {
+				border: 1px solid rgba(13, 186, 199, 1);
+				color: rgba(13, 186, 199, 1);
+			}
+		}
+
+		.infos-box {
+			border-radius: 12px;
+			background-color: rgba(255, 255, 255, 1);
+			padding: 12px;
+			margin-bottom: 12px;
+			display: flex;
+
+			.picture {
+				width: 200rpx;
+				height: 200rpx;
+				border-radius: 4px;
+				overflow: hidden;
+
+				img {
+					width: 100%;
+					height: 100%;
 				}
 			}
-			.teacher-price{
-				margin-top: 44rpx;
-				display: flex;
-				justify-content: space-between;
-				align-items: center;
-				.teacher{
+
+			.infos {
+				flex: 1;
+				margin-left: 12px;
+
+				.name {
+					color: rgba(51, 51, 51, 1);
+					font-size: 16px;
+				}
+
+				.tips {
 					display: flex;
-					align-items: center;
-					.photo{
-						width: 32px;
-						height: 32px;
-						border-radius: 50px;
-						overflow: hidden;
+					margin-top: 8px;
+
+					.item {
+						padding: 0 8px;
+						line-height: 20px;
+						border-radius: 4px;
+						background-color: rgba(241, 243, 244, 1);
+						color: rgba(16, 16, 16, 1);
+						font-size: 12px;
 						margin-right: 8px;
-						img{
-							width: 100%;
-							height: 100%;
-						}
 					}
 				}
-				.price{
-					color: rgba(255, 61, 0, 1);
+
+				.teacher-price {
+					margin-top: 44rpx;
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+
+					.teacher {
+						display: flex;
+						align-items: center;
+
+						.photo {
+							width: 32px;
+							height: 32px;
+							border-radius: 50px;
+							overflow: hidden;
+							margin-right: 8px;
+
+							img {
+								width: 100%;
+								height: 100%;
+							}
+						}
+					}
+
+					.price {
+						color: rgba(255, 61, 0, 1);
+					}
 				}
 			}
 		}
 	}
-}
-
 </style>

+ 2 - 1
pages/parents/mine/addChildInformation.vue

@@ -195,6 +195,7 @@
 			},
 			uploadPhoto() {
 				let _self = this;
+				var token = _self.carhelp.getToken()
 				
 				const crop = {
 					quality: 100,
@@ -241,7 +242,7 @@
 						//返回 base64 图片
 						//(fileData);
 						
-						var token = _self.carhelp.getToken()
+						// var token = _self.carhelp.getToken()
 						
 						uni.showLoading({
 							title: '上传中'

+ 2 - 1
pages/parents/mine/editProfile.vue

@@ -85,6 +85,7 @@
 			},
 			uploadPhoto() {
 				let _self = this;
+				var token = _self.carhelp.getToken()
 				
 				const crop = {
 					quality: 100,
@@ -131,7 +132,7 @@
 						//返回 base64 图片
 						//(fileData);
 						
-						var token = _self.carhelp.getToken()
+						// var token = _self.carhelp.getToken()
 						
 						uni.showLoading({
 							title: '上传中'

+ 2 - 1
pages/parents/mine/mine.vue

@@ -212,7 +212,8 @@
 				form: {
 					id: '',
 					headImg: '',
-					nickName: ''
+					nickName: '',
+					phone: ''
 				},
 				show: false,
 				title: '退出账号',

+ 5 - 4
pages/parents/teacherHomepage/teacherHomepage.vue

@@ -17,8 +17,9 @@
 						联系我
 					</view>
 				</view>
-				<u-modal v-model="show" @confirm="confirmPhone" :confirm-text="confirmText" confirm-color="#606266" :show-cancel-button="true" ref="uModal"
-					:asyncClose="true" :title="title" :content="content" :content-style="{fontSize: '24px',color: '#101010'}"></u-modal>
+				<u-modal v-model="show" @confirm="confirmPhone" :confirm-text="confirmText"
+					confirm-color="#606266" :show-cancel-button="true" ref="uModal" :asyncClose="true"
+					:title="title" :content="content" :content-style="{fontSize: '24px',color: '#101010'}"></u-modal>
 
 				<view class="introduction">
 					<view class="title">
@@ -33,7 +34,7 @@
 		<view class="content">
 
 		</view>
-		<view class="main">
+		<!-- <view class="main">
 			<view class="title">
 				主讲课程
 			</view>
@@ -94,7 +95,7 @@
 
 			</view>
 
-		</view>
+		</view> -->
 	</view>
 </template>
 

+ 227 - 67
pages/teacher/callNames/callNames.vue

@@ -1,111 +1,89 @@
 <template>
 	<view>
-		<u-navbar back-text="点名签到"></u-navbar>
-		<view class="search">
+		<u-navbar title="点名签到">
+			<view class="slot-wrap" @click="getToday()">
+				今天
+			</view>
+		</u-navbar>
+		<!-- <view class="search">
 			<u-search placeholder="搜索班级/一对一学员" action-text="查询"></u-search>
-		</view>
-		<view class="main">
+		</view> -->
+		<view class="date-picker">
+			<view class="check" @click="beforeWeek">
+				<u-icon name="arrow-left" size="32"></u-icon>前一周
+			</view>
 			<view class="date">
-				2023-01-03 星期一
+				{{date}}
 			</view>
-			<view class="details-box">
-				<view class="title-number">
-					<view class="title">
-						芭蕾舞新生班
-					</view>
-					<view class="number">
-						学员数 <text>20</text>
-					</view>
+			<view class="check" @click="afterWeek">
+				后一周<u-icon name="arrow-right" size="32" ></u-icon>
+			</view>
+		</view>
+		<view class="date-item">
+			<view class="item" v-for="(item,index) in weekDate" :key="index"
+				:class="activeClass == index ? 'checked' : ''" @click="activeClassClick(item,index)">
+				<view :class="item.isDotShow ? 'dot' : ''" :style="activeClass == index ? 'background-color: #fff;' : ''">
+		
 				</view>
-				<view class="location-time">
-					<view class="location">
-						二楼舞蹈一教室
-					</view>
-					<view class="time">
-						08:30-10:00
-					</view>
+				<view class="week ">
+					{{item.week}}
 				</view>
-				<view class="circumstance">
-					<view class="date">
-						2023-01-03
-					</view>
-					<view class="details">
-						 <view class="details-item">
-						 	<text>到课</text>
-							<text class="num-box">16</text>
-						 </view>
-						 <view class="details-item">
-						 	<text>请假</text>
-						 	<text class="num-box">2</text>
-						 </view>
-						 <view class="details-item">
-						 	<text>旷课</text>
-						 	<text class="num-box">1</text>
-						 </view>
-						 <view class="details-item">
-						 	<text>补课</text>
-						 	<text class="num-box">1</text>
-						 </view>
-					</view>
-					
-				</view>
-				
-				<view class="check-more">
-					<view class="history" @click="gotoUrl('pages/teacher/callNames/callHistory')">
-						历史记录
-					</view>
-					<view class="call-name" @click="gotoUrl('pages/teacher/callNames/classCall')">
-						点名签到
-					</view>
-					
+				<view class="day ">
+					{{parseInt(item.day.slice(8))}}
 				</view>
 			</view>
-			
-			<view class="details-box">
+		</view>
+		<view class="main">
+			<!-- <view class="date">
+				2023-01-03 星期一
+			</view> -->
+			<view class="details-box" v-for="(item,index) in callList" :key="index">
 				<view class="title-number">
 					<view class="title">
-						芭蕾舞八级一对一考级班
+						{{item.className}}
 					</view>
 					<view class="number">
-						学员数 <text>1</text>
+						学员数 <text>{{item.studentNum}}</text>
 					</view>
 				</view>
 				<view class="location-time">
 					<view class="location">
-						二楼舞蹈一教室
+						{{item.classroomN}}
+					</view>
+					<view class="time">
+						{{item.coursePeriods}}
 					</view>
-				
 				</view>
 				<view class="circumstance">
 					<view class="date">
-						2023-01-03
+						{{item.courseDate}}
 					</view>
 					<view class="details">
 						 <view class="details-item">
 						 	<text>到课</text>
-							<text class="num-box">16</text>
+							<text class="num-box">{{item.dkNum}}</text>
 						 </view>
 						 <view class="details-item">
 						 	<text>请假</text>
-						 	<text class="num-box">2</text>
+						 	<text class="num-box">{{item.qjNum}}</text>
 						 </view>
 						 <view class="details-item">
 						 	<text>旷课</text>
-						 	<text class="num-box">1</text>
+						 	<text class="num-box">{{item.kkNum}}</text>
 						 </view>
 						 <view class="details-item">
 						 	<text>补课</text>
-						 	<text class="num-box">1</text>
+						 	<text class="num-box">{{item.bkNum}}</text>
 						 </view>
 					</view>
 					
 				</view>
 				
 				<view class="check-more">
-					<view class="history">
+					<view class="history" @click="gotoUrl('pages/teacher/callNames/callHistory')">
 						历史记录
 					</view>
-					<view class="call-name">
+					<view class="call-name" @click="gotoUrl('pages/teacher/callNames/classCall?id=' + item.sheetId)">
 						点名签到
 					</view>
 					
@@ -118,19 +96,201 @@
 </template>
 
 <script>
+	import * as callNamesApi from '@/apis/teacher/callNames.js'
+	
 	export default {
 		data() {
 			return {
-				
+				date: '',
+				weekDate: [],
+				weekN: ["一", "二", "三", "四", "五", "六", "日"],
+				activeClass: 0,
+				weekDate1: '',
+				callList: [],
 			}
 		},
+		onReady() {
+			this.getToday();
+		},
 		methods: {
+			getCallList() {
+				this.callList = [];
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				callNamesApi.rollCallList({
+					queryDateStart: this.weekDate[0].day,
+					queryDateEnd: this.weekDate[6].day
+				}).then((response) => {
+					uni.hideLoading();
+					var list =  response.data.dataList;
+					for (var i = 0; i < list.length; i++) {
+						if(this.date == list[i].courseDate) {
+							this.callList.push(list[i]);
+						}
+						for (var j = 0; j < this.weekDate.length; j++) {
+							if(this.weekDate[j].day == list[i].courseDate) {
+								this.weekDate[j].isDotShow = true;
+							}
+						}
+					}
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			getToday() {
+				this.weekDate = [];
+				let date = new Date(); //当前日期
+				let year = date.getFullYear(); //当前年
+				let month = date.getMonth() + 1; //当前月
+				let day = date.getDate(); //当天
+				let mydate = new Date(year, month - 1, day);
+				let weekday = mydate.getDay();
+				this.weekDate1 = new Date(year, month - 1, day + 1 - weekday);
+				this.getWeekDate(true);
+			},
+			getWeekDate(bl) {
+				let weekDate2 = new Date(this.weekDate1.getTime());
+				for (var i = 0; i < 7; i++) {
+					for (var j = 0; j < this.weekN.length; j++) {
+						if (i == j) {
+							this.weekDate.push({
+								week: this.weekN[j],
+								day: this.getFormatDate(new Date(weekDate2.setDate(this.weekDate1.getDate() + i))),
+								isDotShow: false
+							})
+						}
+					}
+				}
+			
+				if (bl) {
+					let date = new Date(); //当前日期
+					date = this.getFormatDate(date);
+					for (var m = 0; m < this.weekDate.length; m++) {
+						if (date == this.weekDate[m].day) {
+							this.activeClass = m;
+							this.date = this.weekDate[m].day;
+						}
+					}
+					this.getCallList();
+				}
+			},
+			getFormatDate(date) {
+				let myyear = date.getFullYear();
+				let mymonth = date.getMonth() + 1;
+				let myweekday = date.getDate();
+				if (mymonth < 10) {
+					mymonth = "0" + mymonth;
+				}
+				if (myweekday < 10) {
+					myweekday = "0" + myweekday;
+				}
 			
+				return (myyear + "-" + mymonth + "-" + myweekday);
+			},
+			beforeWeek() {
+				this.weekDate = [];
+				this.weekDate1 = new Date(this.weekDate1.setDate(this.weekDate1.getDate() - 7));
+				this.getWeekDate();
+				for (var m = 0; m < this.weekDate.length; m++) {
+					if (this.activeClass == m) {
+						this.date = this.weekDate[m].day;
+					}
+				}
+				this.getCallList();
+			},
+			afterWeek() {
+				this.weekDate = [];
+				this.weekDate1 = new Date(this.weekDate1.setDate(this.weekDate1.getDate() + 7));
+				this.getWeekDate();
+				for (var m = 0; m < this.weekDate.length; m++) {
+					if (this.activeClass == m) {
+						this.date = this.weekDate[m].day;
+					}
+				}
+				this.getCallList();
+			},
+			activeClassClick(item, index) {
+				this.activeClass = index;
+				for (var m = 0; m < this.weekDate.length; m++) {
+					if (index == m) {
+						this.date = this.weekDate[m].day;
+					}
+				}
+				this.getCallList();
+			},
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
+	/deep/.u-slot-content {
+		display: block;
+		text-align: right !important;
+		margin-right: 16px;
+		color: #333333;
+	}
+	
+	.date-picker {
+		background-color: #fff;
+		display: flex;
+		justify-content: space-between;
+		padding: 10px 12px 17px 12px;
+		color: rgba(13, 186, 199, 1);
+	
+		.date {
+			font-size: 16px
+		}
+	}
+	
+	.date-item{
+		background-color: #fff;
+		display: flex;
+		justify-content: space-around;
+		padding: 0 12px 16px 12px;
+		border-radius: 0px 0px 9px 9px;
+		box-shadow: 0px 4px 4px 0px #CFD2D5;
+		.item{
+			line-height: 20px;
+			border-radius: 8px;
+			background-color: rgba(238, 238, 238, 1);
+			color: #1C222A;
+			text-align: center;
+			width: 12%;
+			padding: 12rpx 0;
+			position: relative;
+			.week{
+				font-size: 12px;
+				
+			}
+			.day{
+				font-size: 16px;
+				font-weight: bold;
+			}
+		}
+		.checked{
+			background-color: rgba(13, 186, 199, 1);
+			color: #fff ;
+		}
+		.dot{
+			width: 6px;
+			height: 6px;
+			background-color: rgba(13, 186, 199, 1);
+			border-radius: 999px;
+			position: absolute;
+			top: 8rpx;
+			right: 8rpx;
+		}
+		.dot-checked{
+			background-color: #fff;
+		}
+		
+	}
+	
 	.search{
 		background-color: #fff;
 		padding: 8px 12px;

+ 114 - 59
pages/teacher/callNames/classCall.vue

@@ -3,73 +3,59 @@
 		<u-navbar back-text="点名签到"></u-navbar>
 		<view class="main">
 			<u-cell-group>
-				<u-cell-item title="班级名称" value="芭蕾舞新生班" :arrow="false"></u-cell-item>
-				<u-cell-item title="上课时间" value="2023-01-03 08:30-10:00" :arrow="false"></u-cell-item>
-				<u-cell-item title="上课教室" value="二楼舞蹈一教室" :arrow="false"></u-cell-item>
-				<u-cell-item class="teacher" title="任课老师" value="夏奕琳"
-					@click="gotoUrl('pages/teacher/myCourse/teacherHomepage')"></u-cell-item>
-				<u-cell-item title="学员总数" value="20人" :arrow="false"></u-cell-item>
-				<u-cell-item title="点名结果批量设置" value="到课" @click="show = true"></u-cell-item>
+				<u-cell-item title="班级名称" :value="classList.className" :arrow="false"></u-cell-item>
+				<u-cell-item title="上课时间" :value="scheduleSheet.courseDate+' '+scheduleSheet.coursePeriods" :arrow="false"></u-cell-item>
+				<u-cell-item title="上课教室" :value="classRoom.name" :arrow="false"></u-cell-item>
+				<u-cell-item class="teacher" title="任课老师" :value="employee.employeeName"
+					@click="gotoUrl('pages/teacher/myCourse/teacherHomepage?id='+employee.employeeId)"></u-cell-item>
+				<u-cell-item title="学员总数" :value="studentList.length+'人'" :arrow="false"></u-cell-item>
+				<u-cell-item title="点名结果批量设置" :value="resultName" @click="show = true"></u-cell-item>
 			</u-cell-group>
 		</view>
 		<u-picker mode="selector" v-model="show" :default-selector="[0]" :range="selectorObj" range-key="cateName"
 			@confirm="confirm"></u-picker>
-		<view class="student-details">
+		<view class="student-details" v-for="(item,index) in studentList" :key="index">
 			<view class="photo">
-				<img src="../../../assets/img/photo@1x.png" alt="">
+				<u-avatar v-if="item.headPhoto != null" class="avatar" mode="square"
+					:src="item.headPhoto+'?x-oss-process=image/resize,m_fill,w_256,h_256'" size="112">
+					<img src="" alt="">
+				</u-avatar>
 			</view>
 			<view class="details">
 				<view class="name-tel">
 					<view class="name">
-						周梓轩
+						{{item.studentName}}
 					</view>
 					<view class="tel">
 						<img src="../../../assets/img/riLine-smartphone-line@1x.png" alt="">
-						<view class="">17700112233
-
+						<view class="">
+							{{item.takerPhone}}
 						</view>
 					</view>
 				</view>
 				<view class="class-leave">
-					<view class="class">
+					<!-- <view class="class">
 						剩余课时<text>40</text>
-					</view>
-					<view class="leave">
+					</view> -->
+					<!-- <view class="leave">
 						已请假<text>1</text>
-					</view>
+					</view> -->
 				</view>
 			</view>
-			<view class="to-class" @click="show = true">
+			<view class="to-class" @click="showStudent(item)" v-if="item.rollCallResult == '1'">
 				到课<u-icon name="arrow-right" color="#cccccc"></u-icon>
 			</view>
-		</view>
-		<view class="student-details">
-			<view class="photo">
-				<img src="../../../assets/img/photo@1x.png" alt="">
+			<view class="to-class" @click="showStudent(item)" v-else-if="item.rollCallResult == '2'">
+				请假<u-icon name="arrow-right" color="#cccccc"></u-icon>
 			</view>
-			<view class="details">
-				<view class="name-tel">
-					<view class="name">
-						王紫瑄
-					</view>
-					<view class="tel">
-						<img src="../../../assets/img/riLine-smartphone-line@1x.png" alt="">
-						<view class="">17700112233
-
-						</view>
-					</view>
-				</view>
-				<view class="class-leave">
-					<view class="class">
-						剩余课时<text>40</text>
-					</view>
-					<view class="leave">
-						已请假<text>11</text>
-					</view>
-				</view>
+			<view class="to-class" @click="showStudent(item)" v-else-if="item.rollCallResult == '3'">
+				旷课<u-icon name="arrow-right" color="#cccccc"></u-icon>
 			</view>
-			<view class="to-class">
-				到课<u-icon name="arrow-right" color="#cccccc"></u-icon>
+			<view class="to-class" @click="showStudent(item)" v-else-if="item.rollCallResult == '4'">
+				补课<u-icon name="arrow-right" color="#cccccc"></u-icon>
+			</view>
+			<view class="to-class" @click="showStudent(item)" v-else>
+				<u-icon name="arrow-right" color="#cccccc"></u-icon>
 			</view>
 		</view>
 		<!-- 底部 -->
@@ -79,17 +65,17 @@
 					签到结果
 				</view>
 				<view class="result">
-					<view class="item arrive">
-						到课<text>16</text>
+					<view class="itemClass arrive">
+						到课<text>{{scheduleSheet.dkNum!=null?scheduleSheet.dkNum:'0'}}</text>
 					</view>
-					<view class="item leave">
-						请假<text>16</text>
+					<view class="itemClass leave">
+						请假<text>{{scheduleSheet.qjNum!=null?scheduleSheet.qjNum:'0'}}</text>
 					</view>
-					<view class="item truant">
-						旷课<text>16</text>
+					<view class="itemClass truant">
+						旷课<text>{{scheduleSheet.kkNum!=null?scheduleSheet.kkNum:'0'}}</text>
 					</view>
-					<view class="item make-up">
-						补课<text>16</text>
+					<view class="itemClass make-up">
+						补课<text>{{scheduleSheet.bkNum!=null?scheduleSheet.bkNum:'0'}}</text>
 					</view>
 				</view>
 			</view>
@@ -99,36 +85,105 @@
 </template>
 
 <script>
+	import * as callNamesApi from '@/apis/teacher/callNames.js'
+	
 	export default {
 		data() {
 			return {
+				resultName: '到课',
+				studentId: '',
+				studentResult: '',
+				classList: {},
+				classRoom: {},
+				employee: {},
+				scheduleSheet: {},
+				studentList: [],
+				sheetId: '',
 				show: false,
 				selectorObj: [{
 						cateName: '到课',
-						id: 0
+						id: '1'
 					},
 					{
 						cateName: '请假',
-						id: 1
+						id: '2'
 					},
 					{
 						cateName: '旷课',
-						id: 2
+						id: '3'
 					},
 					{
 						cateName: '补课',
-						id: 3
+						id: '4'
 					}
 				]
 			}
 		},
+		onLoad(op) {
+			if(op.id) {
+				this.sheetId = op.id;
+				this.getRollCallDetail();
+			}
+		},
 		methods: {
+			getRollCallSignIn() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				callNamesApi.rollCallSignIn(this.sheetId,this.studentList).then((response) => {
+					uni.hideLoading();
+					this.getRollCallDetail();
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			getRollCallDetail() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				callNamesApi.rollCallDetail({
+					sheetId: this.sheetId 
+				}).then((response) => {
+					uni.hideLoading();
+					this.classList = response.data.class;
+					this.classRoom = response.data.classRoom;
+					this.employee = response.data.employee;
+					this.scheduleSheet = response.data.scheduleSheet;
+					this.studentList = response.data.studentList;
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
 			save() {
-				
+				this.getRollCallSignIn();
+			},
+			showStudent(item) {
+				this.show = true;
+				this.studentId = item.studentId;
 			},
 			confirm(obj) {
-				console.log(this.selectorObj[obj[0]].cateName)
-			}
+				if(!this.studentId){
+					this.resultName = this.selectorObj[obj[0]].cateName;
+					for (var i = 0; i < this.studentList.length; i++) {
+						this.studentList[i].rollCallResult = this.selectorObj[obj[0]].id;
+					}
+				}else {
+					for (var i = 0; i < this.studentList.length; i++) {
+						if(this.studentId == this.studentList[i].studentId) {
+							this.studentList[i].rollCallResult = this.selectorObj[obj[0]].id;
+						}
+					}
+					this.studentId = '';
+				}
+			},
 		}
 	}
 </script>
@@ -262,7 +317,7 @@
 				display: flex;
 				justify-content: space-between;
 
-				.item {
+				.itemClass {
 					font-size: 32rpx;
 					display: flex;
 					align-items: center;

+ 49 - 14
pages/teacher/editProfile/editProfile.vue

@@ -4,11 +4,10 @@
 		<view class="main">
 			
 			<view class="photo" @click="uploadPhoto">
-				<u-avatar v-if="form.headImg != null" class="avatar"
-					:src="form.headImg+'?x-oss-process=image/resize,m_fill,w_256,h_256'" size="216">
+				<u-avatar v-if="form.headPhoto != null" class="avatar"
+					:src="form.headPhoto+'?x-oss-process=image/resize,m_fill,w_256,h_256'" size="216">
 					<img src="" alt="">
 				</u-avatar>
-				<!-- <img src="../../../assets/img/photowoman.png" alt=""> -->
 				<view class="camera">
 					<img src="../../../assets/img/md-camera_alt@1x.png" alt="">
 				</view>
@@ -19,7 +18,7 @@
 						姓名
 					</view>
 					<view class="content">
-						夏奕琳
+						{{form.employeeName}}
 					</view>
 				</view>
 				<view class="item">
@@ -27,7 +26,7 @@
 						手机号
 					</view>
 					<view class="content">
-						13477489404
+						{{form.phone}}
 					</view>
 				</view>
 				<view class="item">
@@ -58,7 +57,7 @@
 					<view class="title">
 						荣誉奖项
 					</view>
-					<textarea name="" id="" cols="30" rows="10" placeholder="请简短描述您所获得的荣誉奖项及教学优质案例"></textarea>
+					<textarea v-model="form.introduce" name="" id="" cols="30" rows="10" placeholder="请简短描述您所获得的荣誉奖项及教学优质案例"></textarea>
 				</view>
 			</view>
 			
@@ -71,22 +70,60 @@
 </template>
 
 <script>
+	import * as loginApi from '@/apis/login.js'
+	import * as mineApi from '@/apis/teacher/mine.js'
+	
 	export default {
 		data() {
 			return {
-				form: {
-					headImg: '',
-				},
+				form: {},
 			}
 		},
+		onReady() {
+			this.getTeacherInfo();
+		},
 		methods: {
+			getTeacherInfo() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				loginApi.findByOpenId({
+					openId: this.carhelp.getOpenId()
+				}).then((response) => {
+					uni.hideLoading();
+					this.form = response.data.employee;
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
 			save() {
-				uni.navigateBack({
-					
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				mineApi.updateTeacher({
+					introduce: this.form.introduce,
+					headPhoto: this.form.headPhoto
+				}).then((response) => {
+					uni.hideLoading();
+					uni.navigateBack({
+						
+					})
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
 				})
 			},
 			uploadPhoto() {
 				let _self = this;
+				var token = _self.carhelp.getToken()
+				
 				
 				const crop = {
 					quality: 100,
@@ -133,8 +170,6 @@
 						//返回 base64 图片
 						//(fileData);
 						
-						var token = _self.carhelp.getToken()
-						
 						uni.showLoading({
 							title: '上传中'
 						});
@@ -151,7 +186,7 @@
 						    },
 						    success: (res) => {
 								let jsonData = res.data;
-						        _self.form.headImg = jsonData.data;
+						        _self.form.headPhoto = jsonData.data;
 										// _self.save();
 								uni.hideLoading();
 						    }

+ 57 - 26
pages/teacher/homePage/homePage.vue

@@ -98,31 +98,35 @@
 		</view>
 		
 		<!-- 最近课程 -->
-		<view class="course">
+		<view class="course" v-if="courseList.length != 0">
 			<view class="title">
 				<img src="../../../assets/img/riFill-calendar-todo-fill@1x.png" alt="">最近课程
 			</view>
 			<view class="course-infos">
-				<view class="info-box" @click="gotoUrl('pages/teacher/callNames/classCall')">
-					<view class="position today">
+				<view class="info-box" v-for="(item,index) in courseList" :key="index"
+					@click="gotoUrl('pages/teacher/myCourse/CourseDetails?id=' + item.sheetId)">
+					<view class="position today" v-if="item.courseDate == day">
 					</view>
+					<view class="position tomorrow" v-if="item.courseDate == tomorrow">
+						明
+					</view>
 					<view class="class-name">
-						周开琴书法班1
+						{{item.className}}
 					</view>
 					<view class="location-time">
 						<view class="location">
-							4楼6教室
+							{{item.classroomName}}
 						</view>
 						<view class="time">
-							09:30-10:45
+							{{item.coursePeriods}}
 						</view>
 					</view>
 					<view class="date">
-						2023.1.3
+						{{item.courseDate}}
 					</view>
 				</view>
-				<view class="info-box info-box2">
+				<!-- <view class="info-box info-box2">
 					<view class="position tomorrow">
 					</view>
@@ -140,7 +144,7 @@
 					<view class="date">
 						2023.1.3
 					</view>
-				</view>
+				</view> -->
 			</view>
 		</view>
 
@@ -215,6 +219,8 @@
 </template>
 
 <script>
+	import * as homePageApi from '@/apis/teacher/homePage.js'
+	
 	import Tabbar from '@/components/Tabbar.vue'
 	export default {
 		components: {
@@ -236,27 +242,52 @@
 				weekEndDate: '',
 				monthStartDate: '',
 				monthEndDate: '',
+				courseList: [],
+				tomorrow: '',
 			}
 		},
-		onLoad() {
-			let date = new Date() //当前日期
-			let year = date.getFullYear();//当前年			 
-			let month = date.getMonth()+1;//当前月
-			let day = date.getDate(); //当天
-			let mydate = new Date(year,month-1,day);
-			let weekday = mydate.getDay();
-			let weekDate1 = new Date(year, month - 1, day + 1 - weekday);
-			let weekDate2 = new Date(year, month - 1, day + 7 - weekday);
-			
-			this.day = this.getFormatDate(date,true);
-			this.weekStartDate = this.getFormatDate(weekDate1,true);
-			this.weekEndDate = this.getFormatDate(weekDate2,true);
-			this.monthStartDate = this.getFormatDate(date,false) + "-" + '01';
-			
-			let days = new Date(year, month + 1, 0).getDate();
-			this.monthEndDate = this.getFormatDate(date,false) + "-" + days;
+		onReady() {
+			this.getDateList();
+			this.getLatelyCourseList();
 		},
 		methods: {
+			getDateList() {
+				let date = new Date() //当前日期
+				let year = date.getFullYear();//当前年			 
+				let month = date.getMonth()+1;//当前月
+				let day = date.getDate(); //当天
+				let mydate = new Date(year,month-1,day);
+				let weekday = mydate.getDay();
+				let weekDate1 = new Date(year, month - 1, day + 1 - weekday);
+				let weekDate2 = new Date(year, month - 1, day + 7 - weekday);
+				
+				this.day = this.getFormatDate(date,true);
+				this.tomorrow = this.getFormatDate(new Date(date.setDate(date.getDate() + 1)),true);
+				console.log(this.tomorrow)
+				this.weekStartDate = this.getFormatDate(weekDate1,true);
+				this.weekEndDate = this.getFormatDate(weekDate2,true);
+				this.monthStartDate = this.getFormatDate(date,false) + "-" + '01';
+				
+				let days = new Date(year, month + 1, 0).getDate();
+				this.monthEndDate = this.getFormatDate(date,false) + "-" + days;
+			},
+			getLatelyCourseList() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				homePageApi.getMyLastSchedules({
+					count: 2
+				}).then((response) => {
+					uni.hideLoading();
+					this.courseList =  response.data;
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
 			getFormatDate(date,m) {
 				let myyear = date.getFullYear();
 				let mymonth = date.getMonth()+1;

+ 10 - 10
pages/teacher/mine/mine.vue

@@ -4,14 +4,14 @@
 		<view class="main">
 			<view class="data">
 				<view class="photo">
-					<u-avatar v-if="form.headImg != null" class="avatar"
-						:src="form.headImg+'?x-oss-process=image/resize,m_fill,w_256,h_256'" size="112">
+					<u-avatar v-if="form.headPhoto != null" class="avatar"
+						:src="form.headPhoto+'?x-oss-process=image/resize,m_fill,w_256,h_256'" size="112">
 						<img src="" alt="">
 					</u-avatar>
 				</view>
 				<view class="infos">
 					<view class="name">
-						{{form.nickName}}
+						{{form.employeeName}}
 					</view>
 					<view class="project">
 						中国舞项目-芭蕾舞老师
@@ -100,9 +100,9 @@
 		data() {
 			return {
 				form: {
-					id: '',
-					headImg: '',
-					nickName: ''
+					regUserId: '',
+					headPhoto: '',
+					employeeName: ''
 				},
 				show: false,
 				title: '退出账号',
@@ -110,7 +110,7 @@
 			}
 		},
 		onShow() {
-			this.getParentsInfo();
+			this.getTeacherInfo();
 		},
 		methods: {
 			confirm() {
@@ -135,7 +135,7 @@
 			signOut() {
 				this.show = true;
 			},
-			getParentsInfo() {
+			getTeacherInfo() {
 				uni.showLoading({
 					title: "加载中",
 					mask: true,
@@ -144,7 +144,7 @@
 					openId: this.carhelp.getOpenId()
 				}).then((response) => {
 					uni.hideLoading();
-					this.form = response.data.regUser;
+					this.form = response.data.employee;
 				}).catch(error => {
 					uni.showToast({
 						title: error,
@@ -153,7 +153,7 @@
 				})
 			},
 			toEditProfile() {
-				if (this.form.id) {
+				if (this.form.regUserId) {
 					uni.navigateTo({
 						url: '/pages/teacher/editProfile/editProfile'
 					})

+ 5 - 2
pages/teacher/myClass/classDetails.vue

@@ -8,7 +8,7 @@
 				<!-- <u-cell-item title="所属学部" value="文艺部" :arrow="false"></u-cell-item> -->
 				<u-cell-item title="所属课程项目" :value="classDetail.courseSortName" :arrow="false"></u-cell-item>
 				<!-- <u-cell-item title="上课时间" value="周四晚上18:00-19:30周六上午11:20-12:40" :arrow="false"></u-cell-item> -->
-				<u-cell-item title="上课教室" :value="classDetail.className" :arrow="false"></u-cell-item>
+				<u-cell-item title="上课教室" :value="classDetail.classroomName" :arrow="false"></u-cell-item>
 				<u-cell-item title="授课老师" :value="classDetail.teacherNames" :arrow="false"></u-cell-item>
 				<u-cell-item title="咨询电话" :value="classDetail.consultPhone" :arrow="false"></u-cell-item>
 				<u-cell-item title="学员总数" :value="classDetail.crtStudentCount+'人'" :arrow="false"></u-cell-item>
@@ -51,7 +51,10 @@
 				</view> -->
 				<view class="details">
 					<view class="photo">
-						<img :src="item.headPhoto" alt="">
+						<u-avatar v-if="item.headPhoto != null" class="avatar" mode="square"
+							:src="item.headPhoto+'?x-oss-process=image/resize,m_fill,w_256,h_256'" size="112">
+							<img src="" alt="">
+						</u-avatar>
 					</view>
 					<view class="information">
 						<view class="name">

+ 41 - 16
pages/teacher/myCourse/CourseDetails.vue

@@ -1,22 +1,22 @@
 <template>
 	<view>
-		<u-navbar title="芭蕾舞新生班"></u-navbar>
+		<u-navbar :title="detail.className"></u-navbar>
 		
 			<view class="main">
 				<u-cell-group>
-					<u-cell-item  title="校区" value="青少年宫校区" :arrow="false"></u-cell-item>
-					<u-cell-item  title="课程状态" value="进行中"  :arrow="false"></u-cell-item>
-					<u-cell-item  title="学年" value="2023年"  :arrow="false"></u-cell-item>
-					<u-cell-item  title="学期" value="春"  :arrow="false"></u-cell-item>
-					<u-cell-item  title="学部" value="文艺部 - 中国舞"  :arrow="false"></u-cell-item>
-					<u-cell-item  title="开课/结课日期" value="2023-03-01至2023-06-30"  :arrow="false"></u-cell-item>
-					<u-cell-item  title="课次" value="36次"  :arrow="false"></u-cell-item>
-					<u-cell-item  title="总费用" value="1000元"  :arrow="false"></u-cell-item>
-					<u-cell-item  title="上课时间" value="2023-01-03 08:30-10:00"  :arrow="false"></u-cell-item>
-					<u-cell-item  title="上课教室" value="二楼舞蹈一教室"  :arrow="false"></u-cell-item>
-					<u-cell-item  class="teacher" title="任课老师" value="夏奕琳"
-						@click="gotoUrl('pages/teacher/myCourse/teacherHomepage')"></u-cell-item>
-					<u-cell-item  title="学员总数" value="20人"  :arrow="false"></u-cell-item>
+					<u-cell-item  title="校区" :value="detail.schoolName" :arrow="false"></u-cell-item>
+					<!-- <u-cell-item  title="课程状态" value="进行中" :arrow="false"></u-cell-item>
+					<u-cell-item  title="学年" value="2023年" :arrow="false"></u-cell-item>
+					<u-cell-item  title="学期" value="春" :arrow="false"></u-cell-item>
+					<u-cell-item  title="学部" value="文艺部 - 中国舞" :arrow="false"></u-cell-item> -->
+					<u-cell-item  title="开课/结课日期" :value="detail.classStart+'至'+detail.classEnd" :arrow="false"></u-cell-item>
+					<!-- <u-cell-item  title="课次" value="36次"  :arrow="false"></u-cell-item>
+					<u-cell-item  title="总费用" value="1000元"  :arrow="false"></u-cell-item> -->
+					<u-cell-item  title="上课时间" :value="detail.courseDate+' '+detail.coursePeriods" :arrow="false"></u-cell-item>
+					<u-cell-item  title="上课教室" :value="detail.classroomName" :arrow="false"></u-cell-item>
+					<u-cell-item  class="teacher" title="任课老师" :value="detail.teacherNames"
+						@click="gotoUrl('pages/teacher/myCourse/teacherHomepage?id=' + detail.courseTeachers)"></u-cell-item>
+					<u-cell-item  title="学员总数" :value="detail.studentCount+'人'" :arrow="false"></u-cell-item>
 				</u-cell-group>
 			</view>
 		
@@ -24,14 +24,39 @@
 </template>
 
 <script>
+	import * as myCourseApi from '@/apis/teacher/myCourse.js'
+	
 	export default {
 		data() {
 			return {
-				
+				scheduleId: '',
+				detail: {},
+			}
+		},
+		onLoad(op) {
+			if (op.id) {
+				this.scheduleId = op.id;
+				this.getCourseDetail();
 			}
 		},
 		methods: {
-			
+			getCourseDetail() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				myCourseApi.getScheduleDtl({
+					scheduleId: this.scheduleId
+				}).then((response) => {
+					uni.hideLoading();
+					this.detail = response.data.scheduleDtl;
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			}
 		}
 	}
 </script>

+ 93 - 101
pages/teacher/myCourse/myCourse.vue

@@ -5,7 +5,7 @@
 				今天
 			</view>
 		</u-navbar>
-	<!-- 日期 -->	
+		<!-- 日期 -->
 		<view class="date-picker">
 			<view class="check" @click="beforeWeek">
 				<u-icon name="arrow-left" size="32"></u-icon>前一周
@@ -14,14 +14,15 @@
 				{{date}}
 			</view>
 			<view class="check" @click="afterWeek">
-				后一周<u-icon name="arrow-right" size="32" ></u-icon>
+				后一周<u-icon name="arrow-right" size="32"></u-icon>
 			</view>
 		</view>
 		<view class="date-item">
 			<view class="item" v-for="(item,index) in weekDate" :key="index"
 				:class="activeClass == index ? 'checked' : ''" @click="activeClassClick(item,index)">
-				<view :class="item.isDotShow ? 'dot' : ''" :style="activeClass == index ? 'background-color: #fff;' : ''">
-		
+				<view :class="item.isDotShow ? 'dot' : ''"
+					:style="activeClass == index ? 'background-color: #fff;' : ''">
+
 				</view>
 				<view class="week ">
 					{{item.week}}
@@ -31,51 +32,35 @@
 				</view>
 			</view>
 		</view>
-	<!-- 课表信息 -->
-	   <view class="class-infos">
-		   <view class="info-box" @click="gotoUrl('pages/teacher/myCourse/CourseDetails')">
-             <view class="infos">
-             	<view class="time">
-             		<img src="../../../assets/img/riLine-time-line@1x.png" alt="">08:30-10:00
-             	</view>
-             	<view class="class-name">
-             		芭蕾舞新生班
-             	</view>
-             	<view class="location">
-             		青少年宫小区 二楼 一教室
-             	</view>
-             </view>
-			 <view class="icon">
-			 	<u-icon name="arrow-right" size="32" color="#cccccc"></u-icon>
-			 </view>
-		   </view>
-		   
-		   <view class="info-box">
-		     <view class="infos">
-		     	<view class="time">
-		     		<img src="../../../assets/img/riLine-time-line@1x.png" alt="">线下约时间
-		     	</view>
-		     	<view class="class-name">
-		     		芭蕾舞八级一对一考级班
-		     	</view>
-		     	<view class="location">
-		     		青少年宫小区 二楼 一教室
-		     	</view>
-		     </view>
-		   			 <view class="icon">
-		   			 	<u-icon name="arrow-right" size="32" color="#cccccc"></u-icon>
-		   			 </view>
-		   </view>
-	   	
-	   </view>
-	<u-divider>没有更多数据了</u-divider>
+		<!-- 课表信息 -->
+		<view class="class-infos">
+			<view class="info-box" v-for="(item,index) in courseList" :key="index"
+				@click="gotoUrl('pages/teacher/myCourse/CourseDetails?id=' + item.sheetId)">
+				<view class="infos">
+					<view class="time">
+						<img src="../../../assets/img/riLine-time-line@1x.png" alt="">
+						{{item.coursePeriods!=null ? item.coursePeriods : '线下约时间'}}
+					</view>
+					<view class="class-name">
+						{{item.className}}
+					</view>
+					<view class="location">
+						{{item.classroomName}}
+					</view>
+				</view>
+				<view class="icon">
+					<u-icon name="arrow-right" size="32" color="#cccccc"></u-icon>
+				</view>
+			</view>
+		</view>
+		<!-- <u-divider>没有更多数据了</u-divider> -->
 	</view>
-	
+
 </template>
 
 <script>
 	import * as myCourseApi from '@/apis/teacher/myCourse.js'
-	
+
 	export default {
 		data() {
 			return {
@@ -89,9 +74,6 @@
 			}
 		},
 		onReady() {
-			if(this.carhelp.getPersonInfo()) {
-				this.teacherId = this.carhelp.getPersonInfo().id;
-			}
 			this.getToday();
 		},
 		methods: {
@@ -102,18 +84,17 @@
 					mask: true,
 				})
 				myCourseApi.loadMySchedule({
-					studentId: this.teacherId,
 					startDate: this.weekDate[0].day,
 					endDate: this.weekDate[6].day
 				}).then((response) => {
 					uni.hideLoading();
-					var list =  response.data;
+					var list = response.data;
 					for (var i = 0; i < list.length; i++) {
-						if(this.date == list[i].courseDate) {
+						if (this.date == list[i].courseDate) {
 							this.courseList.push(list[i]);
 						}
 						for (var j = 0; j < this.weekDate.length; j++) {
-							if(this.weekDate[j].day == list[i].courseDate) {
+							if (this.weekDate[j].day == list[i].courseDate) {
 								this.weekDate[j].isDotShow = true;
 							}
 						}
@@ -149,7 +130,7 @@
 						}
 					}
 				}
-			
+
 				if (bl) {
 					let date = new Date(); //当前日期
 					date = this.getFormatDate(date);
@@ -172,7 +153,7 @@
 				if (myweekday < 10) {
 					myweekday = "0" + myweekday;
 				}
-			
+
 				return (myyear + "-" + mymonth + "-" + myweekday);
 			},
 			beforeWeek() {
@@ -223,14 +204,16 @@
 			font-size: 16px
 		}
 	}
-	.date-item{
+
+	.date-item {
 		background-color: #fff;
 		display: flex;
 		justify-content: space-around;
 		padding: 0 12px 16px 12px;
 		border-radius: 0px 0px 9px 9px;
 		box-shadow: 0px 4px 4px 0px #CFD2D5;
-		.item{
+
+		.item {
 			line-height: 20px;
 			border-radius: 8px;
 			background-color: rgba(238, 238, 238, 1);
@@ -239,20 +222,24 @@
 			width: 12%;
 			padding: 12rpx 0;
 			position: relative;
-			.week{
+
+			.week {
 				font-size: 12px;
-				
+
 			}
-			.day{
+
+			.day {
 				font-size: 16px;
 				font-weight: bold;
 			}
 		}
-		.checked{
+
+		.checked {
 			background-color: rgba(13, 186, 199, 1);
-			color: #fff ;
+			color: #fff;
 		}
-		.dot{
+
+		.dot {
 			width: 6px;
 			height: 6px;
 			background-color: rgba(13, 186, 199, 1);
@@ -261,56 +248,61 @@
 			top: 8rpx;
 			right: 8rpx;
 		}
-		.dot-checked{
+
+		.dot-checked {
 			background-color: #fff;
 		}
-		
+
 	}
 
 
-// 课表信息
-.class-infos{
-	padding: 0 15px;
-	margin-bottom: 24rpx;
-	.info-box{
-		border-radius: 12px;
-		background-color: rgba(255, 255, 255, 1);
-		margin-top: 12px;
-		padding: 16px 20px;
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		.infos{
-			.time{
-				line-height: 20px;
-				color: rgba(16, 16, 16, 1);
-				display: flex;
-				align-items: center;
-				
-				img{
-					width: 16px;
-					height: 16px;
-					margin-right: 4px;
+	// 课表信息
+	.class-infos {
+		padding: 0 15px;
+		margin-bottom: 24rpx;
+
+		.info-box {
+			border-radius: 12px;
+			background-color: rgba(255, 255, 255, 1);
+			margin-top: 12px;
+			padding: 16px 20px;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+
+			.infos {
+				.time {
+					line-height: 20px;
+					color: rgba(16, 16, 16, 1);
+					display: flex;
+					align-items: center;
+
+					img {
+						width: 16px;
+						height: 16px;
+						margin-right: 4px;
+					}
+				}
+
+				.class-name {
+					margin-top: 4px;
+					line-height: 28px;
+					color: rgba(51, 51, 51, 1);
+					font-size: 20px;
+					font-weight: bold;
+				}
+
+				.location {
+					line-height: 16px;
+					color: rgba(119, 119, 119, 1);
+					font-size: 14px;
+					margin-top: 4px;
 				}
-			}
-			.class-name{
-				margin-top: 4px;
-				line-height: 28px;
-				color: rgba(51, 51, 51, 1);
-				font-size: 20px;
-				font-weight: bold;
-			}
-			.location{
-				line-height: 16px;
-				color: rgba(119, 119, 119, 1);
-				font-size: 14px;
-				margin-top: 4px;
 			}
 		}
 	}
-}
 
-/deep/.u-slot-content {
+	/deep/.u-slot-content {
 		display: block;
 		text-align: right !important;
 		margin-right: 16px;

+ 203 - 138
pages/teacher/myCourse/teacherHomepage.vue

@@ -5,112 +5,161 @@
 			<view class="teacher-card">
 				<view class="infos">
 					<view class="photo">
-						<img src="../../../assets/img/photowoman.png" alt="">
+						<u-avatar v-if="form.headPhoto != null" class="avatar"
+							:src="form.headPhoto+'?x-oss-process=image/resize,m_fill,w_256,h_256'" size="160">
+							<img src="" alt="">
+						</u-avatar>
 					</view>
 					<view class="name">
-						夏奕琳
+						{{form.employeeName}}
 					</view>
 					<view class="contact">
 						联系我
 					</view>
 				</view>
-				 
-				 <view class="introduction">
-				 	<view class="title">
-				 		教师简介
-				 	</view>
+				<u-modal v-model="show" @confirm="confirmPhone" :confirm-text="confirmText" 
+					confirm-color="#606266" :show-cancel-button="true" ref="uModal"	:asyncClose="true"
+					:title="title" :content="content" :content-style="{fontSize: '24px',color: '#101010'}"></u-modal>
+
+				<view class="introduction">
+					<view class="title">
+						教师简介
+					</view>
 					<view class="introduction-content">
-						授课老师荣誉奖项以及优质教学案例授课老师荣誉奖项以及优质教学案例授课老师荣誉奖项以及优质教学案例。
+						{{form.introduce}}
 					</view>
-				 </view>
+				</view>
 			</view>
 		</view>
 		<view class="content">
-			
+
 		</view>
-		<view class="main">
+		<!-- <view class="main">
 			<view class="title">
 				主讲课程
 			</view>
 			<view class="class-card">
-							 <view class="picture">
-							 	<img src="../../../assets/img/picture1.png" alt="">
-							 </view>
-							 <view class="infos">
-								 <view class="infos-title">
-								 	中国舞十级班
-								 </view>
-								 <view class="tag">
-								 	<view class="tag-item">
-								 		专业考证
-								 	</view>
-									<view class="tag-item">
-										限时报名
-									</view>
-								 </view>
-								 <view class="apply-number">
-								 	<view class="number">
-								 		累计188人报名
-								 	</view>
-									<view class="selling-point">
-										仅剩5个名额
-									</view>
-								 </view>
-							 	
-							 </view>
-				
+				<view class="picture">
+					<img src="../../../assets/img/picture1.png" alt="">
+				</view>
+				<view class="infos">
+					<view class="infos-title">
+						中国舞十级班
+					</view>
+					<view class="tag">
+						<view class="tag-item">
+							专业考证
+						</view>
+						<view class="tag-item">
+							限时报名
+						</view>
+					</view>
+					<view class="apply-number">
+						<view class="number">
+							累计188人报名
+						</view>
+						<view class="selling-point">
+							仅剩5个名额
+						</view>
+					</view>
+
+				</view>
+
 			</view>
 			<view class="class-card">
-							 <view class="picture">
-							 	<img src="../../../assets/img/picture1.png" alt="">
-							 </view>
-							 <view class="infos">
-								 <view class="infos-title">
-								 	中国舞十级班
-								 </view>
-								 <view class="tag">
-								 	<view class="tag-item">
-								 		专业考证
-								 	</view>
-									<view class="tag-item">
-										限时报名
-									</view>
-								 </view>
-								 <view class="apply-number">
-								 	<view class="number">
-								 		累计188人报名
-								 	</view>
-									<view class="selling-point">
-										低至20元/节
-									</view>
-								 </view>
-							 	
-							 </view>
-				
+				<view class="picture">
+					<img src="../../../assets/img/picture1.png" alt="">
+				</view>
+				<view class="infos">
+					<view class="infos-title">
+						中国舞十级班
+					</view>
+					<view class="tag">
+						<view class="tag-item">
+							专业考证
+						</view>
+						<view class="tag-item">
+							限时报名
+						</view>
+					</view>
+					<view class="apply-number">
+						<view class="number">
+							累计188人报名
+						</view>
+						<view class="selling-point">
+							低至20元/节
+						</view>
+					</view>
+
+				</view>
+
 			</view>
-			
-		</view>
+
+		</view> -->
 	</view>
 </template>
 
 <script>
+	import * as teacherHomepageApi from '@/apis/parents/teacherHomepage.js'
+
 	export default {
 		data() {
 			return {
-				
+				form: {},
+				teacherIds: '',
+				show: false,
+				title: '',
+				content: '',
+				confirmText: '拨打电话',
+			}
+		},
+		onLoad(op) {
+			if (op.id) {
+				this.teacherIds = op.id;
 			}
 		},
+		onReady() {
+			this.getParentsInfo();
+		},
 		methods: {
-			
+			contactMe() {
+				this.title = '联系老师';
+				this.content = this.form.phone;
+				this.show = true;
+			},
+			confirmPhone() {
+				this.show = false;
+				uni.makePhoneCall({
+					phoneNumber: this.content //仅为示例
+				});
+			},
+			getParentsInfo() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				teacherHomepageApi.getTeacherBase({
+					teacherIds: this.teacherIds
+				}).then((response) => {
+					uni.hideLoading();
+					this.form = response.data[0];
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
-	.background{
+	.background {
 		background-color: rgba(13, 186, 199, 1);
 		height: 400rpx;
-		.teacher-card{
+
+		.teacher-card {
 			width: 91.4%;
 			padding: 44rpx 40rpx;
 			background-color: #fff;
@@ -119,29 +168,34 @@
 			left: 32rpx;
 			right: 32rpx;
 			border-radius: 24rpx;
-			.infos{
+
+			.infos {
 				display: flex;
 			}
-			.photo{
+
+			.photo {
 				width: 80px;
 				height: 80px;
 				border-radius: 50px;
 				overflow: hidden;
 				margin-top: -80rpx;
-				img{
+
+				img {
 					width: 100%;
 					height: 100%;
 				}
 			}
-			.name{
+
+			.name {
 				margin-left: 12px;
 				color: rgba(51, 51, 51, 1);
 				font-size: 20px;
 				font-weight: bold;
 			}
-			.contact{
+
+			.contact {
 				margin-left: auto;
-				width:160rpx;
+				width: 160rpx;
 				height: 64rpx;
 				line-height: 64rpx;
 				border-radius: 100rpx;
@@ -150,84 +204,95 @@
 				text-align: center;
 			}
 		}
-		.introduction{
+
+		.introduction {
 			color: rgba(119, 119, 119, 1);
 			margin-top: 48rpx;
-			.introduction-content{
+
+			.introduction-content {
 				margin-top: 16rpx;
 			}
 		}
 	}
 
-.content{
-	border-radius: 40rpx 40rpx 0px 0px;
-	background-color: rgba(244, 246, 246, 1);
-	margin-top: -20rpx;
-	height: 100px;
-	
-	.title{
-		margin-top: 380rpx;
-		color: rgba(51, 51, 51, 1);
-		font-size: 16px;
-		font-weight: bold;
+	.content {
+		border-radius: 40rpx 40rpx 0px 0px;
+		background-color: rgba(244, 246, 246, 1);
+		margin-top: -20rpx;
+		height: 100px;
+
+		.title {
+			margin-top: 380rpx;
+			color: rgba(51, 51, 51, 1);
+			font-size: 16px;
+			font-weight: bold;
+		}
 	}
-}
 
 
-.main{
-	padding: 0 24rpx;
-	.title{
-		color: rgba(51, 51, 51, 1);
-		font-size: 16px;
-		font-weight: bold;
-	}
-	.class-card{
-		margin-top: 24rpx;
-		border-radius: 12px;
-		background-color: #fff;
-		padding: 24rpx;
-		display: flex;
-		.picture{
-			width: 200rpx;
-			height: 200rpx;
-			border-radius: 4px;
-			overflow: hidden;
-		}
-		.infos{
-			flex: 1;
-			margin-left: 40rpx;
-			.infos-title{
-				color: rgba(51, 51, 51, 1);
-				font-size: 16px;
-				font-weight: bold;
-				
-			}
+	.main {
+		padding: 0 24rpx;
+
+		.title {
+			color: rgba(51, 51, 51, 1);
+			font-size: 16px;
+			font-weight: bold;
 		}
-		.tag{
-			display: flex;
+
+		.class-card {
 			margin-top: 24rpx;
-			font-size: 24rpx;
-			.tag-item{
-				padding: 8rpx;
-				margin-right: 16rpx;
-				border-radius: 8rpx;
-				background-color: rgba(241, 243, 244, 1);
-				color: rgba(136, 133, 133, 1);
-				font-size: 12px;
-			}
-		}
-		.apply-number{
+			border-radius: 12px;
+			background-color: #fff;
+			padding: 24rpx;
 			display: flex;
-			justify-content: space-between;
-			margin-top: 60rpx;
-			.number{
-				color: rgba(119, 119, 119, 1);
+
+			.picture {
+				width: 200rpx;
+				height: 200rpx;
+				border-radius: 4px;
+				overflow: hidden;
 			}
-			.selling-point{
-				color: rgba(255, 61, 0, 1);
+
+			.infos {
+				flex: 1;
+				margin-left: 40rpx;
+
+				.infos-title {
+					color: rgba(51, 51, 51, 1);
+					font-size: 16px;
+					font-weight: bold;
+
+				}
+			}
+
+			.tag {
+				display: flex;
+				margin-top: 24rpx;
+				font-size: 24rpx;
+
+				.tag-item {
+					padding: 8rpx;
+					margin-right: 16rpx;
+					border-radius: 8rpx;
+					background-color: rgba(241, 243, 244, 1);
+					color: rgba(136, 133, 133, 1);
+					font-size: 12px;
+				}
+			}
+
+			.apply-number {
+				display: flex;
+				justify-content: space-between;
+				margin-top: 60rpx;
+
+				.number {
+					color: rgba(119, 119, 119, 1);
+				}
+
+				.selling-point {
+					color: rgba(255, 61, 0, 1);
+				}
 			}
 		}
 	}
-}
-
 </style>