修改bug2
This commit is contained in:
@@ -97,23 +97,16 @@
|
||||
<uv-button type="primary" @click="goto_study()">去学习</uv-button>
|
||||
</view>
|
||||
<view class="fl1" @click="goto_practice()">
|
||||
<uv-button type="primary" :disabled="practiceButtonDisabled" >去练习</uv-button>
|
||||
<uv-button type="primary" :disabled="practiceButtonDisabled">去练习</uv-button>
|
||||
</view>
|
||||
<view class="fl1" @click="goto_examination()">
|
||||
<uv-button type="primary" :disabled="examinationButtonDisabled" >
|
||||
去考试
|
||||
</uv-button>
|
||||
<uv-button type="primary" :disabled="examinationButtonDisabled">去考试</uv-button>
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="tabAct === 2">
|
||||
<uv-button
|
||||
type="primary"
|
||||
class="send_evaluate"
|
||||
:disabled="isPreview === 'preview'"
|
||||
@click="common.navigateTo('/pages/courseDetail/submit?crsId=' + crsId + '&imgId=' + form.imgId)"
|
||||
>
|
||||
发布评价
|
||||
</uv-button>
|
||||
<view class="fl1" @click="goto_submit()">
|
||||
<uv-button type="primary" class="send_evaluate" :disabled="isPreview === 'preview'">发布评价</uv-button>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
@@ -145,7 +138,7 @@
|
||||
const scrollTop = ref(0);
|
||||
const practiceButtonDisabled = computed(() => isPreview.value === 'preview' || form.value.examStat === '01');
|
||||
const examinationButtonDisabled = computed(() => isPreview.value === 'preview' || form.value.examStat !== '00');
|
||||
|
||||
|
||||
const tabSwitch = (item) => {
|
||||
tabAct.value = item.index;
|
||||
};
|
||||
@@ -157,16 +150,14 @@
|
||||
};
|
||||
|
||||
const getData = async () => {
|
||||
common.loading()
|
||||
try{
|
||||
common.loading();
|
||||
try {
|
||||
const { body } = await getCourseDetailApi({
|
||||
crsId: crsId.value
|
||||
});
|
||||
form.value = body;
|
||||
} catch(e) {
|
||||
|
||||
}
|
||||
common.hideLoading()
|
||||
} catch (e) {}
|
||||
common.hideLoading();
|
||||
};
|
||||
const toStudyPrgh = (info) => {
|
||||
common.navigateTo(
|
||||
@@ -191,6 +182,11 @@
|
||||
scrollTop.value = e.detail.scrollTop;
|
||||
};
|
||||
|
||||
// 去评论
|
||||
const goto_submit = async () => {
|
||||
if (isPreview.value === 'preview') return common.msg('预览课程不可以评价。');
|
||||
common.navigateTo('/pages/courseDetail/submit?crsId=' + crsId.value + '&imgId=' + form.value.imgId);
|
||||
};
|
||||
// 去考试
|
||||
const goto_examination = async () => {
|
||||
if (isPreview.value === 'preview') return common.msg('预览课程不允许考试');
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<view class="question">
|
||||
<view class="grey">剩余时间</view>
|
||||
<uv-count-down
|
||||
class="countdown_time"
|
||||
ref="countDownRef"
|
||||
:time="paperData.limitTm * 1000"
|
||||
format="HH:mm:ss"
|
||||
@@ -465,16 +466,10 @@
|
||||
}
|
||||
func.then((res) => {
|
||||
// 判断是否需要查分
|
||||
const flagQueryDetail = res.body.flagQueryDetail===''?res.body.flagQuery:res.body.flagQueryDetail
|
||||
common.redirectTo(
|
||||
`/pages/examination/result?execId=${res.body.execId}&flagQuery=${res.body.flagQuery}&flagQueryDetail=${res.body.flagQueryDetail}&examLenTm=${examLenTm}&papersName=${paperData.papersName}&papersId=${paperData.papersId}&mode=${mode}&crsId=${paperData.crsId}`
|
||||
`/pages/examination/result?execId=${res.body.execId}&flagQuery=${res.body.flagQuery}&flagQueryDetail=${flagQueryDetail}&examLenTm=${examLenTm}&papersName=${paperData.papersName}&papersId=${paperData.papersId}&mode=${mode}&crsId=${paperData.crsId}`
|
||||
);
|
||||
|
||||
// if (res.body.flagQuery === 'Y') {
|
||||
// // 需要查分
|
||||
// } else {
|
||||
// // todo 此处应该有个弹窗交代下结果
|
||||
// common.navigateBack();
|
||||
// }
|
||||
})
|
||||
.catch((res) => {
|
||||
console.log('error', res);
|
||||
@@ -723,14 +718,14 @@
|
||||
.question {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// background-color: red;
|
||||
width: 242rpx;
|
||||
color: red;
|
||||
|
||||
flex-wrap: nowrap;
|
||||
.grey {
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
.countdown_time {
|
||||
white-space: nowrap;
|
||||
}
|
||||
:deep(.uv-count-down__text) {
|
||||
color: #ffffff !important;
|
||||
font-weight: 600;
|
||||
@@ -740,6 +735,7 @@
|
||||
|
||||
.grey {
|
||||
color: #b6e2ff;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.bold {
|
||||
|
||||
@@ -83,11 +83,10 @@
|
||||
:current="sheet_swiper_index"
|
||||
@change="sheet_swiper_change"
|
||||
>
|
||||
<!-- 循环渲染分组后的数组 -->
|
||||
<swiper-item v-for="(group, groupIndex) in groupedTopicList" :key="groupIndex">
|
||||
<uv-grid :col="5" class="sheet_table" @click="sheet_click">
|
||||
<uv-grid-item v-for="(item, index) in group" :key="index">
|
||||
<view class="circle" :class="{ current: index === sheet_index }">
|
||||
<uv-grid-item v-for="(item, index) in group" :key="index" :name="groupIndex * 10 + index">
|
||||
<view class="circle" :class="completedListStatus[groupIndex * 10 + index]">
|
||||
{{ groupIndex * 10 + index + 1 }}
|
||||
</view>
|
||||
</uv-grid-item>
|
||||
@@ -96,7 +95,6 @@
|
||||
</swiper>
|
||||
<view class="swiper-dots"></view>
|
||||
</view>
|
||||
|
||||
<!-- 获取答题结果时候的图片 -->
|
||||
<view class="loading-pass-image-div" v-if="pass_status === 0 && flagQueryDetail === 'Y'">
|
||||
<image src="@/static/images/examination/getting_robot.png" mode="widthFix" class="await_img img"></image>
|
||||
@@ -107,7 +105,6 @@
|
||||
<view class="tip">您暂无权限查看此试卷详情</view>
|
||||
</view>
|
||||
<view
|
||||
class=""
|
||||
v-show="index === sheet_index"
|
||||
:class="getStatusClass(index)"
|
||||
v-for="(item, index) in topicList"
|
||||
@@ -160,11 +157,21 @@
|
||||
}
|
||||
return groups;
|
||||
});
|
||||
// 答题卡判断每道题的状态
|
||||
const completedListStatus = computed(() => {
|
||||
return topicList.map((res) => {
|
||||
if(res.judgeResult === 'P') {
|
||||
return 'success'
|
||||
}else if(res.judgeResult === 'U' && res.anserResult !== '') {
|
||||
return 'error'
|
||||
}
|
||||
});
|
||||
});
|
||||
const flagQuery = ref('N');
|
||||
const flagQueryDetail = ref('N');
|
||||
const scrollTop = ref(0);
|
||||
const topic = ref();
|
||||
const sheet_index = ref(-1);
|
||||
const sheet_index = ref(0);
|
||||
const statusImage = computed(() => {
|
||||
// 根据状态返回对应的图片资源
|
||||
if (pass_status.value === 1) {
|
||||
@@ -352,11 +359,7 @@
|
||||
margin-left: $bg-margin-left;
|
||||
}
|
||||
|
||||
.current {
|
||||
background-color: rgba(0, 102, 255, 0.6);
|
||||
border-color: #0066ff;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.scroll-Y {
|
||||
// max-height: calc(100vh - var(--status-bar-height) - 70rpx - 70rpx - 40rpx - 64rpx - 68rpx - 60rpx);
|
||||
height: calc(100vh - var(--status-bar-height) - 70rpx - 10rpx);
|
||||
@@ -438,7 +441,12 @@
|
||||
}
|
||||
|
||||
.swiper-dots {
|
||||
height: 20rpx;
|
||||
display: none;
|
||||
height: 10rpx;
|
||||
width: 80rpx;
|
||||
margin: 0 auto;
|
||||
border-radius: 10rpx;
|
||||
background-color: #FCE8E9;
|
||||
}
|
||||
|
||||
.sheet_table {
|
||||
@@ -457,39 +465,34 @@
|
||||
margin: 20rpx;
|
||||
}
|
||||
|
||||
.circle.success {
|
||||
// 已完成
|
||||
background-color: #E7F8ED;
|
||||
border-color: #15B859;
|
||||
color: #15B859;
|
||||
}
|
||||
|
||||
.circle.error {
|
||||
// 已完成
|
||||
background-color: #FCE8E9;
|
||||
border-color: #F5212D;
|
||||
color: #F5212D;
|
||||
}
|
||||
|
||||
.current {
|
||||
background-color: rgba(0, 102, 255, 0.6);
|
||||
border-color: #0066ff;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.completed {
|
||||
// 已完成
|
||||
background-color: rgba(0, 102, 255, 0.1);
|
||||
border-color: #0066ff;
|
||||
color: #0066ff;
|
||||
}
|
||||
|
||||
.mark,
|
||||
.completed.mark {
|
||||
background-color: rgba(232, 181, 49, 0.1);
|
||||
color: #e8b531;
|
||||
border-color: #e8b531;
|
||||
}
|
||||
|
||||
.current.mark {
|
||||
// 已完成
|
||||
background-color: rgba(0, 102, 255, 0.6);
|
||||
color: #ffffff;
|
||||
border-color: #e8b531;
|
||||
// background-color: rgba(0, 102, 255, 0.6);
|
||||
// border-color: #0066ff;
|
||||
// color: #ffffff;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 主内容框
|
||||
.main-div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 34rpx 0 30rpx 0;
|
||||
padding: 34rpx 0 20rpx 0;
|
||||
margin: 30rpx 28rpx 20rpx 28rpx;
|
||||
border-radius: 16rpx;
|
||||
position: relative;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<view class="nav-div">
|
||||
<view class="title ellipsis-text">
|
||||
{{ paperData.name }}
|
||||
|
||||
</view>
|
||||
<view class="back_div" @click="exit_practice">
|
||||
<image :src="practiceExitIcon()" class="img"></image>
|
||||
@@ -18,11 +19,12 @@
|
||||
</view>
|
||||
<view class="question">
|
||||
<view class="grey">练习时长</view>
|
||||
<view class="">
|
||||
<view class="countdown_time">
|
||||
{{ formatSeconds(practiceTime) }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="progress">
|
||||
<uv-line-progress
|
||||
:percentage="progress"
|
||||
@@ -703,12 +705,14 @@
|
||||
.question {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// background-color: red;
|
||||
width: 242rpx;
|
||||
|
||||
flex-wrap: nowrap;
|
||||
.grey {
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
.countdown_time{
|
||||
white-space: nowrap;
|
||||
}
|
||||
color: #ffffff;
|
||||
font-weight: 600;
|
||||
font-size: 26rpx;
|
||||
@@ -716,6 +720,7 @@
|
||||
|
||||
.grey {
|
||||
color: #b6e2ff;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.bold {
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
<!-- 主体 -->
|
||||
<view class="content">
|
||||
<itemVue :item="item" v-for="item in data_list"></itemVue>
|
||||
<list-no-data v-if="total == 0 && status == 'nomore'"></list-no-data>
|
||||
<uv-load-more v-if="total != 0" :status="status" loadmore-text="轻轻上拉加载" :height="30"></uv-load-more>
|
||||
<list-no-data v-if="total == 0 && status == 'nomore'">暂无数据</list-no-data>
|
||||
<uv-load-more v-if="total !== 0" :status="status" loadmore-text="轻轻上拉加载" :height="30"></uv-load-more>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user