提交BUG
This commit is contained in:
+2
-2
@@ -6,7 +6,7 @@ ENV = 'development'
|
||||
|
||||
|
||||
# app入口
|
||||
VITE_APP_BASE_API_Url = 'http://25.16.122.65:7001'
|
||||
#VITE_APP_BASE_API_Url = 'http://25.16.122.65:7001'
|
||||
#VITE_APP_BASE_API_Url = 'http://25.16.122.91:9786'
|
||||
#VITE_APP_BASE_API_Url = 'http://25.18.122.66:9786'
|
||||
|
||||
@@ -14,7 +14,7 @@ VITE_APP_BASE_API_Url = 'http://25.16.122.65:7001'
|
||||
|
||||
# VITE_APP_BASE_H5_API_Url = 'http://25.16.122.65:7001'
|
||||
# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.21:9786'
|
||||
# VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7002'
|
||||
VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7001'
|
||||
|
||||
# dev
|
||||
#VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001'
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</view>
|
||||
<view class="time">
|
||||
<text class="color_3">起止时间:</text>
|
||||
<text class="color_class">{{ item.examStartTm }}至{{ item.examEndTm }}</text>
|
||||
<text class="color_class">{{ item.examStartTm.substr(0 , 10) }}至{{ item.examEndTm.substr(0 , 10) }}</text>
|
||||
</view>
|
||||
<view class="num_div">
|
||||
<text class="color_3">完成人数:</text>
|
||||
|
||||
@@ -101,14 +101,14 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fixed_button_div">
|
||||
<view class="fixed_button_div" @click="goto_examination()">
|
||||
<uv-button
|
||||
type="primary"
|
||||
class="send_evaluate"
|
||||
:custom-style="customStyle"
|
||||
:throttleTime="300"
|
||||
:hairline="false"
|
||||
@click="goto_examination()"
|
||||
:disabled="isTimeInvalid"
|
||||
>
|
||||
开始考试
|
||||
</uv-button>
|
||||
@@ -152,9 +152,25 @@
|
||||
return sum + (item.tgtGrade || 0);
|
||||
}, 0)
|
||||
);
|
||||
const isTimeInvalid = computed(() => {
|
||||
// 检查detailData是否存在
|
||||
const startTime = new Date(detailData.examStartTm);
|
||||
const endTime = new Date(detailData.examEndTm);
|
||||
const currentTime = new Date();
|
||||
|
||||
// 检查日期是否有效
|
||||
if (isNaN(startTime.getTime()) || isNaN(endTime.getTime())) {
|
||||
return true; // 时间格式无效时视为有效(或根据需求调整)
|
||||
}
|
||||
const current = currentTime.getTime();
|
||||
const start = startTime.getTime();
|
||||
const end = endTime.getTime();
|
||||
// 未开始或已结束都返回true(不符合时间要求)
|
||||
return current < start || current > end;
|
||||
});
|
||||
|
||||
const goto_examination = async () => {
|
||||
if (detailData.limitTyp === 'SG' && detailData.examStatText === 'Y') return common.msg('考试已完成');
|
||||
|
||||
const startTime = new Date(detailData.examStartTm);
|
||||
const endTime = new Date(detailData.examEndTm);
|
||||
const currentTime = new Date(); // 当前时间
|
||||
@@ -168,7 +184,6 @@
|
||||
return common.msg('考试时间已结束');
|
||||
}
|
||||
}
|
||||
|
||||
common.loading();
|
||||
startTraExamPapersInfo({
|
||||
examId: detailData.examId
|
||||
|
||||
Reference in New Issue
Block a user