diff --git a/src/pages.json b/src/pages.json
index 793326fb..cb158755 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -4,6 +4,7 @@
"path": "pages/index/dialog",
"style": {
"navigationBarTitleText": "AI问答",
+ "disableSwipeBack": true,
"app-plus": {
"titleNView": false,
"animationType": "fade-in"
diff --git a/src/pages/examination/index.vue b/src/pages/examination/index.vue
index fd4dde92..c39ecf01 100644
--- a/src/pages/examination/index.vue
+++ b/src/pages/examination/index.vue
@@ -169,6 +169,7 @@
const touchBtnRef = ref(null);
const countDownRef = ref(null);
let examinationStartTime = 0; // 考试开始时间
+ let examinationAnswerCacheKey;
const style_button_1 = {
color: '#FFFFFF',
fontSize: '30rpx',
@@ -189,7 +190,10 @@
papersId: '', // 试卷ID
limitTm: 0, // 考试限制时间
papersName: '', // 试卷名称
- isCacheExam: '' // 是否是缓存试卷(继续答题试卷)
+ isCacheExam: '' ,// 是否是缓存试卷(继续答题试卷)
+ flagQuery: '' ,
+ flagQueryDetail: '' ,
+
}); // 试卷信息
const topicList = reactive([]); // 问题列表
const popup_input_bottom = ref('0px');
@@ -244,7 +248,15 @@
// 倒计时结束
const finish = (item) => {
- hand_in_paper('倒计时结束自动交卷');
+ // 交卷成功,清除缓存
+ examinationAnswerCacheKey && common.setValue(examinationAnswerCacheKey, null);
+ // 考试完成事件
+ uni.$emit('exam_completed');
+ // 判断是否需要查分
+ const flagQueryDetail = paperData.flagQueryDetail === '' ? paperData.flagQuery : paperData.flagQueryDetail;
+ common.redirectTo(
+ `/pages/examination/result?execId=${paperData.execId}&flagQuery=${paperData.flagQuery}&flagQueryDetail=${flagQueryDetail}&papersName=${paperData.papersName}&papersId=${paperData.papersId}&mode=examination&crsId=${paperData.crsId}`
+ );
};
// 按上一题下一题
@@ -289,9 +301,10 @@
// 录音按钮提交
const touchBtnSubmit = (type, submitObj) => {
+ const topic = topicList[questionNumber.value];
touchBtnRef.value?.clearinputText(); // 清除发送框数据
if (type === 'voice') {
- topic.value.es_status = '00'; // 00转圈
+ topic.es_status = '00'; // 00转圈
const voicePath = submitObj;
commonUploadVoiceFile(voicePath, '/traask/traAskchat/voiceTrans', {})
.then((res) => {
@@ -299,11 +312,11 @@
if (_res.rtnCode === '0000') {
const _content = _res.body.transContent.trim();
if (_content === '') {
- topic.value.es_status = ''; // 取消转圈
+ topic.es_status = ''; // 取消转圈
return common.msg('未识别到文字');
} else {
- topic.value.es_status = '02';
- topic.value.my_answer = {
+ topic.es_status = '02';
+ topic.my_answer = {
anserResult: _res.body.transContent,
ossKey: _res.body.fileId,
ossAddr: _res.body.ossFileAddr,
@@ -314,37 +327,26 @@
}
})
.catch((err) => {
- topic.value.es_status = ''; // 取消转圈
+ topic.es_status = ''; // 取消转圈
common.msg('系统异常,请联系管理员');
});
} else if (type === 'text') {
- topic.value.es_status = '01';
- topic.value.my_answer = {
+ topic.es_status = '01';
+ topic.my_answer = {
anserResult: submitObj // 正确答案文字内容
};
hand_in_paper_cache();
}
};
- let examinationAnswerCacheKey;
+
const answerCacheList = ref({});
const setAnswerCacheList = (value) => {
console.log('触发变化', value);
answerCacheList.value = value;
common.setValue(examinationAnswerCacheKey, value);
};
- // const answerCacheList = computed({
- // get() {
- // const cacheList = common.getValue(examinationAnswerCacheKey);
- // if (cacheList) return cacheList;
- // return {};
- // },
- // set(value) {
- // console.log('触发变化', value);
- // common.setValue(examinationAnswerCacheKey, value); // 补充键参数
- // }
- // });
-
+
// 添加试题答案缓存
const addTopicAnswerCache = () => {
const my_answer = topic.value.my_answer;
@@ -363,7 +365,6 @@
}
setAnswerCacheList(newCache);
- // answerCacheList.value = newCache;
};
// 初始化时检查
@@ -382,6 +383,8 @@
paperData.limitTm = examination.limitTm;
paperData.papersName = examination.papersName;
paperData.isCacheExam = examination.isCacheExam || 'N';
+ paperData.flagQuery = examination.flagQuery || 'Y';
+ paperData.flagQueryDetail = examination.flagQueryDetail || 'Y';
mode = paperData.examId ? 'PAPERS' : 'CRS'; // 课程考试CRS,考试中心考试PAPERS
// 设置缓存的键的名称
const suffix = mode === 'PAPERS' ? paperData.examId : paperData.crsId;
@@ -648,9 +651,9 @@
// 考试完成事件
uni.$emit('exam_completed');
// 判断是否需要查分
- const flagQueryDetail = res.body.flagQueryDetail === '' ? res.body.flagQuery : res.body.flagQueryDetail;
+ const flagQueryDetail = paperData.flagQueryDetail === '' ? paperData.flagQuery : paperData.flagQueryDetail;
common.redirectTo(
- `/pages/examination/result?execId=${res.body.execId}&flagQuery=${res.body.flagQuery}&flagQueryDetail=${flagQueryDetail}&papersName=${paperData.papersName}&papersId=${paperData.papersId}&mode=examination&crsId=${paperData.crsId}`
+ `/pages/examination/result?execId=${res.body.execId}&flagQuery=${paperData.flagQuery}&flagQueryDetail=${flagQueryDetail}&papersName=${paperData.papersName}&papersId=${paperData.papersId}&mode=examination&crsId=${paperData.crsId}`
);
})
.catch((res) => {
diff --git a/src/pages/examinationRecord/components/examRecordItem.vue b/src/pages/examinationRecord/components/examRecordItem.vue
index 4964a498..50c47283 100644
--- a/src/pages/examinationRecord/components/examRecordItem.vue
+++ b/src/pages/examinationRecord/components/examRecordItem.vue
@@ -10,7 +10,7 @@
- {{ item.highestGrade || 0 }}
+ {{ item.flagQuery === 'Y'?item.highestGrade:'--' || 0 }}
历史最高分
diff --git a/src/pages/index/dialog.vue b/src/pages/index/dialog.vue
index 23db6dff..8c170f32 100644
--- a/src/pages/index/dialog.vue
+++ b/src/pages/index/dialog.vue
@@ -650,7 +650,7 @@ onBackPress(options => {
}
}
}
- return false
+ return true
})
const getQuestionList = () => {
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index 1e1b6076..843ef943 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -19,7 +19,9 @@
消息
- {{no_read_message_num}}
+
+ {{ messageDisplayText }}
+
@@ -42,7 +44,9 @@
消息
- {{no_read_message_num}}
+
+ {{ messageDisplayText }}
+
@@ -79,19 +83,7 @@
- 累计训练次数
-
-
- 次
-
-
-
- 累计考试次数
+ 本年陪练次数
+ 次
+
+
+
+ 本年考试次数
+
+
+
+
次
@@ -285,6 +291,16 @@
const scrollTop = ref(0);
const no_read_message_num = ref(0);
+ // 处理显示的消息数量文本
+ const messageDisplayText = computed(() => {
+ return no_read_message_num.value > 99 ? '99+' : no_read_message_num.value;
+ });
+
+ // 处理消息数量的样式类
+ const messageNumberClass = computed(() => ({
+ message_num_big: no_read_message_num.value > 99,
+ message_num_small: no_read_message_num.value <= 99
+ }));
const mascotShow = ref(false);
const stdtTmLenRef = ref(null);
const accmPracticeCntRef = ref(null);
@@ -407,7 +423,7 @@
}
});
};
-
+
// 进入搜索页
const goto_search_page = () => {
common.navigateTo('/pages/search/search?from=index');
@@ -453,9 +469,10 @@
queryCrsInfoByRecmd().then((res) => {
recommend_class_list.value = res.body;
});
- noticeMessageCount().then(res => {
- no_read_message_num.value = res.body
- })
+ noticeMessageCount().then((res) => {
+ no_read_message_num.value = res.body;
+ // no_read_message_num.value = 109;
+ });
});
onHide(() => {});
@@ -468,7 +485,7 @@
width: 146rpx !important;
border-radius: 16rpx;
}
-
+
// 底线样式
.bottom_line {
margin: 0 auto;
@@ -613,47 +630,11 @@
.message_div {
position: relative;
- display: flex;
- flex-direction: column;
- align-items: center;
+
margin-left: 33rpx;
- .message_img {
- width: 32rpx;
- height: 36rpx;
- }
-
.message_text {
- margin-top: 4rpx;
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 22rpx;
color: #333333;
- line-height: 24rpx;
- white-space: nowrap;
- }
-
- .message_num {
- position: absolute;
- top: 2rpx;
- right: -4rpx;
- padding: 2rpx 3rpx 2rpx 3rpx;
- background-color: #ff1926;
- border-radius: 10rpx;
- // width: 22rpx;
- // height: 20rpx;
- // font-size: 10rpx;
- // font-size: 30rpx;
- color: #ffffff;
- }
-
- .message_num_font {
- width: 22rpx;
- height: 22rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 16rpx;
}
}
}
@@ -672,46 +653,54 @@
position: absolute;
top: 4rpx;
right: -56rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
-
- .message_img {
- width: 32rpx;
- height: 36rpx;
- }
.message_text {
- margin-top: 4rpx;
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 22rpx;
- color: #ffffff;
- line-height: 24rpx;
- white-space: nowrap;
- }
-
- .message_num {
- position: absolute;
- top: 2rpx;
- right: -4rpx;
- padding: 2rpx 3rpx 2rpx 3rpx;
- background-color: #ff1926;
- border-radius: 20rpx;
- // width: 22rpx;
- // height: 20rpx;
- // font-size: 10rpx;
color: #ffffff;
}
+ }
+ }
- .message_num_font {
- width: 22rpx;
- height: 22rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 16rpx;
- }
+ .message_div {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ min-width: 60rpx;
+ .message_img {
+ width: 32rpx;
+ height: 36rpx;
+ }
+ .message_text {
+ margin-top: 4rpx;
+ font-family: PingFangSC, PingFang SC;
+ font-weight: 400;
+ font-size: 22rpx;
+ line-height: 24rpx;
+ white-space: nowrap;
+ }
+
+ .message_num {
+ position: absolute;
+ top: 2rpx;
+ right: 16rpx;
+ padding: 1rpx 2rpx 1rpx 2rpx;
+ background-color: #ff1926;
+ border-radius: 10rpx;
+ color: #ffffff;
+ }
+ .message_num_big {
+ right: 0rpx;
+ }
+ .message_num_small {
+ right: 8rpx;
+ min-width: 24rpx;
+ }
+
+ .message_num_font {
+ height: 22rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 16rpx;
}
}
@@ -728,7 +717,7 @@
font-style: normal;
display: flex;
align-items: center;
-
+
:deep(.uv-notice-bar) {
padding: 9px 2px;
}
diff --git a/src/pages/login/ysxy.vue b/src/pages/login/ysxy.vue
index cbfde881..6bd54445 100644
--- a/src/pages/login/ysxy.vue
+++ b/src/pages/login/ysxy.vue
@@ -2,6 +2,10 @@
+
+
+ 隐私协议
+
= MAX_RETRY) {
+ console.warn('超过最大重试次数,未能设置Webview样式');
+ return;
+ }
+
+ let webviewChild;
+ try {
+ webviewChild = currentWebview.children()[0];
+ } catch (error) {
+ console.error('获取Webview子元素失败:', error);
+ }
+
+ if (webviewChild && typeof webviewChild.setStyle === 'function') {
+ webviewChild.setStyle({
+ top: topHeight,
+ scalable: false
+ });
+ } else {
+ setTimeout(() => checkAndSetStyle(topHeight, retryCount + 1), retryCount * 40);
+ }
}
uni.getSystemInfo({
- success: function (res) {
- checkAndSetStyle(res.statusBarHeight);
- }
+ success: (res) => {
+ // 计算顶部高度并设置
+ const topHeight = res.statusBarHeight + 45;
+ checkAndSetStyle(topHeight, 1);
+ },
+ fail: (error) => {
+ console.error('获取系统信息失败:', error);
+ }
});
-
// #endif
},
methods: {
@@ -72,4 +91,29 @@
width: 100%;
height: var(--status-bar-height);
}
+ .body-title {
+ height: 90rpx;
+ text-align: center;
+ font-size: 33rpx;
+ padding-top: 10rpx;
+ line-height: 46rpx;
+ box-sizing: border-box;
+ background-color: #fff;
+ font-weight: 500;
+ color: #000;
+ position: fixed;
+ top: var(--status-bar-height);
+ left: 0;
+ width: 100vw;
+ z-index: 10000;
+ // margin-bottom: 23rpx;
+ .arrow-icon {
+ position: absolute;
+ left: 21rpx;
+ top: 5rpx;
+ color: #000;
+ padding: 15rpx;
+ // background-color: red;
+ }
+ }
diff --git a/src/pages/practice/index.vue b/src/pages/practice/index.vue
index 96e5e4d9..58b1169e 100644
--- a/src/pages/practice/index.vue
+++ b/src/pages/practice/index.vue
@@ -299,10 +299,10 @@
// 录音组件提交
const touchBtnSubmit = (type, submitObj) => {
- 1;
+ const topic = topicList[questionNumber.value]
touchBtnRef.value?.clearinputText(); // 清除发送框数据
if (type === 'voice') {
- topic.value.es_status = '00'; // 00转圈
+ topic.es_status = '00'; // 00转圈
const voicePath = submitObj;
commonUploadVoiceFile(voicePath, '/traask/traAskchat/voiceTrans', {})
.then((res) => {
@@ -310,11 +310,11 @@
if (_res.rtnCode === '0000') {
const _content = _res.body.transContent.trim();
if (_content === '') {
- topic.value.es_status = ''; // 取消转圈
+ topic.es_status = ''; // 取消转圈
return common.msg('未识别到文字');
} else {
- topic.value.es_status = '02';
- topic.value.my_answer = {
+ topic.es_status = '02';
+ topic.my_answer = {
anserResult: _res.body.transContent,
ossKey: _res.body.fileId,
ossAddr: _res.body.ossFileAddr,
@@ -324,12 +324,12 @@
}
})
.catch((err) => {
- topic.value.es_status = ''; // 取消转圈
+ topic.es_status = ''; // 取消转圈
common.msg('系统异常,请联系管理员');
});
} else if (type === 'text') {
- topic.value.es_status = '01';
- topic.value.my_answer = {
+ topic.es_status = '01';
+ topic.my_answer = {
anserResult: submitObj // 正确答案文字内容
};
}
diff --git a/src/pages/wrongQuestionRecord/correct.vue b/src/pages/wrongQuestionRecord/correct.vue
index fbfea93b..6bbd6cc1 100644
--- a/src/pages/wrongQuestionRecord/correct.vue
+++ b/src/pages/wrongQuestionRecord/correct.vue
@@ -285,9 +285,10 @@
// 录音组件提交
const touchBtnSubmit = (type, submitObj) => {
+ const topic = topicList[questionNumber.value];
touchBtnRef.value?.clearinputText(); // 清除发送框数据
if (type === 'voice') {
- topic.value.es_status = '00'; // 00转圈
+ topic.es_status = '00'; // 00转圈
const voicePath = submitObj;
commonUploadVoiceFile(voicePath, '/traask/traAskchat/voiceTrans', {})
.then((res) => {
@@ -295,11 +296,11 @@
if (_res.rtnCode === '0000') {
const _content = _res.body.transContent.trim();
if (_content === '') {
- topic.value.es_status = ''; // 取消转圈
+ topic.es_status = ''; // 取消转圈
return common.msg('未识别到文字');
} else {
- topic.value.es_status = '02';
- topic.value.my_answer = {
+ topic.es_status = '02';
+ topic.my_answer = {
anserResult: _res.body.transContent,
ossKey: _res.body.fileId,
ossAddr: _res.body.ossFileAddr,
@@ -309,12 +310,12 @@
}
})
.catch((err) => {
- topic.value.es_status = ''; // 取消转圈
+ topic.es_status = ''; // 取消转圈
common.msg('系统异常,请联系管理员');
});
} else if (type === 'text') {
- topic.value.es_status = '01';
- topic.value.my_answer = {
+ topic.es_status = '01';
+ topic.my_answer = {
anserResult: submitObj // 正确答案文字内容
};
}