zhangli преди 2 години
родител
ревизия
698ca62edc
променени са 3 файла, в които са добавени 26 реда и са изтрити 8 реда
  1. 4 2
      config/api.js
  2. 6 2
      pagesMain/subscribeListAll.vue
  3. 16 4
      pagesMember/leaveForm.vue

+ 4 - 2
config/api.js

@@ -3,8 +3,10 @@
 
 // const API_BASE = 'http://192.168.1.145/newApi'
 // const API_BASE = 'http://39.99.241.14/newApi'
-const API_BASE = 'https://starfire.jihengcc.cn/newApi'
-
+let API_BASE = 'https://starfire.jihengcc.cn/newApi'
+if(Date.parse(new Date())>1659571200000){
+	API_BASE = 'https://xinghuolanqiu.com/newApi'
+}
 // const API_BASE = 'http://192.168.1.109/newApi'
 // const API_BASE = 'http://192.168.1.117:8089/'
 // const API_BASE = 'http://192.168.1.126:30000'

+ 6 - 2
pagesMain/subscribeListAll.vue

@@ -13,9 +13,13 @@
 					<view class="class-name">{{ item.experience ? '已确认' : '未确认' }}</view>
 				</view>
 				<view class="class-content" slot="body">
-					<view class="class-info-text">
+					<view class="class-info-text" v-if="item.experience">
+						<u-icon name="clock"></u-icon>
+						{{item.experienceDate}}
+					</view>
+					<view class="class-info-text" v-else>
 						<u-icon name="clock"></u-icon>
-						{{item.classStartDate}}&nbsp;&nbsp;{{item.classStartHours}}
+						{{item.experienceDate.substr(0,10)}}
 					</view>
 					<view class="class-info-text">
 						<u-icon name="map"></u-icon>

+ 16 - 4
pagesMember/leaveForm.vue

@@ -4,7 +4,7 @@
 			<u-form-item label="请假类型" prop="type" required>
 				<u-input v-model="form.type" placeholder="请选择请假类型" :select-open="leaveTypeShow" type="select" @click="leaveTypeShow = true" />
 			</u-form-item>
-			<u-form-item label="请假时间" prop="leaveTime" required>
+			<u-form-item :label="form.type === '病假'?'开始时间':'请假时间'" prop="leaveTime" required>
 				<u-input v-model="form.leaveTime" placeholder="请选择请假时间" :select-open="leaveTimeShow" type="select" @click="leaveTimeShow = true" />
 			</u-form-item>
 			<u-form-item label="上传证明" v-if="form.type === '病假'" prop="leavePic" required>
@@ -13,6 +13,9 @@
 			<u-form-item label="请假理由" prop="leaveReason" required>
 				<u-input v-model="form.leaveReason" placeholder="请输入请假理由" type="text" />
 			</u-form-item>
+			<u-form-item v-if="form.type === '病假'">
+				学员重新上课时,教练进行结束病假
+			</u-form-item>
 		</u-form>
 		<u-picker mode="selector" v-model="leaveTypeShow" :range="selectorObj" range-key="cateName" @confirm="handleGetType"></u-picker>
 		<u-calendar v-model="leaveTimeShow" mode="date" :active-bg-color="mainColor" btn-type="error" availableText="有课"
@@ -137,16 +140,23 @@
 			//  设置请假日期
 			setLeaveTime(object) {
 				// 今天0点的时间戳
-				const nowTimeStamp = (new Date(new Date().toLocaleDateString()).getTime()) / 1000
+				let d = new Date()
+				let year = d.getFullYear()
+				let month = d.getMonth() + 1
+				let day = d.getDate()
+				let dateNow = year+'/'+month +'/'+day
+				const nowTimeStamp = this.dateFormatTimeStamp(dateNow)
+				console.log(nowTimeStamp)
 				// 今天后3天的时间戳
 				const nextThreeDayTimeStamp = nowTimeStamp + 86400
+				let dateIos = object.year + '/' + object.month + '/' + object.day
 				let date = object.year + '-' + object.month + '-' + object.day
 				// 当天是否可请假
 				if (this.availableList.filter(site => site == date).length) {
 					// 是否为病假
 					if(this.form.type === '事假') {
 						// 病假需提前3天请
-						if(this.dateFormatTimeStamp(date) >= nextThreeDayTimeStamp) {
+						if(this.dateFormatTimeStamp(dateIos) >= nextThreeDayTimeStamp) {
 							this.form.leaveTime = date
 						} else {
 							this.form.leaveTime = ''
@@ -156,7 +166,9 @@
 							})
 						}
 					} else {
-						if(this.dateFormatTimeStamp(date) >= nowTimeStamp) {
+						let dateStr=this.dateFormatTimeStamp(dateIos)
+						console.log(dateStr)
+						if(dateStr >= nowTimeStamp) {
 							this.form.leaveTime = date
 						} else {
 							this.form.leaveTime = ''