Merge branch 'develop' of http://25.13.9.101:9000/K17_AITS/tra-app into develop
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"
|
||||
@@ -109,22 +110,24 @@
|
||||
<image :src="optionErrorIcon('#000000')" class="img"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="sheet_table">
|
||||
<view
|
||||
class="sheet_table_item"
|
||||
v-for="(item, index) in topicList"
|
||||
:class="{
|
||||
current: index === questionNumber,
|
||||
mark: markList.includes(item.qnsId),
|
||||
completed: completedListStatus[index]
|
||||
}"
|
||||
@click="click_sheet_item(index)"
|
||||
>
|
||||
<view class="circle">
|
||||
{{ index + 1 }}
|
||||
<scroll-view :scroll-y="true" class="sheet_table_scroll" :show-scrollbar="false">
|
||||
<view class="sheet_table">
|
||||
<view
|
||||
class="sheet_table_item"
|
||||
v-for="(item, index) in topicList"
|
||||
:class="{
|
||||
current: index === questionNumber,
|
||||
mark: markList.includes(item.qnsId),
|
||||
completed: completedListStatus[index]
|
||||
}"
|
||||
@click="click_sheet_item(index)"
|
||||
>
|
||||
<view class="circle">
|
||||
{{ index + 1 }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="sheet_button">
|
||||
<uv-button
|
||||
class="button"
|
||||
@@ -344,7 +347,16 @@
|
||||
console.log('点击交卷', paperData);
|
||||
// 判断是否完成所有题目
|
||||
const completeList = topicList
|
||||
.filter((res) => !!(Array.isArray(res.my_answer) ? res.my_answer.length > 0 : res.my_answer?.anserResult !== ''))
|
||||
.filter((res) => {
|
||||
const myAnswer = res.my_answer;
|
||||
if (Array.isArray(myAnswer)) {
|
||||
return myAnswer.length > 0;
|
||||
}
|
||||
if (typeof myAnswer === 'object' && myAnswer !== null) {
|
||||
return typeof myAnswer.anserResult === 'string' && myAnswer.anserResult !== '';
|
||||
}
|
||||
return false;
|
||||
})
|
||||
.map((res) => ({
|
||||
a: res.qnsId,
|
||||
b: res.my_answer,
|
||||
@@ -364,8 +376,10 @@
|
||||
borderRadius: '8rpx'
|
||||
};
|
||||
const incompleteNumber = topicList.length - completeList.length;
|
||||
console.log('completeList', completeList);
|
||||
console.log('incompleteNumber', incompleteNumber);
|
||||
console.log('completeList', completeList);
|
||||
console.log('topicList', topicList);
|
||||
|
||||
if (incompleteNumber === 0) {
|
||||
// 完成
|
||||
dialogConfiguration.title = '确认现在交卷吗?';
|
||||
@@ -452,15 +466,10 @@
|
||||
}
|
||||
func.then((res) => {
|
||||
// 判断是否需要查分
|
||||
if (res.body.flagQuery === 'Y') {
|
||||
// 需要查分
|
||||
common.redirectTo(
|
||||
`/pages/examination/result?execId=${res.body.execId}&examLenTm=${examLenTm}&papersName=${paperData.papersName}&papersId=${paperData.papersId}&mode=${mode}&crsId=${paperData.crsId}`
|
||||
);
|
||||
} else {
|
||||
// todo 此处应该有个弹窗交代下结果
|
||||
common.navigateBack();
|
||||
}
|
||||
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=${flagQueryDetail}&examLenTm=${examLenTm}&papersName=${paperData.papersName}&papersId=${paperData.papersId}&mode=${mode}&crsId=${paperData.crsId}`
|
||||
);
|
||||
})
|
||||
.catch((res) => {
|
||||
console.log('error', res);
|
||||
@@ -525,13 +534,19 @@
|
||||
height: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.sheet_table_scroll {
|
||||
max-height: calc(80vh - 180rpx);
|
||||
// background-color: red;
|
||||
width: calc(100vw - 108rpx);
|
||||
}
|
||||
.sheet_table {
|
||||
width: 100%;
|
||||
|
||||
margin-top: 48rpx;
|
||||
margin-bottom: 48rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
width: calc(100vw - 108rpx);
|
||||
|
||||
align-content: space-between;
|
||||
|
||||
.sheet_table_item {
|
||||
@@ -642,7 +657,8 @@
|
||||
}
|
||||
|
||||
.scroll-Y {
|
||||
max-height: calc(100vh - var(--status-bar-height) - 70rpx - 70rpx - 40rpx - 64rpx - 68rpx - 60rpx);
|
||||
// 应该问答题才能减去160的输入框高度
|
||||
max-height: calc(100vh - var(--status-bar-height) - 70rpx - 70rpx - 40rpx - 64rpx - 68rpx - 60rpx - 160rpx);
|
||||
min-height: calc(100vh - var(--status-bar-height) - 70rpx - 70rpx - 40rpx - 64rpx - 68rpx - 60rpx - 380rpx);
|
||||
// background-color: yellow;
|
||||
}
|
||||
@@ -702,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;
|
||||
@@ -719,6 +735,7 @@
|
||||
|
||||
.grey {
|
||||
color: #b6e2ff;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.bold {
|
||||
|
||||
@@ -15,22 +15,21 @@
|
||||
:scroll-with-animation="true"
|
||||
:show-scrollbar="false"
|
||||
>
|
||||
<view class="information-details-div">
|
||||
<view class="information-details-div" :class="{ unable: flagQuery === 'N' }">
|
||||
<view class="top">
|
||||
<view class="left">
|
||||
<view class="top">得分</view>
|
||||
<view class="mid">
|
||||
<view class="mid" v-show="flagQuery === 'Y'">
|
||||
<text v-if="pass_status === 0" class="loading-pass">--</text>
|
||||
<text v-if="pass_status === -1" class="no-pass">{{ result.examGrade }}</text>
|
||||
<text v-if="pass_status === 1" class="pass">{{ result.examGrade }}</text>
|
||||
</view>
|
||||
<view class="bottom" v-if="result.passGrade">
|
||||
<view class="bottom" v-if="result.passGrade && flagQuery === 'Y'">
|
||||
<text class="">通过分数:{{ result.passGrade }}</text>
|
||||
</view>
|
||||
<view class="unable_text_dev" v-if="flagQuery === 'N'">无法查看</view>
|
||||
<view class="bottom">
|
||||
<text v-if="pass_status === -1">失败乃成功之母,继续努力</text>
|
||||
<text v-if="pass_status === 1">考的不错啊,继续加油</text>
|
||||
<text v-if="pass_status === 0">考试结果计算中...</text>
|
||||
<text>{{ statusText }}</text>
|
||||
<image
|
||||
v-if="pass_status === 1"
|
||||
src="@/static/images/login/clap.png"
|
||||
@@ -40,25 +39,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="img_div">
|
||||
<image
|
||||
v-if="pass_status === 1"
|
||||
src="@/static/images/examination/qualified.png"
|
||||
mode="aspectFit"
|
||||
class="img"
|
||||
></image>
|
||||
<image
|
||||
v-if="pass_status === -1"
|
||||
src="@/static/images/examination/unqualified.png"
|
||||
mode="aspectFit"
|
||||
class="img"
|
||||
></image>
|
||||
<image
|
||||
v-if="pass_status === 0"
|
||||
src="@/static/images/examination/getting_in.gif"
|
||||
mode="aspectFit"
|
||||
class="img"
|
||||
></image>
|
||||
<view class="img_div unable_img">
|
||||
<image :src="statusImage" mode="aspectFit" class="img"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -92,6 +74,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="main-div">
|
||||
<view class="answer_title">答题详情</view>
|
||||
<view class="sheet_table_div" v-if="pass_status !== 0 && topicList.length > 0">
|
||||
<swiper
|
||||
:indicator-dots="false"
|
||||
@@ -100,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>
|
||||
@@ -114,12 +96,15 @@
|
||||
<view class="swiper-dots"></view>
|
||||
</view>
|
||||
<!-- 获取答题结果时候的图片 -->
|
||||
<view class="loading-pass-image-div" v-if="pass_status === 0">
|
||||
<image src="@/static/images/examination/getting_robot.png" mode="widthFix" class="img"></image>
|
||||
<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>
|
||||
<view class="tip">你的等待会有更精确的结果,要耐心哦~</view>
|
||||
</view>
|
||||
<view class="loading-pass-image-div" v-if="flagQueryDetail === 'N'">
|
||||
<image src="@/static/images/examination/unable_img.png" mode="widthFix" class="img"></image>
|
||||
<view class="tip">您暂无权限查看此试卷详情</view>
|
||||
</view>
|
||||
<view
|
||||
class=""
|
||||
v-show="index === sheet_index"
|
||||
:class="getStatusClass(index)"
|
||||
v-for="(item, index) in topicList"
|
||||
@@ -132,6 +117,10 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import qualified from '@/static/images/examination/qualified.png';
|
||||
import unqualified from '@/static/images/examination/unqualified.png';
|
||||
import getting_in from '@/static/images/examination/getting_in.gif';
|
||||
|
||||
import { onLoad, onUnload } from '@dcloudio/uni-app';
|
||||
import { ref, reactive, computed, onMounted, nextTick, getCurrentInstance } from 'vue';
|
||||
import { queryPaperExamScore } from '@/api/examination.js';
|
||||
@@ -168,15 +157,53 @@
|
||||
}
|
||||
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) {
|
||||
return qualified;
|
||||
} else if (pass_status.value === -1 || flagQuery.value === 'N') {
|
||||
return unqualified;
|
||||
} else if (pass_status.value === 0 && flagQuery.value !== 'N') {
|
||||
return getting_in;
|
||||
}
|
||||
// 可以添加默认图片,防止所有条件都不匹配的情况
|
||||
return unqualified;
|
||||
});
|
||||
const statusText = computed(() => {
|
||||
if (flagQuery.value === 'N') {
|
||||
return '您无权限查看此试卷';
|
||||
} else if (flagQuery.value === 'Y') {
|
||||
switch (pass_status.value) {
|
||||
case -1:
|
||||
return '失败乃成功之母,继续努力';
|
||||
case 1:
|
||||
return '考的不错啊,继续加油';
|
||||
case 0:
|
||||
return '考试结果计算中...';
|
||||
default:
|
||||
return ''; // 处理未定义的状态
|
||||
}
|
||||
}
|
||||
return ''; // 默认返回空文本
|
||||
});
|
||||
// 答题卡点击
|
||||
const sheet_click = (index) => {
|
||||
// console.log('topicList', topicList[index]);
|
||||
// topic.value = topicList[index]
|
||||
sheet_index.value = index;
|
||||
// scrollTop.value = index * 200;
|
||||
};
|
||||
|
||||
const scroll = (event) => {};
|
||||
@@ -264,7 +291,11 @@
|
||||
result.mode = e.mode || '';
|
||||
|
||||
result.papersId = e.papersId;
|
||||
get_result();
|
||||
flagQueryDetail.value = e.flagQueryDetail;
|
||||
flagQuery.value = e.flagQuery;
|
||||
if (flagQueryDetail.value === 'Y' || flagQuery.value === 'Y') {
|
||||
get_result();
|
||||
}
|
||||
});
|
||||
// 页面卸载时清除定时器,终止请求
|
||||
onUnload(() => {
|
||||
@@ -305,12 +336,30 @@
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
$bg-margin-left: 30rpx;
|
||||
.current {
|
||||
background-color: rgba(0, 102, 255, 0.6);
|
||||
border-color: #0066ff;
|
||||
color: #ffffff;
|
||||
// 无法查看
|
||||
.unable {
|
||||
.unable_text_dev {
|
||||
font-weight: 600;
|
||||
font-size: 46rpx;
|
||||
color: #9f9fa1;
|
||||
text-align: left;
|
||||
}
|
||||
.unable_img {
|
||||
filter: blur(4px); /* 模糊程度,值越大越模糊 */
|
||||
}
|
||||
}
|
||||
|
||||
$bg-margin-left: 30rpx;
|
||||
.answer_title {
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
color: #000000;
|
||||
line-height: 44rpx;
|
||||
text-align: left;
|
||||
margin-left: $bg-margin-left;
|
||||
}
|
||||
|
||||
|
||||
.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);
|
||||
@@ -392,7 +441,12 @@
|
||||
}
|
||||
|
||||
.swiper-dots {
|
||||
height: 20rpx;
|
||||
display: none;
|
||||
height: 10rpx;
|
||||
width: 80rpx;
|
||||
margin: 0 auto;
|
||||
border-radius: 10rpx;
|
||||
background-color: #FCE8E9;
|
||||
}
|
||||
|
||||
.sheet_table {
|
||||
@@ -411,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;
|
||||
@@ -469,10 +518,12 @@
|
||||
align-items: center;
|
||||
padding-top: 80rpx;
|
||||
padding-bottom: 100rpx;
|
||||
// background-color: red;
|
||||
|
||||
.img {
|
||||
// background-color: red;
|
||||
width: 52vw;
|
||||
}
|
||||
.await_img {
|
||||
margin-left: -100rpx;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
</view>
|
||||
</uv-swipe-action-item>
|
||||
</uv-swipe-action>
|
||||
<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>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
</view>
|
||||
</uv-swipe-action-item>
|
||||
</uv-swipe-action>
|
||||
<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>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<view class="message_div" @click="common.navigateTo('/pages/messageNotification/index')">
|
||||
<image src="@/static/images/index/message_b.png" class="message_img"></image>
|
||||
<view class="message_text">消息</view>
|
||||
<view class="message_num message_num_font">30</view>
|
||||
<view class="message_num message_num_font" v-if="no_read_message_num>0">{{no_read_message_num}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 文字logo -->
|
||||
@@ -42,7 +42,7 @@
|
||||
<view class="message_div" @click="common.navigateTo('/pages/messageNotification/index')">
|
||||
<image src="@/static/images/index/message.png" class="message_img"></image>
|
||||
<view class="message_text">消息</view>
|
||||
<view class="message_num message_num_font">30</view>
|
||||
<view class="message_num message_num_font" v-if="no_read_message_num>0">{{no_read_message_num}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 滚动通知 -->
|
||||
@@ -284,6 +284,7 @@
|
||||
import { noticeMessageCount } from '@/api/messageNotification.js';
|
||||
|
||||
const scrollTop = ref(0);
|
||||
const no_read_message_num = ref(0);
|
||||
const mascotShow = ref(false);
|
||||
const stdtTmLenRef = ref(null);
|
||||
const accmPracticeCntRef = ref(null);
|
||||
@@ -452,7 +453,7 @@
|
||||
recommend_class_list.value = res.body;
|
||||
});
|
||||
noticeMessageCount().then(res => {
|
||||
console.log('res', res);
|
||||
no_read_message_num.value = res.body
|
||||
})
|
||||
});
|
||||
onHide(() => {});
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</view>
|
||||
<view class="detail_div">
|
||||
<view class="left">
|
||||
<image src="/src/static/images/test/2.png" mode="aspectFill" class="img"></image>
|
||||
<image-preview class="img" :src="detailData.ossAddr" mode="scaleToFill"></image-preview>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="title_div">
|
||||
@@ -474,6 +474,7 @@
|
||||
width: 225rpx;
|
||||
height: 169rpx;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.right {
|
||||
overflow: hidden;
|
||||
|
||||
@@ -23,18 +23,13 @@
|
||||
>
|
||||
<view class="item" v-for="(item, index) in data_list" @click="readMessageOpen(item)">
|
||||
<view class="icon">
|
||||
<image
|
||||
class="img_100"
|
||||
:src="imageMap[item.noticeTyp]"
|
||||
mode="widthFix"
|
||||
></image>
|
||||
<image class="img_100" :src="imageMap[item.noticeTyp]" mode="widthFix"></image>
|
||||
<!-- <image
|
||||
v-if="item.noticeTyp == '02'"
|
||||
class="img_100"
|
||||
src="@/static/images/messageNotification/type_02.png"
|
||||
mode="widthFix"
|
||||
></image> -->
|
||||
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="top">
|
||||
@@ -54,8 +49,8 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<list-no-data v-if="total == 0 && status == 'nomore'"></list-no-data>
|
||||
<uv-load-more :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>
|
||||
</scroll-view>
|
||||
<uni-popup ref="popup" type="bottom">
|
||||
<view class="popup">
|
||||
@@ -78,19 +73,19 @@
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { queryTraPersonalMessageNoticePaging, readNotice, oneTimeRead } from '@/api/messageNotification.js';
|
||||
import common from '../../common/common';
|
||||
|
||||
|
||||
import type_01 from '@/static/images/messageNotification/type_01.png';
|
||||
import type_02 from '@/static/images/messageNotification/type_02.png';
|
||||
import type_03 from '@/static/images/messageNotification/type_03.png';
|
||||
import type_04 from '@/static/images/messageNotification/type_04.png';
|
||||
|
||||
|
||||
const imageMap = {
|
||||
'01': type_01,
|
||||
'02': type_02,
|
||||
'03': type_03,
|
||||
'04': type_04,
|
||||
'01': type_01,
|
||||
'02': type_02,
|
||||
'03': type_03,
|
||||
'04': type_04
|
||||
};
|
||||
|
||||
|
||||
const status = ref('loadmore'); // loadmore - 加载前,loading - 加载中,nomore - 没有数据
|
||||
const limit = 20;
|
||||
const total = ref(-1);
|
||||
@@ -116,7 +111,7 @@
|
||||
page.data_list.length = 0;
|
||||
getData();
|
||||
};
|
||||
|
||||
|
||||
// 刷新处理函数
|
||||
const onRefresh = () => {
|
||||
if (_freshing.value) return;
|
||||
@@ -126,7 +121,7 @@
|
||||
_freshing.value = false;
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
|
||||
const getData = (from = '') => {
|
||||
if (from === 'first') {
|
||||
if (total.value !== -1) {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
<view class="time_and_num"></view>
|
||||
</view>
|
||||
</view>
|
||||
<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>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -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