Browse Source

Merge branch 'v3' of http://git.jihengcc.cn/starfire/spark-coach into v3

zhangli 2 years ago
parent
commit
3a4b95936f
3 changed files with 16 additions and 15 deletions
  1. 1 1
      config/api.js
  2. 5 3
      pagesClass/classDetail.vue
  3. 10 11
      pagesClass/signForm.vue

+ 1 - 1
config/api.js

@@ -7,7 +7,7 @@
 // const API_BASE = 'http://192.168.1.109/newApi'
 const API_BASE = 'http://192.168.1.145/newApi'
 // const API_BASE = 'http://192.168.1.126:30000'
-//const API_BASE = 'http://192.168.1.117:8089'
+// const API_BASE = 'http://192.168.1.117:8089'
 
 module.exports = {
 	//  微信授权登录

+ 5 - 3
pagesClass/classDetail.vue

@@ -24,9 +24,9 @@
 		<u-card :title="'学员信息(' + getStudentsNumber(1) + ')'" title-size="32" margin="0px 0px 10px 0px" :head-style="cardStyle">
 			<u-grid :col="3" slot="body" :border="false">
 				<u-grid-item v-for="(item, index) in classInfo.studentSignList" :key="index" :custom-style="gridCustomStyle" @click="goToStudentInfo(item)">
-					<view class="class-student-col" :class="item.state ? 'student-active' : ''">
+					<view class="class-student-col">
 						{{item.name}}
-						<u-icon name="bookmark" :color="mainColor" size="48"></u-icon>
+						<u-icon :name="item.state == 1 ? 'bookmark-fill' : 'bookmark'" :color="mainColor" size="48"></u-icon>
 					</view>
 				</u-grid-item>
 			</u-grid>
@@ -148,6 +148,7 @@
 				classId: '',
 				studentId: '',
 				studentName: '',
+				recordId: '',
 				classInfo: {
 					name: '',
 					classStartDate: '',
@@ -312,12 +313,13 @@
 			handleOtherClick(item) {
 				this.studentId = item.id
 				this.studentName = item.name
+				this.recordId = item.leaveRecordId
 				this.leaveOtherShow = true
 			},
 			// 病假知晓
 			handleEndClick() {
 				NET.request(API.leaveLessonsEndOk,{
-					classId:parseInt(this.classId), studentId:parseInt(this.studentId)
+					recordId:parseInt(this.recordId), studentId:parseInt(this.studentId)
 				},'POST').then(res=> {
 					if(res.status == 10000) {
 						this.$refs.uTips.show({

+ 10 - 11
pagesClass/signForm.vue

@@ -144,21 +144,20 @@
 			},
 			//  提交表单
 			submitForm() {
-				console.log(this.studentList)
 				NET.request(API.submitSignForm, {
 					classId: this.classId,
 					signStudentIdList: this.studentList.filter(site => site.state == 0 && site.checked).map(site => {
-						if (site.fileId) {
-							return {
-								id: site.id,
-								fileId: site.fileId,
-							}
-						} else {
-							return {
-								id: site.id,
-							}
+					if (site.fileId) {
+						return {
+							id: site.id,
+							fileId: site.fileId,
 						}
-					})
+					} else {
+						return {
+							id: site.id,
+						}
+					}
+				})
 				}, 'POST').then(res => {
 					this.$refs.uTips.show({
 						title: '签到成功',