合并冲突

This commit is contained in:
杨航
2026-01-26 08:34:06 +08:00
12 changed files with 112 additions and 62 deletions
+2 -2
View File
@@ -4,10 +4,10 @@ ENV = 'development'
#VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7002'
#VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7001'
#VITE_APP_BASE_API_Url = 'http://25.64.32.154:9601'
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://192.168.247.200'
+2 -2
View File
@@ -4,8 +4,8 @@ ENV = 'development.yh'
# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001'
# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786'
VITE_APP_BASE_H5_API_Url = 'http://25.18.122.78:9786'
VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786'
# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.78:9786'
# VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002'
# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.32.154:9604'
# VITE_APP_BASE_H5_API_Url_TRAPRACTICE = 'http://25.64.32.156:9603'
+11 -11
View File
@@ -2,11 +2,11 @@
<view class="item" :class="{'no-touch':qnsTyp === 'ES' && !isDisabled && ['examination', 'practice', 'mistake_in', 'pk_in'].includes(props.mode)}">
<view class="top">
<!-- v-if="!['study'].includes(props.mode)" -->
<view class="type" v-if="!['study_answer'].includes(props.mode)">{{ subject_type_text }}</view>
<view class="type" v-if="!['study_answer', 'study_record'].includes(props.mode)">{{ subject_type_text }}</view>
<view class="score" v-if="['settlement', 'examination', 'pk_in'].includes(props.mode)">
{{ item.tgtGrade }}
</view>
<view class="score answerMethod" v-if="['study','examination', 'practice'].includes(props.mode)">
<view class="score answerMethod" v-if="['study','examination', 'practice'].includes(props.mode) && qnsTyp === 'ES'">
{{ answerMethod }}
</view>
<view class="fl1"></view>
@@ -44,14 +44,13 @@
</template>
</view>
</view>
<view class="question_text" v-if="!['study_answer'].includes(props.mode)">
<view class="question_text" v-if="!['study_answer', 'study_record'].includes(props.mode)">
{{ subject_data.qnsContent }}
</view>
<view :style="{ height: animationHeight }" :class="{ collapse_wrapper: props.mode === 'mistake' }" ref="wrapperRef">
<view class="collapse-content" ref="contentRef">
<view class="option_div" v-if="!['study_answer'].includes(props.mode)">
<view class="option_div" v-if="!['study_answer', 'study_record'].includes(props.mode)">
<template v-if="qnsTyp === 'ES'">
<questionVue
:status="subject_data.es_status"
:dataInfo="props.item?.my_answer"
@@ -75,7 +74,7 @@
class="option_div_button"
v-if="
qnsTyp === 'MU' &&
['practice', 'study', 'study_answer', 'pk_in', 'mistake_in'].includes(props.mode) &&
['practice', 'study', 'study_answer', 'study_record', 'pk_in', 'mistake_in'].includes(props.mode) &&
!props.isPreview &&
clearResult
"
@@ -96,7 +95,7 @@
class="analysis_div"
v-if="
!clearResult &&
['study', 'study_answer', 'mistake', 'settlement', 'practice', 'mistake_in', 'practice_record', 'pk_in'].includes(props.mode)
['study', 'study_answer', 'study_record', 'mistake', 'settlement', 'practice', 'mistake_in', 'practice_record', 'pk_in'].includes(props.mode)
"
>
<view class="analysis_title" v-if="qnsTyp !== 'ES'">
@@ -106,7 +105,7 @@
<text :class="right_or_wrong_class ? 'success' : 'error'">{{ myResultLabel.join('') }}</text>
</view>
</view>
<view class="reference_answer" v-if="qnsTyp === 'ES' && !['study', 'study_answer'].includes(props.mode)">
<view class="reference_answer" v-if="qnsTyp === 'ES' && !['study', 'study_answer', 'study_record'].includes(props.mode)">
<view class="reference_answer_title">你的答案:</view>
{{ subject_data.anserResult ?? '' }}
</view>
@@ -171,7 +170,7 @@
// 学习: study
// 考试结算页 settlement
// 练习记录页 practice_record, 'practice_record'
return ['examination', 'practice', 'mistake', 'mistake_in', 'study', 'study_answer', 'settlement', 'practice_record', 'pk_in'].includes(
return ['examination', 'practice', 'mistake', 'mistake_in', 'study', 'study_answer', 'study_record', 'settlement', 'practice_record', 'pk_in'].includes(
value
);
}
@@ -318,7 +317,7 @@
if (item_answer.value.includes(analysisVo.itemId)) {
item_answer.value = item_answer.value.filter((id) => id !== analysisVo.itemId);
modelValue.value = item_answer.value;
if (!['study','study_answer'].includes(props.mode)) {
if (!['study','study_answer', 'study_record'].includes(props.mode)) {
muCheckbox('choose');
}
} else if (props.item.qnsTyp === 'SN') {
@@ -332,7 +331,7 @@
// 多选直接插入
item_answer.value.push(analysisVo.itemId);
modelValue.value = item_answer.value;
if (!['study','study_answer'].includes(props.mode)) {
if (!['study','study_answer', 'study_record'].includes(props.mode)) {
muCheckbox('choose');
}
} else if (props.item.qnsTyp === 'JD') {
@@ -473,6 +472,7 @@
margin-top: 28rpx;
}
.reference_answer {
white-space: pre-line;
.reference_answer_title {
font-weight: 700;
font-size: 30rpx;
@@ -84,11 +84,11 @@
imgId: {
handler(newval, oldval) {
if (newval.indexOf('/') === 0) {
this.imgUrlShow = this.base_url + newval;
this.imgUrlShow = this.base_url + newval + '?tk=' + this.token;
return;
}
if (newval.indexOf('http') === 0) {
this.imgUrlShow = newval;
this.imgUrlShow = newval + '?tk=' + this.token;
return;
}
if (newval && this.watching) {
+11 -9
View File
@@ -157,15 +157,17 @@ export default function useCheckIn() {
checkInDays: localStatus.checkInDays,
popUpStatus: localStatus.popupDay === today
}
let holidayBody = {
rewardFlag: localStatus.rewardFlag,
obtainFlag: localStatus.obtainFlag
}
// 如果没有记录获取节日徽章,那么需要重新获取节日徽章信息
if(holidayBody.rewardFlag && !holidayBody.obtainFlag) {
const {body:holidayData} = await queryHolidayReward()
holidayBody = holidayData
}
// let holidayBody = {
// rewardFlag: localStatus.rewardFlag,
// obtainFlag: localStatus.obtainFlag
// }
// // 如果没有记录获取节日徽章,那么需要重新获取节日徽章信息
// if(holidayBody.rewardFlag && !holidayBody.obtainFlag) {
// const {body:holidayData} = await queryHolidayReward()
// holidayBody = holidayData
// }
// 永远重新获取节日
const {body:holidayBody} = await queryHolidayReward()
complete(checkInInfo, holidayBody)
return true;
}
@@ -487,6 +487,14 @@
});
}
};
const clearInputText = (text = '') => {
let oldText = answerValue.value
answerValue.value = text;
return oldText
}
const give_up = () => {
console.log('调用结束语音回答');
};
const changeBtn = () => {
if (props.isDisabled) return;
keyboardIsShow.value = !keyboardIsShow.value;
@@ -495,6 +503,7 @@
onHide(() => {
isGettingPermission.value = true
})
defineExpose({clearInputText, give_up})
</script>
<style lang="scss" scoped>
@@ -66,8 +66,7 @@
modelValue: Object
});
import {ANSWER_METHOD_MAP} from '@/enum.js'
const answerMethod = computed(() => ANSWER_METHOD_MAP[props.item?.answerMethod || ''] || ANSWER_METHOD_MAP['01']);
const answerMethod = computed(() => ANSWER_METHOD_MAP[props.modelValue?.answerMethod || ''] || ANSWER_METHOD_MAP['01']);
const previewFile = info => {
previewFileFnc({
fileId: info.fileId,
@@ -6,15 +6,17 @@
</view>
<view class="qns-desc">你的答案</view>
<view class="ans-list">
<!-- {...item, ossAddr: 'http://25.18.122.91:9786' + item.ossAddr.slice(35,)} -->
<esQuestionAnswer v-for="item in dataInfo.analyContentVos" :dataInfo="item" :intrctWay="item.ossKey?'02':'01'"
:activeVoiceId="activeVoiceId" @changePlay="changePlay" />
</view>
<view class="analysis_div">
<slot></slot>
<!-- <view class="analysis_div">
<view class="analysis_title">
<view class="success_answer">参考答案{{ dataInfo.itemAnswer }}</view>
</view>
<view class="analysis_note">试题解析{{ dataInfo?.analyContent }}</view>
</view>
</view> -->
</view>
</template>
@@ -54,7 +56,6 @@
});
const emit = defineEmits(['changePlay', 'buutton_click']);
const changePlay = (val) => {
console.log('esq')
emit('changePlay', val)
}
watch(
@@ -119,6 +120,8 @@
font-size: 30rpx;
margin-top: 20rpx;
margin-bottom: 20rpx;
font-weight: bold;
color: #333333;
}
.talking-info {
@@ -49,6 +49,9 @@
import {
onUnload
} from '@dcloudio/uni-app';
import {
getToken
} from '@/common/common.js'
const props = defineProps({
dataInfo: {
default: () => ({
@@ -135,21 +138,23 @@
emit('buutton_click', type, props.dataInfo);
};
const pauseVoice = () => {
console.log('pauseVoice')
if (!talkVoiceObj.value) return;
talkVoiceObj.value.pause();
isPlaying.value = false;
emit('changePlay', '');
// emit('changePlay', '');
};
const playVoice = () => {
emit('changePlay', unref(dataInfo)?.ossAddr);
// emit('changePlay', unref(dataInfo)?.ossAddr);
if (talkVoiceObj.value && talkVoiceObj.value.src) {
talkVoiceObj.value.play();
isPlaying.value = true;
return;
} else {
talkVoiceObj.value.src = '';
// talkVoiceObj.value.src = '';
if (unref(dataInfo).ossAddr) {
setTimeout(() => {
talkVoiceObj.value.src = unref(dataInfo).ossAddr;
talkVoiceObj.value.src = unref(dataInfo).ossAddr + '?tk=' + getToken();
talkVoiceObj.value.play();
isPlaying.value = true;
}, 100);
@@ -160,22 +165,26 @@
talkVoiceObj.value = uni.createInnerAudioContext();
let prevTime = -1;
talkVoiceObj.value.onEnded(() => {
console.log('onEnded')
emit('changePlay', '');
prevTime = -1;
talkVoiceObj.value.src = '';
});
talkVoiceObj.value.onStop(() => {
console.log('onStop')
emit('changePlay', '');
prevTime = -1;
talkVoiceObj.value.src = '';
});
talkVoiceObj.value.onPause(() => {
console.log('onPause')
prevTime = talkVoiceObj.value.currentTime;
emit('changePlay', '');
});
talkVoiceObj.value.onError(() => {
prevTime = -1;
emit('changePlay', '');
console.log('onError')
// prevTime = -1;
// emit('changePlay', '');
});
talkVoiceObj.value.onPlay(() => {
prevTime = talkVoiceObj.value.currentTime;
@@ -194,12 +203,8 @@
}, 500);
}
});
if (unref(dataInfo).intrctWay === '02') {
itemVoice.value = unref(dataInfo).ossAddr;
talkVoiceObj.value.src = itemVoice.value;
setTimeout(() => {
setVoiceTime(0);
}, 100);
if (unref(dataInfo).ossKey) {
talkVoiceObj.value.src = unref(dataInfo).ossAddr + '?tk=' + getToken();
}
};
const setVoiceTime = (sum) => {
@@ -31,10 +31,13 @@
{{ showContent }}
</text>
<!-- 试题问题 -->
<Subject v-if="[4, 8].indexOf(type) >= 0" :isPreview="!isLast" :item="subjectInfo"
:mode="mode" :clearResult="type === 4" @subject_click="subject_click" />
<!-- <esQuestion v-if="[4, 8].indexOf(type) >= 0 && dataInfo.qnsTyp === 'ES'" @changePlay="changePlay"
:activeVoiceId="activeVoiceId" :dataInfo="esSubjectInfo" /> -->
<esQuestion v-if="[4, 8].indexOf(type) >= 0 && dataInfo.qnsTyp === 'ES'" @changePlay="changePlay"
:activeVoiceId="activeVoiceId" :dataInfo="esSubjectInfo">
<Subject :isPreview="!isLast" :item="subjectInfo"
:mode="mode" :clearResult="type === 4" @subject_click="subject_click" />
</esQuestion>
<Subject v-if="[4, 8].indexOf(type) >= 0 && dataInfo.qnsTyp !== 'ES'" :isPreview="!isLast" :item="subjectInfo"
mode="study" :clearResult="type === 4" @subject_click="subject_click" />
<!-- 试题问题反馈 -->
<!-- <RadioSubjectRequest v-if="[8].indexOf(type) >= 0 && dataInfo.qnsTyp !== 'ES'" :item="dataInfo" :mode="mode" @subject_click="subject_click" /> -->
<!-- 段落图片视频预览 -->
@@ -257,7 +260,7 @@
})
return _sum
})
const mode = ref('study') // 考试 examination 练习practice 学习study
const mode = ref('study_record') // 考试 examination 练习practice 学习study
const showWithdraw = computed(() => {
let _isMe = unref(lastQuestionInfo).qstLogId === unref(dataInfo).qstLogId
+15 -1
View File
@@ -96,7 +96,21 @@
</view>
</view>
<view class="touch-btn-div" :class="{ show: showTouchBtn }">
<TouchBtnOnlyVoice
v-if="answerMethod === '03'"
class="talk-btns"
ref="touchBtnRef"
@uploadVoice="touchBtnSubmit('voice', $event)"
@submitAnswer="touchBtnSubmit('text', $event)"
:isLoading="touchIsDisabled"
loadingText="只能进行一条回答"
:adjustPosition="false"
:isDisabled="false"
:onlyVoice="true"
:answerMethod="answerMethod"
/>
<TouchBtn
v-else
class="talk-btns"
ref="touchBtnRef"
@uploadVoice="touchBtnSubmit('voice',$event)"
@@ -162,6 +176,7 @@
import Subject from '@/components/examination/subject.vue';
// import TouchBtn from '@/components/examination/touchBtn.vue';
import TouchBtn from '@/pages/course/components/touchBtn.vue';
import TouchBtnOnlyVoice from '@/pages/course/components/touchBtnOnlyVoice.vue';
import { ref, reactive, computed, onMounted, nextTick } from 'vue';
import { onLoad, onBackPress } from '@dcloudio/uni-app';
import common from '@/common/common';
@@ -169,7 +184,6 @@
import { commonUploadVoiceFile } from '@/api/common.js';
import { optionErrorIcon, examinationSheetIcon, practiceExitIcon } from '@/common/imgSvg';
import { commitPaperExam, commitCrsExam, commitPaperCache } from '@/api/examination.js';
const answerIsOver = ref(true);
const feedbackRef = ref(null);
const dialogRef = ref(null);
+28 -13
View File
@@ -64,20 +64,36 @@
</swiper-item>
</swiper>
</view>
<view class="fixed-box font_pf" :style="{ marginBottom: popup_input_bottom }">
<view class="touch-btn-div" :class="{ show: showTouchBtn }">
<TouchBtn
<TouchBtnOnlyVoice
v-if="answerMethod === '03'"
class="talk-btns"
ref="touchBtnRef"
@uploadVoice="touchBtnSubmit('voice',$event)"
@submitAnswer="touchBtnSubmit('text',$event)"
@uploadVoice="touchBtnSubmit('voice', $event)"
@submitAnswer="touchBtnSubmit('text', $event)"
:isLoading="touchIsDisabled"
loadingText="只能进行一条回答"
:adjustPosition="false"
:isDisabled="false"
:onlyVoice="true"
:answerMethod="answerMethod"
/>
<TouchBtn
v-else
class="talk-btns"
ref="touchBtnRef"
@uploadVoice="touchBtnSubmit('voice', $event)"
@submitAnswer="touchBtnSubmit('text', $event)"
:isLoading="touchIsDisabled"
loadingText="只能进行一条回答"
:adjustPosition="false"
:isDisabled="false"
:answerMethod="answerMethod"
/>
</view>
</view>
<!-- 反馈组件 -->
@@ -97,6 +113,7 @@
import CharactersSubject from '@/components/examination/characters-subject.vue';
// import TouchBtn from '@/components/examination/touchBtn.vue';
import TouchBtn from '@/pages/course/components/touchBtn.vue';
import TouchBtnOnlyVoice from '@/pages/course/components/touchBtnOnlyVoice.vue';
import common from '@/common/common';
import { setPageCache, formatSeconds, getPageCache, setupKeyboardHeightListener } from '@/common/common';
import { commonUploadVoiceFile } from '@/api/common.js';
@@ -104,7 +121,6 @@
import { practiceAnswer, practiceCommit, queryCrsPracticeAnswerResult } from '@/api/practice.js';
import { startExamByCrs } from '@/api/examination.js';
import { startPracticeByCrs } from '@/api/practice.js';
const swiperRef = ref(null);
const feedbackRef = ref(null);
const dialogRef = ref(null);
@@ -117,7 +133,7 @@
let leaveStartTime = 0; //
const mode = ref('practice'); // examination practice
const systemInfo = uni.getSystemInfoSync();
const paperData = reactive({
exrId: '',
crsId: '',
@@ -365,16 +381,15 @@
paperData.crsId = practice.crsId;
paperData.name = practice.name;
paperData.exrId = practice.exrId;
answerMethod.value = practice.answerMethod ?? '01';
storageTopicList.value = practice.qnsInfoVos.map((res) => ({
...res,
isPreview: false,
clearResult: true,
es_status: '', // '' 00 01
my_answer: [],
answerMethod:answerMethod.value
answerMethod: answerMethod.value
}));
answerMethod.value = practice.answerMethod ?? '01'
console.log('answerMethod', answerMethod.value);
addProblem();
//
practiceStartTime = new Date().getTime();
@@ -477,12 +492,12 @@
onUnload(() => {
stopTimer();
});
onBackPress((res) => {
if(res.from === 'backbutton') {
exit_practice()
if (res.from === 'backbutton') {
exit_practice();
return true;
}
}
});
</script>