修复练习不弹出徽章bug

This commit is contained in:
田岩
2025-11-26 11:37:44 +08:00
parent 5a954c677b
commit 8ef06ef926
3 changed files with 10 additions and 6 deletions
+5 -2
View File
@@ -61,7 +61,7 @@
<script setup>
import { onLoad } from '@dcloudio/uni-app';
import { onMounted, ref, onUnmounted } from 'vue';
import { onMounted, ref, onUnmounted, nextTick } from 'vue';
import common from '@/common/common';
import { setPageCache } from '@/common/common';
import { startExamByCrs } from '@/api/examination.js';
@@ -174,6 +174,7 @@
console.log('提交练习状态成功');
commit.value = true;
pointAndBadgesRun('04', crsId.value, (status, msg, { points, pointsBadges, message }) => {
console.log(status, msg, points, pointsBadges, message );
if(!status) return;
if (points?.length > 0) {
showData.value.num = points[0]['changePoints'];
@@ -183,7 +184,9 @@
if (pointsBadges.length > 0) {
nextTick(() => {
setTimeout(() => {
badgeRef.value.open([], pointsBadges);
badgeRef.value.open([], pointsBadges, () => {
badgeRef.value.close()
});
}, pop_up_time);
});
}