wkyy 2 years ago
parent
commit
92d5d30ebc

BIN
assets/img/riFill-book-open-fill@1x.png


+ 18 - 11
pages/parents/homePage/homePage.vue

@@ -48,10 +48,10 @@
 				<view class="item">
 					<view class="icon-box"
 						style="background: linear-gradient(180deg, rgba(91,160,242,1) 1%,rgba(26,118,226,1) 100%);">
-						<img src="../../../assets/img/riFill-calendar-2-fill@1x.png" alt="">
+						<img src="../../../assets/img/riFill-book-open-fill@1x.png" alt="">
 					</view>
 					<view class="text">
-						机构报名
+						我的课程
 					</view>
 				</view>
 				<view class="item">
@@ -93,10 +93,10 @@
 				<view class="item">
 					<view class="icon-box"
 						style="background: linear-gradient(180deg, rgba(91,160,242,1) 1%,rgba(26,118,226,1) 100%);">
-						<img src="../../../assets/img/riFill-file-edit-fill@1x.png" alt="">
+						<img src="../../../assets/img/riFill-calendar-2-fill@1x.png" alt="">
 					</view>
 					<view class="text">
-						校长信箱
+						机构报名
 					</view>
 				</view>
 			</view>
@@ -322,17 +322,11 @@
 			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.getLatelyCourseList();
-			}
-
 			this.getStudentList();
 		},
 		methods: {
 			showClick() {
-				if(this.studentId) {
+				if(this.studentList.length != 0) {
 					this.show = true;
 				} else{
 					uni.showToast({
@@ -438,6 +432,19 @@
 							label: list[i].studentName
 						})
 					}
+					
+					if(this.studentList.length != 0) {
+						if (this.carhelp.getStudentId()) {
+							this.studentId = this.carhelp.getStudentId().studentId;
+							this.getStudentDetail();
+							this.getLatelyCourseList();
+						} else {
+							this.studentId = this.studentList[0].value;
+							this.carhelp.setStudentId({studentId: this.studentId});
+							this.getStudentDetail();
+							this.getLatelyCourseList();
+						}
+					}
 				}).catch(error => {
 					uni.showToast({
 						title: error,

+ 8 - 1
pages/teacher/callNames/classCall.vue

@@ -279,7 +279,7 @@
 					this.stopStudentList = response.data.stopStudentList;
 					
 					for (var i = 0; i < list.length; i++) {
-						if(list[i].rollCallResult == '1') {
+						if(list[i].rollCallResult == '1' || list[i].rollCallResult == null) {
 							this.studentList.push(list[i]);
 						}
 					}
@@ -305,6 +305,13 @@
 				})
 			},
 			save() {
+				if(this.current == 0) {
+					for (var i = 0; i < this.rollCallList.length; i++) {
+						if(this.rollCallList[i].rollCallResult == null) {
+							this.rollCallList[i].rollCallResult = '1';
+						}
+					}
+				} 
 				this.getRollCallSignIn();
 			},
 			showStudent(item) {