JLBA202505130001_关于吉林银行新建AI智能培训系统的需求_0120开发完成

This commit is contained in:
田岩
2026-01-09 17:32:32 +08:00
parent 8d89b52042
commit e8ef127f92
11 changed files with 167 additions and 132 deletions
+1
View File
@@ -3,6 +3,7 @@
xiangyuanhua@126.com
Xiang@1987
你的 App 专用密码:wais-pyeh-cmww-zqvc
法人实体名称:BANK OF JILIN CO.LTD
田岩UDID:
00008101-001911401152001E
+5 -1
View File
@@ -66,6 +66,9 @@
.max_page {
min-height: 100vh;
}
.no-touch {
touch-action: none !important;
}
// #endif
.mr-10 {
@@ -176,4 +179,5 @@
margin-right: 8rpx;
margin-left: 2rpx;
}
</style>
</style>
+44 -37
View File
@@ -284,38 +284,38 @@ function isLogin() {
* @returns {string} 最终的额外高度值(带单位)
*/
export const getExtraHeight = () => {
// 所有常量移入函数内部定义,TARGET_DEVICE_MODEL 改为数组类型
const TARGET_DEVICE_MODEL = ['XT2321-2']; // 目标设备型号数组(摩托罗拉razr 40 Ultra
const EXTRA_HEIGHT_TARGET = '15rpx'; // 目标设备额外高度
const EXTRA_HEIGHT_DEFAULT = '2rpx'; // 默认额外高度
try {
// 1. 优先读取缓存
const cachedHeight = getValue('extra_height', '');
if (cachedHeight) {
console.log('缓存有值直接返回', cachedHeight);
return cachedHeight; // 缓存有值直接返回
}
// 2. 缓存无值时,获取设备信息
const deviceInfo = uni.getDeviceInfo();
// 校验设备信息有效性
if (!deviceInfo || !deviceInfo.deviceModel) {
throw new Error('设备信息获取失败');
}
// 3. 判断设备型号(数组包含判断,适配多型号)
const isTargetDevice = TARGET_DEVICE_MODEL.includes(deviceInfo.deviceModel);
const finalHeight = isTargetDevice ? EXTRA_HEIGHT_TARGET : EXTRA_HEIGHT_DEFAULT;
// 所有常量移入函数内部定义,TARGET_DEVICE_MODEL 改为数组类型
const TARGET_DEVICE_MODEL = ['XT2321-2']; // 目标设备型号数组(摩托罗拉razr 40 Ultra
const EXTRA_HEIGHT_TARGET = '15rpx'; // 目标设备额外高度
const EXTRA_HEIGHT_DEFAULT = '2rpx'; // 默认额外高度
try {
// 1. 优先读取缓存
const cachedHeight = getValue('extra_height', '');
if (cachedHeight) {
console.log('缓存有值直接返回', cachedHeight);
return cachedHeight; // 缓存有值直接返回
}
// 2. 缓存无值时,获取设备信息
const deviceInfo = uni.getDeviceInfo();
// 校验设备信息有效性
if (!deviceInfo || !deviceInfo.deviceModel) {
throw new Error('设备信息获取失败');
}
// 4. 缓存结果(后续复用
setValue('extra_height', finalHeight);
return finalHeight; // 返回计算后的高度
// 3. 判断设备型号(数组包含判断,适配多型号
const isTargetDevice = TARGET_DEVICE_MODEL.includes(deviceInfo.deviceModel);
const finalHeight = isTargetDevice ? EXTRA_HEIGHT_TARGET : EXTRA_HEIGHT_DEFAULT;
} catch (error) {
// 5. 异常兜底:返回默认值并缓存
console.warn('获取/设置额外高度失败:', error.message);
setValue('extra_height', EXTRA_HEIGHT_DEFAULT);
return EXTRA_HEIGHT_DEFAULT;
}
// 4. 缓存结果(后续复用)
setValue('extra_height', finalHeight);
return finalHeight; // 返回计算后的高度
} catch (error) {
// 5. 异常兜底:返回默认值并缓存
console.warn('获取/设置额外高度失败:', error.message);
setValue('extra_height', EXTRA_HEIGHT_DEFAULT);
return EXTRA_HEIGHT_DEFAULT;
}
};
@@ -327,20 +327,27 @@ export function setupKeyboardHeightListener(updateCallback) {
return () => {};
// #endif
// #ifdef APP-PLUS
// 获取系统信息
const systemInfo = uni.getSystemInfoSync();
// 计算安全区域底部高度
const safeAreaBottomHeight = systemInfo.screenHeight - systemInfo.safeArea.bottom;
// 校验回调函数类型,避免非函数传入导致报错
if (typeof updateCallback !== 'function') {
console.error('setupKeyboardHeightListener: updateCallback 必须是函数');
return () => {};
}
// 定义处理函数
const handleKeyboardHeightChange = (res) => {
// 获取系统信息
const systemInfo = uni.getSystemInfoSync();
console.log('systemInfo', systemInfo);
// 计算安全区域底部高度
const safeAreaBottomHeight = systemInfo.screenHeight - systemInfo.safeArea.bottom;
console.log('计算安全区域底部高度', safeAreaBottomHeight);
let keyboardHeight = res.height;
console.log('软键盘高度', keyboardHeight);
// 仅在iOS端补偿安全区域高度
if (systemInfo.platform === 'ios') {
keyboardHeight = Math.max(0, keyboardHeight - safeAreaBottomHeight); // 避免负数
keyboardHeight = Math.max(0, keyboardHeight); // 避免负数
}
console.log('keyboardHeight', keyboardHeight);
// 通过回调函数更新外部的响应式变量
updateCallback(keyboardHeight);
};
+7 -4
View File
@@ -1,5 +1,5 @@
<template>
<view class="item">
<view class="item" :class="{'no-touch':qnsTyp === 'ES' && !isDisabled}">
<view class="top">
<view class="type">{{ subject_type_text }}</view>
<view class="score" v-if="['settlement', 'examination', 'pk_in'].includes(props.mode)">
@@ -190,7 +190,9 @@
const wrapperRef = ref(null);
const contentRef = ref(null);
const judgeResultStatus = computed(() => props.item.judgeResult === 'P');
const isDisabled = computed(() => {
return props.item?.es_status !== '' && props.item?.es_status !== undefined;
});
// 不是错题本就默认不折叠,错题本默认折叠
const animationState = ref(props.mode !== 'mistake' ? true : false);
const animationHeight = ref(props.mode !== 'mistake' ? '' : '0px');
@@ -380,7 +382,6 @@
left: 0;
/* 初始状态非激活文本透明且轻微下移 */
opacity: 0;
// transform: translateY(15rpx);
/* 添加过渡动画 */
transition: all 0.2s ease-out;
/* 确保文本占据空间一致 */
@@ -490,7 +491,9 @@
display: flex;
flex-direction: column;
padding-bottom: 40rpx;
user-select: none !important; /* 禁用文本选择 */
-webkit-user-select: none !important; /* iOS兼容 */
-webkit-touch-callout: none !important; /* 禁用iOS长按菜单 */
.top {
display: flex;
align-items: center;
+51 -54
View File
@@ -32,26 +32,24 @@
:src="holidayInfo.backgroundOssAddr"
></image-preview>
</view>
<!-- 顶部的字随机还是大额 -->
<view class="festival-text-div">{{ holidayInfo.holidayDesc }}</view>
<!-- 顶部的字-->
<view class="festival-main-div">
<image
class="festival-main-img"
mode="widthFix"
src="@/static/images/pointsAndRank/festival-main.png"
src="@/static/images/pointsAndRank/gift.png"
></image>
<view class="festival-text-div">{{ holidayInfo.holidayDesc }}</view>
<view class="festival-main-text">
<view class="festival-main-title">
{{ done.tipText }}
</view>
<view class="festival-main-number-div">
<text class="festival-main-number">
{{ score }}
</text>
<text class="festival-main-number-text">积分</text>
{{ score }}积分
</view>
</view>
</view>
<view class="festival-button-div" @click="startLottery()">{{ done.buttonText }}</view>
</view>
<view class="close-div" @click="close(false)"></view>
@@ -197,8 +195,8 @@
completeCallback = completeCb; // 关闭弹窗的回调
Object.assign(holidayInfo, holidayBody);
// if (!holidayInfo.rewardFlag || holidayInfo.obtainFlag) {
if (!holidayInfo.rewardFlag) {
if (!holidayInfo.rewardFlag || holidayInfo.obtainFlag) {
// if (!holidayInfo.rewardFlag) {
// 如果当前没有节日窗口,立刻返回回调函数
completeCallback({ status: false });
return;
@@ -238,68 +236,66 @@
// height: 56rpx;
// }
// }
.festival-text-div {
position: relative;
margin-left: 25rpx;
z-index: 60;
margin-top: 28rpx;
color: #ffffff;
font-style: normal;
font-weight: 600;
font-size: 58rpx;
color: #fffae8;
letter-spacing: 0.05em;
line-height: 77rpx;
text-shadow: 0px 4px 8px #d6061b;
text-align: left;
font-style: italic;
transform: skewX(2deg);
}
.festival-main-div {
// margin-top: 8rpx;
z-index: 20;
position: relative;
width: 530rpx;
height: 270rpx;
width: 444rpx;
height: 292rpx;
background: linear-gradient(0deg, #fce87e 0%, #fff298 38.9%, #ffffd4 100%);
box-shadow: 0px 4 8px 0px #e13520;
border-radius: 18rpx;
background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.5)) 2 2;
margin: 36rpx auto 0 auto;
.festival-main-img {
margin-left: 16rpx;
width: 530rpx;
width: 328rpx;
position: absolute;
left: 0;
top: 0;
right: -54rpx;
bottom: -80rpx;
}
.festival-main-text {
position: absolute;
left: 40rpx;
top: 50rpx;
left: 38rpx;
bottom: 10rpx;
width: 150rpx;
// background-color:red;
.festival-main-title {
font-weight: 600;
font-size: 34rpx;
color: #b24325;
line-height: 46rpx;
text-align: right;
font-weight: normal;
font-size: 30rpx;
color: #B24325;
line-height: 40rpx;
text-align: center;
}
.festival-main-number-div {
margin-top: 10rpx;
font-family: DINAlternate, DINAlternate;
color: #b24325;
line-height: 64rpx;
margin-top: 16rpx;
margin-bottom: 42rpx;
margin-right: 8rpx;
text-align: right;
white-space: nowrap;
.festival-main-number {
font-size: 64rpx;
font-weight: bold;
}
.festival-main-number-text {
font-size: 26rpx;
white-space: nowrap;
}
font-weight: 600;
font-size: 30rpx;
color: #B24325;
line-height: 25rpx;
text-align: center;
}
}
.festival-text-div {
z-index: 60;
width: 338rpx;
height: 136rpx;
padding-top: 0;
margin: 0 auto;
font-weight: 600;
font-size: 42rpx;
color: #B24325;
line-height: 62rpx;
text-align: center;
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: center;
}
}
.festival-button-div {
position: relative;
@@ -307,13 +303,14 @@
width: 360rpx;
height: 80rpx;
margin: 0 auto;
margin-top: 80rpx;
background-image: url('@/static/images/pointsAndRank/festival-button.png');
background-size: 100%;
background-repeat: no-repeat;
font-weight: 600;
text-align: center;
font-size: 32rpx;
color: #B24325;
color: #b24325;
line-height: 80rpx;
}
+11 -7
View File
@@ -1,5 +1,5 @@
<template>
<view class="main_div max_page">
<view class="main_div max_page no-touch">
<nav-bar :is_seat="true"></nav-bar>
<view class="nav-div">
<view class="title ellipsis-text">PK中</view>
@@ -93,11 +93,14 @@
<view class="fixed-box font_pf" :style="{ marginBottom: popup_input_bottom }">
<view class="touch-btn-div" :class="{ show: showTouchBtn }">
<TouchBtn
ref="touchBtnRef"
class="talk-btns"
@submit="touchBtnSubmit"
disabledText="只能进行一条回答"
:isDisabled="touchIsDisabled"
ref="touchBtnRef"
@uploadVoice="touchBtnSubmit('voice',$event)"
@submitAnswer="touchBtnSubmit('text',$event)"
:isLoading="touchIsDisabled"
loadingText="只能进行一条回答"
:adjustPosition="false"
:isDisabled="false"
/>
</view>
</view>
@@ -117,7 +120,8 @@
import Dialog from '@/pages/examination/components/dialog.vue';
import Subject from '@/components/examination/subject.vue';
import CharactersSubject from '@/components/examination/characters-subject.vue';
import TouchBtn from '@/components/examination/touchBtn.vue';
// import TouchBtn from '@/components/examination/touchBtn.vue';
import TouchBtn from '@/pages/course/components/touchBtn.vue';
import common from '@/common/common';
import { setPageCache, formatSeconds, getPageCache, setupKeyboardHeightListener, formatName } from '@/common/common';
import { commonUploadVoiceFile } from '@/api/common.js';
@@ -326,7 +330,7 @@
// 录音组件提交
const touchBtnSubmit = (type, submitObj) => {
const topic = topicList[questionNumber.value];
touchBtnRef.value?.clearinputText(); // 清除发送框数据
// touchBtnRef.value?.clearinputText(); // 清除发送框数据
if (type === 'voice') {
if (topic.es_status === '00') return;
topic.es_status = '00'; // 00转圈
+14 -7
View File
@@ -1,5 +1,5 @@
<template>
<view class="main_div max_page">
<view class="main_div max_page no-touch">
<nav-bar :is_seat="true"></nav-bar>
<view class="nav-div">
<view class="title ellipsis-text" @click="hand_in_paper_button_click()">
@@ -99,10 +99,13 @@
<TouchBtn
class="talk-btns"
ref="touchBtnRef"
@submit="touchBtnSubmit"
disabledText="只能进行一条回答"
:isLoading="!answerIsOver"
:isDisabled="touchIsDisabled"
@uploadVoice="touchBtnSubmit('voice',$event)"
@submitAnswer="touchBtnSubmit('text',$event)"
:isLoading="touchIsDisabled"
loadingText="只能进行一条回答"
:adjustPosition="false"
:isDisabled="false"
:answerMethod="answerMethod"
/>
</view>
</view>
@@ -157,7 +160,8 @@
import Feedback from './components/feedback.vue';
import Dialog from './components/dialog.vue';
import Subject from '@/components/examination/subject.vue';
import TouchBtn from '@/components/examination/touchBtn.vue';
// import TouchBtn from '@/components/examination/touchBtn.vue';
import TouchBtn from '@/pages/course/components/touchBtn.vue';
import { ref, reactive, computed, onMounted, nextTick } from 'vue';
import { onLoad, onBackPress } from '@dcloudio/uni-app';
import common from '@/common/common';
@@ -172,6 +176,7 @@
const popupRef = ref(null);
const touchBtnRef = ref(null);
const countDownRef = ref(null);
const answerMethod = ref('01');
let examinationStartTime = 0; // 考试开始时间
let examinationAnswerCacheKey;
const style_button_1 = {
@@ -306,7 +311,7 @@
// 录音按钮提交
const touchBtnSubmit = (type, submitObj) => {
const topic = topicList[questionNumber.value];
touchBtnRef.value?.clearinputText(); // 清除发送框数据
// touchBtnRef.value?.clearinputText(); // 清除发送框数据
if (type === 'voice') {
if (topic.es_status == '00') return;
topic.es_status = '00'; // 00转圈
@@ -389,6 +394,8 @@
paperData.flagQuery = examination.flagQuery || 'Y';
paperData.flagQueryDetail = examination.flagQueryDetail || 'Y';
mode = paperData.examId ? 'PAPERS' : 'CRS'; // 课程考试CRS,考试中心考试PAPERS
answerMethod.value = examination.answerMethod ?? '01'
console.log('answerMethod', answerMethod.value);
// 设置缓存的键的名称
examinationAnswerCacheKey = 'examinationAnswerCache' + paperData.execId;
+23 -6
View File
@@ -1,5 +1,5 @@
<template>
<view class="main_div max_page">
<view class="main_div max_page no-touch">
<nav-bar :is_seat="true"></nav-bar>
<view class="nav-div">
<view class="title ellipsis-text">
@@ -64,14 +64,26 @@
</swiper-item>
</swiper>
</view>
<view class="fixed-box font_pf" :style="{ marginBottom: popup_input_bottom }">
<view class="touch-btn-div" :class="{ show: showTouchBtn }">
<TouchBtn
<!-- <TouchBtn
ref="touchBtnRef"
class="talk-btns"
@submit="touchBtnSubmit"
disabledText="只能进行一条回答"
:isDisabled="touchIsDisabled"
/> -->
<TouchBtn
class="talk-btns"
ref="touchBtnRef"
@uploadVoice="touchBtnSubmit('voice',$event)"
@submitAnswer="touchBtnSubmit('text',$event)"
:isLoading="touchIsDisabled"
loadingText="只能进行一条回答"
:adjustPosition="false"
:isDisabled="false"
:answerMethod="answerMethod"
/>
</view>
</view>
@@ -90,7 +102,8 @@
import Dialog from '@/pages/examination/components/dialog.vue';
import Subject from '@/components/examination/subject.vue';
import CharactersSubject from '@/components/examination/characters-subject.vue';
import TouchBtn from '@/components/examination/touchBtn.vue';
// import TouchBtn from '@/components/examination/touchBtn.vue';
import TouchBtn from '@/pages/course/components/touchBtn.vue';
import common from '@/common/common';
import { setPageCache, formatSeconds, getPageCache, setupKeyboardHeightListener } from '@/common/common';
import { commonUploadVoiceFile } from '@/api/common.js';
@@ -103,12 +116,15 @@
const feedbackRef = ref(null);
const dialogRef = ref(null);
const touchBtnRef = ref(null);
const answerMethod = ref('01');
const practiceTime = ref(0); // 当前练习时间
let practiceStartTime = 0; // 练习开始时间
let practiceTimeTimer = null; // 练习计时器
let leaveDuration = 0; // 当前总计离开时间
let leaveStartTime = 0; // 离开开始时间
const mode = ref('practice'); // 考试 examination 练习practice
const systemInfo = uni.getSystemInfoSync();
const paperData = reactive({
exrId: '',
crsId: '',
@@ -301,7 +317,7 @@
// 录音组件提交
const touchBtnSubmit = (type, submitObj) => {
const topic = topicList[questionNumber.value];
touchBtnRef.value?.clearinputText(); // 清除发送框数据
// touchBtnRef.value?.clearinputText(); // 清除发送框数据
if (type === 'voice') {
if (topic.es_status === '00') return;
topic.es_status = '00'; // 00转圈
@@ -363,6 +379,8 @@
es_status: '', // 预设一下问答题的状态,'' 空为没有 00 转圈 01 播放,其他暂定
my_answer: []
}));
answerMethod.value = practice.answerMethod ?? '01'
console.log('answerMethod', answerMethod.value);
addProblem();
// 记录练习起始时间
practiceStartTime = new Date().getTime();
@@ -476,7 +494,6 @@
<style scoped lang="scss">
$bg-margin-left: 30rpx;
.popup_title_text {
color: red;
}
@@ -769,7 +786,7 @@
flex-direction: column;
background: linear-gradient(to top, #3480ff, #0066ff);
/* 确保背景占满整个视口高度 */
min-height: 100vh;
// min-height: 100vh;
margin: 0;
}
</style>
@@ -13,15 +13,6 @@
<subject :item="item" mode="mistake" :isPreview="true" :clearResult="false"></subject>
</view>
</view>
<!-- <view class="max_page detail-main">
<scroll-view :scroll-y="true" class="scroll-Y" :show-scrollbar="false" @scrolltolower="scrolltolower"> -->
<!-- <view class="content" v-for="(item, index) in data_list">
<subject :item="item" mode="mistake" :isPreview="true" :clearResult="false"></subject>
</view> -->
<!-- <list-no-data v-if="total === 0 && status == 'nomore'">暂无错题</list-no-data> -->
<!-- <uv-load-more v-if="total !== 0" :status="status" loadmore-text="轻轻上拉加载" :height="30"></uv-load-more> -->
<!-- </scroll-view>
</view> -->
<template #bottom>
<view class="fixed-box" v-if="show_fixed_button_statue"></view>
</template>
+11 -7
View File
@@ -1,5 +1,5 @@
<template>
<view class="main_div max_page">
<view class="main_div max_page no-touch">
<nav-bar :is_seat="true"></nav-bar>
<view class="nav-div">
<view class="title ellipsis-text">
@@ -64,11 +64,14 @@
<view class="fixed-box font_pf" :style="{ marginBottom: popup_input_bottom }">
<view class="touch-btn-div" :class="{ show: showTouchBtn }">
<TouchBtn
ref="touchBtnRef"
class="talk-btns"
@submit="touchBtnSubmit"
disabledText="只能进行一条回答"
:isDisabled="touchIsDisabled"
ref="touchBtnRef"
@uploadVoice="touchBtnSubmit('voice',$event)"
@submitAnswer="touchBtnSubmit('text',$event)"
:isLoading="touchIsDisabled"
loadingText="只能进行一条回答"
:adjustPosition="false"
:isDisabled="false"
/>
</view>
</view>
@@ -85,7 +88,8 @@
import Feedback from '@/pages/examination/components/feedback.vue';
import Dialog from '@/pages/examination/components/dialog.vue';
import Subject from '@/components/examination/subject.vue';
import TouchBtn from '@/components/examination/touchBtn.vue';
// import TouchBtn from '@/components/examination/touchBtn.vue';
import TouchBtn from '@/pages/course/components/touchBtn.vue';
import common from '@/common/common';
import { getPageCache, setupKeyboardHeightListener } from '@/common/common';
import { commonUploadVoiceFile } from '@/api/common.js';
@@ -288,7 +292,7 @@
// 录音组件提交
const touchBtnSubmit = (type, submitObj) => {
const topic = topicList[questionNumber.value];
touchBtnRef.value?.clearinputText(); // 清除发送框数据
// touchBtnRef.value?.clearinputText(); // 清除发送框数据
console.log('录音组件提交');
if (type === 'voice') {
if (topic.es_status == '00') return;
Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB