diff --git a/.env.development b/.env.development
index 0c622e63..9a437853 100644
--- a/.env.development
+++ b/.env.development
@@ -23,18 +23,14 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
# VITE_APP_BASE_H5_API_Url = 'http://25.64.16.130:9602'
# 线上
-# VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7001'
+# 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 = '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_TRAASK = 'http://25.64.16.144:9605'
-
-
# 王洋洋
# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.140:9604'
# 于嘉文
diff --git a/src/api/request.js b/src/api/request.js
index 34356a6e..c0ec1b72 100644
--- a/src/api/request.js
+++ b/src/api/request.js
@@ -97,13 +97,18 @@ export default function request({
const res = response.data
if (res?.rtnCode === '0000') {
return resolve(res)
- } else if (toastErrors) {
- // common.msg(res?.message)
-
+ } else if (res?.rtnCode === '0001') { // 为前后端约定不公共拦截的码值(王洋洋20250830定)
+ return reject(res)
+
+ } else if (res?.rtnCode === '0002' && res?.message) {
+ if (toastErrors) {
+ common.msg(res.message)
+ }
+ return reject(response)
}
//到这里下面全是异常的处理
if (suppressErrors) { // 静默的接口,报错也不处理,因为下面有公共处理
- return reject()
+ return reject(response)
}
if (!res) {
common.msg("系统异常.")
diff --git a/src/api/wrongQuestionRecord.js b/src/api/wrongQuestionRecord.js
index dd4e9348..6a51dcbd 100644
--- a/src/api/wrongQuestionRecord.js
+++ b/src/api/wrongQuestionRecord.js
@@ -37,7 +37,7 @@ export const queryMistakesAnswerByMisId = (data) => {
return request({
url: base_url + '/traMistakesCollection/queryMistakesAnswerByMisId ',
method: 'post',
- toastErrors: true,
+ toastErrors: false,
data
});
};
\ No newline at end of file
diff --git a/src/pages/course/components/talkingItem.vue b/src/pages/course/components/talkingItem.vue
index a9ce0a84..eb4a6429 100644
--- a/src/pages/course/components/talkingItem.vue
+++ b/src/pages/course/components/talkingItem.vue
@@ -55,9 +55,9 @@
-
-
-
+
+
+
diff --git a/src/pages/courseDetail/index.vue b/src/pages/courseDetail/index.vue
index ecef8d83..b5f6c911 100644
--- a/src/pages/courseDetail/index.vue
+++ b/src/pages/courseDetail/index.vue
@@ -51,13 +51,13 @@
-
-
-
+
+
+
@@ -92,15 +92,18 @@
-
-
- 去学习
-
- 去练习
- 去考试
+
+
+ 去学习
+
+
+ 去练习
+
+
+
+ 去考试
+
+
isPreview.value === 'preview' || form.value.examStat === '02');
+ const examinationButtonDisabled = computed(() => isPreview.value === 'preview' || form.value.examStat !== '00');
+
const tabSwitch = (item) => {
tabAct.value = item.index;
};
@@ -150,7 +155,7 @@
commentRef.value?.getData();
}
};
-
+
const getData = async () => {
const { body } = await getCourseDetailApi({
crsId: crsId.value
@@ -175,8 +180,7 @@
const opacity = Math.min(1, (scrollTop.value - 20) / 80);
return `rgba(255,255,255,${opacity})`;
});
-
-
+
const scroll_fun = (e) => {
scrollTop.value = e.detail.scrollTop;
};
@@ -184,10 +188,12 @@
const swiper_change = (res) => {
tabAct.value = res.detail.current;
};
-
+
// 去考试
const goto_examination = async () => {
- if(isPreview.value === 'preview') return common.msg('预览课程不允许考试');
+ if (isPreview.value === 'preview') return common.msg('预览课程不允许考试');
+ if (form.value.examStat === '01') return common.msg('该课程下暂无试题');
+ if (form.value.examStat === '02') return common.msg('该课程下的试题未设置考试规则');
common.loading();
startExamByCrs({
crsId: crsId.value
@@ -204,9 +210,16 @@
common.hideLoading();
});
};
+ // 去学习
+ const goto_study = async () => {
+ common.navigateTo(
+ '/pages/course/study?crsId=' + crsId.value + '&isPreview=' + isPreview.value + '&imgId=' + form.value.imgId
+ );
+ };
// 去练习
const goto_practice = async () => {
- if(isPreview.value === 'preview') return common.msg('预览课程不允许练习');
+ if (isPreview.value === 'preview') return common.msg('预览课程不允许练习');
+ if (form.value.examStat !== '00') return common.msg('该课程下暂无试题');
common.loading();
startPracticeByCrs({
crsId: crsId.value
diff --git a/src/pages/courseRecord/components/examRecordItem.vue b/src/pages/courseRecord/components/examRecordItem.vue
index a462cf5b..219185ca 100644
--- a/src/pages/courseRecord/components/examRecordItem.vue
+++ b/src/pages/courseRecord/components/examRecordItem.vue
@@ -97,11 +97,12 @@
};
// 跳转到详情
const click_list_item = (list_item) => {
+ console.log('list_item', list_item);
const examLenTm = 666;
const papersName = item.value.examName;
common.navigateTo(
- `/pages/examination/result?execId=${list_item.execId}&examLenTm=${examLenTm}&papersName=${papersName}&mode=record`
+ `/pages/examination/result?execId=${list_item.execId}&papersName=${papersName}&mode=record`
);
};
diff --git a/src/pages/examination/components/feedback.vue b/src/pages/examination/components/feedback.vue
index af602101..26378cbc 100644
--- a/src/pages/examination/components/feedback.vue
+++ b/src/pages/examination/components/feedback.vue
@@ -43,7 +43,6 @@
\ No newline at end of file
+
diff --git a/src/store/audioStore.js b/src/store/audioStore.js
index 823df7ce..169a7086 100644
--- a/src/store/audioStore.js
+++ b/src/store/audioStore.js
@@ -68,7 +68,7 @@ export const useAudioStore = defineStore('audioStore', {
// 音频可以播放时触发(此时通常能获取到时长)
this.audioInstance.onCanplay(() => {
// 尝试获取时长(部分环境需要延迟一点)
- console.log('尝试获取时长(部分环境需要延迟一点)');
+ // console.log('尝试获取时长(部分环境需要延迟一点)');
setTimeout(() => {
const duration = this.audioInstance.duration || 0;
console.log('尝试获duration', duration);
@@ -208,7 +208,6 @@ export const useAudioStore = defineStore('audioStore', {
},
// 注册播放完成回调
onAudioEnded(callback) {
- console.log('onAudioEnded');
if (typeof callback === 'function') {
this.callbacks.onEnded = callback;
}
@@ -216,7 +215,6 @@ export const useAudioStore = defineStore('audioStore', {
// 注册播放错误回调
onAudioError(callback) {
- console.log('注册播放错误回调');
if (typeof callback === 'function') {
this.callbacks.onError = callback;
}