Browse Source

考试预约-判断是否显示预约考试按钮

Tang 3 years ago
parent
commit
0dd4d8011a
1 changed files with 9 additions and 1 deletions
  1. 9 1
      pages2/exam/exam_appointment.vue

+ 9 - 1
pages2/exam/exam_appointment.vue

@@ -112,7 +112,7 @@
 				<u-line color="#EEEEEE" />
 				<view class="foot" v-if="activeList.subscribeStatus === 1">
 					<view class="btn" @click="hideModel">知道了</view>
-					<view class="btn cancel" @click="cancelBtn">取消预约</view>
+					<view class="btn cancel" v-if="isShowFun(activeList.applyEndTime)" @click="cancelBtn">取消预约</view>
 				</view>
 				<view class="foot" v-else><view class="abtns" @click="hideModel">知道了</view></view>
 			</view>
@@ -185,6 +185,14 @@ export default {
 		};
 	},
 	methods: {
+		isShowFun(times){
+			var timestamp=parseInt(new Date().getTime() / 1000)
+			if(times < timestamp){
+				return false
+			}else{
+				return true
+			}
+		},
 		showDetails(item) {
 			this.activeList = JSON.parse(JSON.stringify(item));
 			this.details_show = true;