Merge branch 'develop' into 'sit'

Develop

See merge request K17_AITS/tra-app!104
This commit is contained in:
田岩
2025-09-02 16:20:37 +08:00
26 changed files with 836 additions and 744 deletions
+10 -8
View File
@@ -6,27 +6,29 @@ ENV = 'development'
# VITE_APP_BASE_API_Url = 'http://25.18.122.78:9786'
# DEV
# VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002'
# app入口
#VITE_APP_BASE_API_Url = 'http://25.16.122.65:7001'
#VITE_APP_BASE_API_Url = 'http://25.16.122.65:7002'
#VITE_APP_BASE_API_Url = 'http://25.16.122.91:9786'
#VITE_APP_BASE_API_Url = 'http://25.18.122.66:9786'
# h5专用地址
# VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7002'
# VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7002'
VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001'
VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7002'
#VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7002'
# sit
#VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786'
#VITE_APP_BASE_H5_API_Url = 'http://25.18.122.116:7001'
# 任东
# VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.16.130:9601'
# VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.130:9602'
VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.16.130:9601'
VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.130:9602'
# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.130:9604'
# 张建成
# VITE_APP_BASE_H5_API_Url_TRAASK = 'http://25.64.16.144:9605'
VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.144:9602'
# VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.144:9602'
# 王洋洋
# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.140:9604'
# 于嘉文
+4 -1
View File
@@ -85,4 +85,7 @@ export const queryCrsInfoByRecmd = (data) => {
method: 'post',
data
});
};
};
+6 -3
View File
@@ -112,8 +112,11 @@ export const queryCurrentUser = (data) => request({
// userId: "USER001"
// userName: "ADMIN" / todo name
// userStatus: "01"
setUserInfo(res.body)
const userInfo = getUserInfo()
setUserInfo({
...userInfo,
...res.body
})
console.log('预加载头像');
const base_url = get_base_url()
@@ -121,7 +124,7 @@ export const queryCurrentUser = (data) => request({
// #ifdef APP-PLUS
// 更新用户信息中的头像路径
const updateUserAvatar = (imagePath) => {
const userInfo = getUserInfo()
setUserInfo({
...userInfo,
'imagePath': imagePath
+8
View File
@@ -31,4 +31,12 @@ export const oneTimeRead = (data) => {
toastErrors: true,
data
});
};
export const noticeMessageCount = (data) => {
return request({
url: base_url + '/traPersonalMessageNotice/noticeMessageCount',
method: 'post',
data
});
};
+1
View File
@@ -40,6 +40,7 @@ export const goto_login_fun = (from = 'http') => {
const page = pages[pages.length - 1];
page_route = page.route
}
console.log('当前页路由', page_route);
if (page_route === 'pages/login/login') return;
common.hideLoading()
common.show('未登录', '现在去登录', false).then(() => {
+6 -1
View File
@@ -203,7 +203,12 @@
});
// 声音加载完毕
audioStore.onAudioLoaded((e) => {
voiceTime.value = (Math.ceil(e.duration) || 1) + 's';
// 计算原始时长
const originalTime = Math.ceil(e.duration) || 1;
// 判断是否在118-123秒范围内
const displayTime = originalTime >= 118 && originalTime <= 124 ? 120 : originalTime;
// 赋值显示
voiceTime.value = displayTime + 's';
});
watch(
-4
View File
@@ -96,7 +96,6 @@
default: '请稍后再试!',
type: String
},
canAnswer: {
default: true,
type: Boolean
@@ -150,7 +149,6 @@
// 结束录音
const stopRecord = (status = false) => {
if (props.isDisabled) return;
console.log('结束录音嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻');
if (startTimer.value) {
clearTimeout(startTimer.value);
startTimer.value = null;
@@ -170,10 +168,8 @@
});
}, times);
}
nextTick(() => (recordingStatus.value = 'not_started'));
};
onMounted(async () => {
// #ifdef APP-PLUS
recorderManager.onStop(function (res) {
+4 -1
View File
@@ -130,7 +130,8 @@
{
"path": "pages/mascot/mascot_select_list",
"style": {
"navigationBarTitleText": "",
"navigationBarTitleText": "吉祥物列表",
"disableSwipeBack": true,
"app-plus": {
"titleNView": false
}
@@ -203,6 +204,7 @@
"path": "pages/examination/index",
"style": {
"navigationBarTitleText": "考试",
"disableSwipeBack": true,
"app-plus": {
"titleNView": false
}
@@ -221,6 +223,7 @@
"path": "pages/practice/index",
"style": {
"navigationBarTitleText": "练习",
"disableSwipeBack": true,
"app-plus": {
"titleNView": false
}
+21 -3
View File
@@ -45,6 +45,7 @@
<view class="btn-sub" @click="() => {showFilterList = false;activeTag = activeTagPop}">筛选</view>
</view>
</view>
<view :class="['model-filter-list',showFilterList?'show':'']" @click="showFilterList = false"></view>
<uv-scroll-list class="tags-view" :indicator="false">
<uv-tags text="全部"
shape="circle"
@@ -132,7 +133,7 @@ import {
queryCrsInfoByPopularApi,
queryCrsInfoByRecmdApi
} from "@/api/course.js"
import { onMounted, onActivated, ref, computed } from 'vue'
import { onMounted, onActivated, ref, computed, onUnmounted } from 'vue'
import { onShow } from "@dcloudio/uni-app"
const customStyle = {
backgroundColor: "#ffffff",
@@ -337,6 +338,13 @@ import { onShow } from "@dcloudio/uni-app"
tagsTree.value = res.body||[]
})
changeTab({name:'全部'})
uni.$on('refresh_course_list', () => {
changeTab({name:activeTab.value || '全部'})
});
})
onUnmounted(() => {
uni.$off('refresh_course_list');
})
onActivated(() => {
// 重新获取标签信息
@@ -426,7 +434,7 @@ import { onShow } from "@dcloudio/uni-app"
height: 588rpx;
padding-bottom: 80rpx;
overflow-y: hidden;
z-index: 2;
z-index: 10;
background-color: #f9f9f9;
box-shadow: 0rpx 12rpx 20rpx rgba(160,160,160,.25);
border-radius: 0 0 0rpx 0rpx;
@@ -504,7 +512,17 @@ import { onShow } from "@dcloudio/uni-app"
}
}
}
.filter-list{
.model-filter-list{
position: fixed;
width: 100vw;
height: 100vh;
overflow: hidden;
top: 0;
left: 0;
z-index: 1;
}
.filter-list,
.model-filter-list{
display: none;
&.show{
display: block;
+42 -15
View File
@@ -35,7 +35,7 @@
</view>
<view class="start-btns" @click="nextStep"> 开启学习之旅 </view>
</view>
<view class="course-study-body" v-show="step === 2">
<view :class="['course-study-body', !IsAndEnv ? 'isIos' : 'isAnd']" v-show="step === 2">
<view class="seek-setting">
<view class="inline-block" @click="showChangeSeekModelNow">{{ chooseRate }}</view>
<view class="image-icon" @click="showChangeBgModelNow">
@@ -80,6 +80,7 @@
:isLoading="isUploadingVoice"
:onlyVoice="answerOnlyVoice"
:canAnswer="testAnswer"
:adjustPosition="true"
:canAnswerText="'每个问题最多连续发送五次答案!'"
:isDisabled="(lastTalkingInfo.type || 0) !== 4" />
</view>
@@ -123,7 +124,7 @@
import { reactive, ref, computed, unref, onMounted, onUnmounted, getCurrentInstance, nextTick } from 'vue'
import { onLoad, onShow, onUnload, onHide } from '@dcloudio/uni-app'
import { previewFile, downloadFile, commonUploadVoiceFile, downloadVoiceFile, uploadVoiceFile } from '@/api/common.js'
import { getToken } from '@/common/common.js'
import { getToken, getPhoneEnvBool } from '@/common/common.js'
import { get_base_url, goto_login_fun } from '@/api/request'
import { getCourseStudyInfoApi, afreshStudyCourseApi, queryQuestionEvalateApi, textChartApi, setStudyTeacherApi, textChartPreviewApi, previewAfreshStudyCourse } from '@/api/study.js'
import common from '@/common/common'
@@ -154,6 +155,7 @@ const inputRef = ref('')
const flagVal = ref('1')
const isUploadingVoice = ref(false)
const isPreview = ref(false)
const IsAndEnv = ref(getPhoneEnvBool('AND'))
const ajaxApi = computed(() => (isPreview.value ? textChartPreviewApi : textChartApi))
@@ -347,6 +349,7 @@ const showOrder = ref(0)
const isLastPgrph = ref(false)
const backRouter = () => {
// common.redirectTo(`/pages/courseDetail/index?crsId=${crsId.value}&crsNum=${crsNum.value}&from=study`)
uni.$emit('refresh_course_list')
common.navigateBack()
}
@@ -395,6 +398,7 @@ const getGraphInfoUnStudy = (flag = 0) => {
})
.finally(() => {})
}
uni.$emit('refresh_course_list')
return
}
lastTalkingInfo.value = {
@@ -664,6 +668,7 @@ const sendMessage = data => {
const startPgrphId = ref('')
const imageId = ref('')
onLoad(params => {
changeAppHeightBottom()
watchFlag.value = 1
isPreview.value = params.isPreview === 'preview'
crsId.value = params.crsId || ''
@@ -680,7 +685,23 @@ onMounted(() => {
const keyboardHeight = ref('0px')
const setHeight = res => {
keyboardHeight.value = res.height + 'px'
scrollToBottomNow()
// scrollToBottomNow()
}
const keyBoardIsHide = computed(() => {
return parseInt(keyboardHeight.value) == 0
})
const bottomHeight = ref('0px')
const totalBotHeight = computed(() => {
return keyBoardIsHide.value ? 0 + 'px' : parseInt(keyboardHeight.value) - parseInt(bottomHeight.value) + 'px'
})
const changeAppHeightBottom = height => {
//#ifdef APP-PLUS
// 获取系统信息
const systemInfo = uni.getSystemInfoSync()
// 计算安全区域底部高度
bottomHeight.value = systemInfo.screenHeight - systemInfo.safeArea.bottom + 'px'
// #endif
}
onHide(() => {
//#ifdef APP-PLUS
@@ -768,7 +789,7 @@ const uploadRecordNow = voicePath => {
})
.then(res => {
let _res = JSON.parse(res.data)
console.log(_res)
console.log(_res)
if (_res.rtnCode === '0000') {
talkingList.value = talkingList.value.map(t => {
if (t.id === _id) {
@@ -780,8 +801,8 @@ const uploadRecordNow = voicePath => {
talkingContent: '',
talkingVoice: voicePath,
recordId: _res.body.chatBody.recordId,
asrStartTm: unref(lastTalkingInfo).asrStartTm,
stdyPgrphId: _res.body.chatBody.stdyPgrphId,
asrStartTm: unref(lastTalkingInfo).asrStartTm,
stdyPgrphId: _res.body.chatBody.stdyPgrphId,
type: 1,
userInfo: {
...choiceTeacherInfo.value
@@ -792,18 +813,18 @@ const uploadRecordNow = voicePath => {
return t
}
})
console.log(11111,_res.body.chatBody)
console.log(11111, _res.body.chatBody)
scrollToBottomNow()
} else {
}
setIsUploadingVoice()
})
.catch(err => {
console.log('err',err)
console.log('err', err)
setIsUploadingVoice()
talkingList.value = talkingList.value.filter(t => t.id !== _id)
uni.showToast({
title: '系统异常,请联系管理员',
title: err.message || '系统异常,请联系管理员',
icon: 'none',
duration: 1000
})
@@ -1037,11 +1058,14 @@ const chooseRateNow = item => {
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.course-study {
position: relative;
display: flex;
flex-direction: column;
height: 100vh;
overflow: hidden;
bottom: 0;
.top-bg {
background: linear-gradient(16deg, rgba(234, 246, 255, 0) 0%, #e6eafd 100%);
@@ -1085,19 +1109,21 @@ const chooseRateNow = item => {
}
.course-study-body {
position: absolute;
position: fixed;
overflow: hidden;
left: 0;
bottom: 0;
// height: 100%;
height: calc(100% - v-bind(keyboardHeight));
height: 100%;
// height: calc(100% - v-bind(totalBotHeight));
width: 100%;
padding: 0 0rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
padding-top: v-bind(pageTopPadding);
&.isAnd {
height: calc(100% - v-bind(totalBotHeight));
}
.body-title {
height: 90rpx;
text-align: center;
@@ -1107,7 +1133,8 @@ const chooseRateNow = item => {
box-sizing: border-box;
font-weight: 500;
color: #000;
position: relative;
position: sticky;
top: 0;
// margin-bottom: 23rpx;
.arrow-icon {
+15 -19
View File
@@ -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('预览课程不允许考试');
+73 -45
View File
@@ -16,7 +16,14 @@
</view>
<view class="question">
<view class="grey">剩余时间</view>
<uv-count-down :time="paperData.limitTm * 1000" format="HH:mm:ss" @finish="finish"></uv-count-down>
<uv-count-down
class="countdown_time"
ref="countDownRef"
:time="paperData.limitTm * 1000"
format="HH:mm:ss"
@finish="finish"
:autoStart="false"
></uv-count-down>
</view>
</view>
<view class="progress">
@@ -103,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"
@@ -144,7 +153,7 @@
import Dialog from './components/dialog.vue';
import Subject from '@/components/examination/subject.vue';
import TouchBtn from '@/components/examination/touchBtn.vue';
import { ref, reactive, computed} from 'vue';
import { ref, reactive, computed, onMounted } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import common from '@/common/common';
import { getPageCache, setupKeyboardHeightListener } from '@/common/common';
@@ -156,6 +165,7 @@
const dialogRef = ref(null);
const popupRef = ref(null);
const touchBtnRef = ref(null);
const countDownRef = ref(null);
let examinationStartTime = 0; // 考试开始时间
const mode = 'examination'; // 考试 examination 练习practice
@@ -219,7 +229,7 @@
// 倒计时结束
const finish = (item) => {
hand_in_paper('倒计时结束自动交卷')
hand_in_paper('倒计时结束自动交卷');
};
// 按上一题下一题
@@ -240,8 +250,7 @@
// 点击答题卡按钮
const click_sheet_item = (index) => {
questionNumber.value = index;
popupRef.value.close()
popupRef.value.close();
};
const subject_click = (type, params) => {
@@ -289,7 +298,7 @@
};
}
};
// 初始化时检查
onLoad(() => {
const examination = getPageCache('examination');
@@ -312,9 +321,14 @@
my_answer: []
}))
);
setupKeyboardHeightListener((height) => {
popup_input_bottom.value = `${height}px`;
})
setupKeyboardHeightListener((height) => {
popup_input_bottom.value = `${height}px`;
});
});
onMounted(() => {
setTimeout(() => {
countDownRef.value.start();
}, 500);
});
const result_click = ({ key }) => {
@@ -333,13 +347,22 @@
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,
c: !!res.my_answer
}));
const style_button_1 = {
color: '#FFFFFF',
fontSize: '30rpx',
@@ -353,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 = '确认现在交卷吗?';
@@ -390,7 +415,7 @@
dialogRef.value.open();
};
// 执行交卷
const hand_in_paper = (strs='') => {
const hand_in_paper = (strs = '') => {
console.log('交卷的原因', strs);
const answerDtoList = topicList.map((res) => {
let answerItem = {
@@ -441,23 +466,18 @@
}
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);
})
.finally(() => {
common.hideLoading();
if(strs === '倒计时结束自动交卷') {
hand_in_paper(strs)
if (strs === '倒计时结束自动交卷') {
hand_in_paper(strs);
}
});
};
@@ -514,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 {
@@ -631,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;
}
@@ -691,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;
@@ -708,6 +735,7 @@
.grey {
color: #b6e2ff;
white-space: nowrap;
}
.bold {
+119 -68
View File
@@ -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>
+2 -2
View File
@@ -588,7 +588,7 @@
} else {
talkingList.value.pop()
uni.showToast({
title: '未识别到文字',
title: '未识别到文字',
icon: "none",
duration: 1000
});
@@ -732,7 +732,7 @@
position: relative;
display: flex;
flex-direction: column;
height: calc(100vh - 0px);
height: 100vh;
overflow: hidden;
}
+7 -3
View File
@@ -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>
<!-- 滚动通知 -->
@@ -278,12 +278,13 @@
import { onShow, onPageScroll, onLoad, onHide } from '@dcloudio/uni-app';
import { customStyles, fixedCustomStyles, placeholderStyle, suffixIconStyle } from './index.js';
import { getUserInfo } from '@/common/common';
import common from '@/common/common';
import { setMascot } from '@/common/mascot.js';
import { getStatisticsData, queryCrsInfoByLastnew, queryCrsInfoByPopular, queryCrsInfoByRecmd } from '@/api/index.js';
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);
@@ -451,6 +452,9 @@
queryCrsInfoByRecmd().then((res) => {
recommend_class_list.value = res.body;
});
noticeMessageCount().then(res => {
no_read_message_num.value = res.body
})
});
onHide(() => {});
</script>
+2 -1
View File
@@ -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;
+12 -17
View File
@@ -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) {
+8 -3
View File
@@ -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>
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -88,7 +88,7 @@
});
const del_all = () => {
common.show('', '历史搜索记录清除后无法恢复,确认删除吗').then((res) => {
common.show('', '确认删除全部搜索历史?').then((res) => {
if (res) {
common.setValue(storageKey, []);
historyList.value = [];
+2 -2
View File
@@ -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>
+4 -1
View File
@@ -66,7 +66,8 @@
{
"path": "pages/mascot/mascot_select_list",
"style": {
"navigationBarTitleText": "",
"navigationBarTitleText": "吉祥物列表",
"disableSwipeBack": true,
"app-plus": {
"titleNView": false
}
@@ -139,6 +140,7 @@
"path": "pages/examination/index",
"style": {
"navigationBarTitleText": "考试",
"disableSwipeBack": true,
"app-plus": {
"titleNView": false
}
@@ -157,6 +159,7 @@
"path": "pages/practice/index",
"style": {
"navigationBarTitleText": "练习",
"disableSwipeBack": true,
"app-plus": {
"titleNView": false
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB