diff --git a/.env.development b/.env.development index 7ddd909a..8d53a6b2 100644 --- a/.env.development +++ b/.env.development @@ -6,18 +6,20 @@ 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 = 'https://aitstest.jlbank.com.cn:7002' -VITE_APP_BASE_H5_API_Url = 'http://25.18.122.67:7001' +# 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' # 任东 diff --git a/src/api/login.js b/src/api/login.js index 4e9e0601..9b9644e4 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -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 diff --git a/src/api/request.js b/src/api/request.js index c0ec1b72..9c602f2d 100644 --- a/src/api/request.js +++ b/src/api/request.js @@ -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(() => { diff --git a/src/components/examination/question.vue b/src/components/examination/question.vue index c64fc6c8..c07cb837 100644 --- a/src/components/examination/question.vue +++ b/src/components/examination/question.vue @@ -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( diff --git a/src/components/examination/touchBtn.vue b/src/components/examination/touchBtn.vue index e5ed1e6a..63ae6fd5 100644 --- a/src/components/examination/touchBtn.vue +++ b/src/components/examination/touchBtn.vue @@ -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) { diff --git a/src/pages.json b/src/pages.json index 201d7d54..0f86c625 100644 --- a/src/pages.json +++ b/src/pages.json @@ -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 } diff --git a/src/pages/courseDetail/index.vue b/src/pages/courseDetail/index.vue index 1fe4f7b8..d13730d8 100644 --- a/src/pages/courseDetail/index.vue +++ b/src/pages/courseDetail/index.vue @@ -97,23 +97,16 @@ 去学习 - 去练习 + 去练习 - - 去考试 - + 去考试 @@ -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('预览课程不允许考试'); diff --git a/src/pages/examination/index.vue b/src/pages/examination/index.vue index cd841d69..56442649 100644 --- a/src/pages/examination/index.vue +++ b/src/pages/examination/index.vue @@ -17,6 +17,7 @@ 剩余时间 - - - - {{ index + 1 }} + + + + + {{ index + 1 }} + - + !!(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, @@ -364,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 = '确认现在交卷吗?'; @@ -452,15 +466,10 @@ } 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); @@ -525,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 { @@ -642,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; } @@ -702,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; @@ -719,6 +735,7 @@ .grey { color: #b6e2ff; + white-space: nowrap; } .bold { diff --git a/src/pages/examination/result.vue b/src/pages/examination/result.vue index 345e999d..fa7d966c 100644 --- a/src/pages/examination/result.vue +++ b/src/pages/examination/result.vue @@ -15,22 +15,21 @@ :scroll-with-animation="true" :show-scrollbar="false" > - + 得分 - + -- {{ result.examGrade }} {{ result.examGrade }} - + 通过分数:{{ result.passGrade }} + 无法查看 - 失败乃成功之母,继续努力 - 考的不错啊,继续加油 - 考试结果计算中... + {{ statusText }} - - - - + + @@ -92,6 +74,7 @@ + 答题详情 - - - + + {{ groupIndex * 10 + index + 1 }} @@ -114,12 +96,15 @@ - - + + 你的等待会有更精确的结果,要耐心哦~ + + + 您暂无权限查看此试卷详情 +