解决学习页面bug
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@ ENV = 'development'
|
||||
VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
|
||||
|
||||
# app入口
|
||||
VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
|
||||
VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002'
|
||||
#VITE_APP_BASE_API_Url = 'http://25.16.122.65:7001'
|
||||
#VITE_APP_BASE_API_Url = 'http://25.16.122.91:9786'
|
||||
#VITE_APP_BASE_API_Url = 'http://25.18.122.66:9786'
|
||||
|
||||
@@ -741,10 +741,14 @@ onShow(() => {
|
||||
})
|
||||
const watchFlag = ref(1)
|
||||
onUnload(() => {
|
||||
changePlayItemId()
|
||||
teacherVoiceObj?.stop?.()
|
||||
teacherVoiceObj.src = ''
|
||||
socketStore.closeSocket()
|
||||
changePlayItemId('')
|
||||
console.log(typeof teacherVoiceObj);
|
||||
try{
|
||||
teacherVoiceObj?.stop()
|
||||
teacherVoiceObj.src = ''
|
||||
// 0910杨航叫我这么改的
|
||||
} catch {}
|
||||
})
|
||||
const testAnswer = computed(() => {
|
||||
if (talkingList.value.length < 5) return true
|
||||
|
||||
@@ -389,19 +389,11 @@
|
||||
answerCacheList.value = common.getValue(examinationAnswerCacheKey);
|
||||
if (typeof answerCacheList.value !== 'object') {
|
||||
answerCacheList.value = {};
|
||||
paperData.isCacheExam = 'N'
|
||||
paperData.isCacheExam = 'N';
|
||||
}
|
||||
|
||||
|
||||
topicList.push(
|
||||
...examination.qnsInfoVos.map((res) => {
|
||||
// const es_status =
|
||||
// paperData.isCacheExam === 'N'
|
||||
// ? ''
|
||||
// : res.qnsId in answerCacheList.value
|
||||
// ? 'ossKey' in answerCacheList.value[res.qnsId]
|
||||
// ? '02'
|
||||
// : '01'
|
||||
// : '';
|
||||
const es_status = (() => {
|
||||
try {
|
||||
// 基础数据校验
|
||||
@@ -428,12 +420,6 @@
|
||||
return ''; // 错误情况下的默认值,可根据业务调整
|
||||
}
|
||||
})();
|
||||
// const my_answer =
|
||||
// paperData.isCacheExam === 'N'
|
||||
// ? []
|
||||
// : res.qnsId in answerCacheList.value
|
||||
// ? answerCacheList.value[res.qnsId]
|
||||
// : [];
|
||||
const my_answer = (() => {
|
||||
try {
|
||||
// 基础数据校验
|
||||
@@ -552,12 +538,7 @@
|
||||
b: res.my_answer,
|
||||
c: !!res.my_answer
|
||||
}));
|
||||
|
||||
const incompleteNumber = topicList.length - completeList.length;
|
||||
console.log('incompleteNumber', incompleteNumber);
|
||||
console.log('completeList', completeList);
|
||||
console.log('topicList', topicList);
|
||||
|
||||
if (incompleteNumber === 0) {
|
||||
// 完成
|
||||
dialogConfiguration.title = '确认现在交卷吗?';
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<text class="color_2">{{ detailData.taskFinishSums ?? 0 }}/{{ detailData.taskSums ?? 0 }}</text>
|
||||
</view>
|
||||
<view class="num_div_item">
|
||||
<text class="color_3">进度:</text>
|
||||
<text class="color_3">我的进度:</text>
|
||||
<text class="color_2">{{ detailData.finishCrs ?? 0 }}/{{ detailData.sumCrs ?? 0 }}门课程</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -97,9 +97,18 @@
|
||||
page.value = 1;
|
||||
data_list.length = 0;
|
||||
};
|
||||
const updateData = (item) => {
|
||||
// const index = data_list.findIndex((res) => res.taskId === item.taskId);
|
||||
|
||||
// console.log('updateData', index, item);
|
||||
// if (index !== -1) {
|
||||
// data_list[index] = item;
|
||||
// }
|
||||
};
|
||||
defineExpose({
|
||||
getData,
|
||||
search,
|
||||
updateData,
|
||||
clear
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -117,7 +117,10 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import {
|
||||
onLoad,
|
||||
onUnload
|
||||
} from '@dcloudio/uni-app'
|
||||
import { reactive, computed } from 'vue';
|
||||
import { startTraExamPapersInfo } from '@/api/examination.js';
|
||||
import common from '@/common/common';
|
||||
@@ -201,6 +204,16 @@
|
||||
Object.assign(detailData, {
|
||||
...testing_hall_details
|
||||
});
|
||||
uni.$on('exam_completed', (res) => { // 考试完成,考试中心这里任务要完成
|
||||
|
||||
console.log('refresh_testing_hall_data');
|
||||
// contentRefs.value[0]?.updateData(res);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
onUnload(() => {
|
||||
uni.$off('exam_completed');
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -44,7 +44,8 @@
|
||||
onMounted
|
||||
} from 'vue'
|
||||
import {
|
||||
onLoad
|
||||
onLoad,
|
||||
onUnload
|
||||
} from '@dcloudio/uni-app'
|
||||
import {
|
||||
setPageCache
|
||||
@@ -92,6 +93,19 @@
|
||||
immediate: true
|
||||
}) // 这里的immediate会在onMounted之后执行
|
||||
})
|
||||
|
||||
|
||||
onLoad(() => {
|
||||
uni.$on('refresh_testing_hall_data', (res) => {
|
||||
// console.log('exam_completed');
|
||||
// contentRefs.value[0]?.updateData(res);
|
||||
// contentRefs.value[1]?.updateData(res);
|
||||
// contentRefs.value[2]?.updateData(res);
|
||||
});
|
||||
});
|
||||
onUnload(() => {
|
||||
uni.$off('refresh_testing_hall_data');
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user