JLBA202505130001_关于吉林银行新建AI智能培训系统的需求_合并冲突
This commit is contained in:
+5
-4
@@ -7,9 +7,7 @@ ENV = 'development'
|
||||
#VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7001'
|
||||
|
||||
|
||||
|
||||
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 = 'https://aitstest.jlbank.com.cn:7002'
|
||||
# VITE_APP_BASE_API_Url = 'http://192.168.247.200'
|
||||
@@ -17,7 +15,7 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
|
||||
# VITE_APP_BASE_API_Url = 'http://192.168.108.129'
|
||||
# dev
|
||||
|
||||
#VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
|
||||
VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
|
||||
|
||||
# sit
|
||||
|
||||
@@ -30,6 +28,9 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
|
||||
# DEV
|
||||
# app入口
|
||||
|
||||
|
||||
#VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786'
|
||||
|
||||
# VITE_APP_BASE_API_Url = 'http://25.18.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'
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<text class="tr">{{ item.gradeDimens }}:</text>
|
||||
<text class="td">{{ item.anlyGrade }}</text>
|
||||
<view class="your_answer" v-if="item.dimensCode === '01'">
|
||||
<rich-text :nodes="highlightedText" class="content" />
|
||||
<rich-text v-if="missingKeywords.length !== keywordsLength" :nodes="highlightedText" class="content" />
|
||||
<view class="mt-10" v-if="missingKeywords.length">
|
||||
<text class="">未命中:</text>
|
||||
<text v-for="(keyword, index) in missingKeywords" :key="index" class="miss-keyword-item">
|
||||
@@ -56,12 +56,15 @@
|
||||
return optionErrorIcon();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
const keywords = computed(() => {
|
||||
if (!props.value.relKeyword) return [];
|
||||
if (!props.value?.relKeyword) return [];
|
||||
return props.value.relKeyword.split(/[,、/]/).map((key) => key.trim());
|
||||
});
|
||||
|
||||
const keywordsLength = computed(() => {
|
||||
if (!props.value.relKeyword) return 0;
|
||||
return props.value.relKeyword.split(/[,、]/).map((key) => key.trim()).length;
|
||||
});
|
||||
const highlightedText = computed(() => {
|
||||
// 如果没有关键词,直接返回原文本
|
||||
if (!keywords.value.length) return '命中:' + props.anserResult;
|
||||
@@ -120,6 +123,39 @@
|
||||
|
||||
return missing;
|
||||
});
|
||||
// 找出答案中存在的关键词
|
||||
const hitKeywords = computed(() => {
|
||||
const relKeyword = props.value.relKeyword;
|
||||
if (!props.anserResult) {
|
||||
return [];
|
||||
}
|
||||
|
||||
// 步骤1:按顿号拆分关键词组
|
||||
const keywordGroups = relKeyword.split('、');
|
||||
const missing = [];
|
||||
// 步骤2:遍历每个关键词组,检查是否存在任意一种说法
|
||||
keywordGroups.forEach((group) => {
|
||||
// 拆分同关键词的不同说法(/ 分隔)
|
||||
const keywordVariants = group.split('/');
|
||||
let isFound = false;
|
||||
|
||||
// 检查答案中是否包含任意一种说法
|
||||
for (const variant of keywordVariants) {
|
||||
// 可选:增加 trim() 忽略首尾空格,提升匹配容错
|
||||
if (props.anserResult.trim().includes(variant.trim())) {
|
||||
isFound = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 未找到则加入缺失列表
|
||||
if (isFound) {
|
||||
missing.push(group);
|
||||
}
|
||||
});
|
||||
|
||||
return missing;
|
||||
});
|
||||
const click_option = () => {
|
||||
emit('click_option', props.analysisVo);
|
||||
};
|
||||
@@ -129,23 +165,22 @@
|
||||
.mt-10 {
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.analysis_div {
|
||||
:deep(.highlight) {
|
||||
color: #15b859;
|
||||
}
|
||||
}
|
||||
.success {
|
||||
background-color: #e7f8ed;
|
||||
.td {
|
||||
color: #15b859;
|
||||
}
|
||||
:deep(.highlight) {
|
||||
color: #15b859;
|
||||
}
|
||||
}
|
||||
.error {
|
||||
background-color: #fce8e9;
|
||||
.td {
|
||||
color: #f5212d;
|
||||
}
|
||||
:deep(.highlight) {
|
||||
color: #f5212d;
|
||||
}
|
||||
}
|
||||
|
||||
.your_answer {
|
||||
@@ -153,10 +188,19 @@
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
.keyword-text {
|
||||
color: #d70c18;
|
||||
text-decoration: underline;
|
||||
.hit-keyword-item{
|
||||
.keyword-text {
|
||||
color: #15b859;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
.miss-keyword-item{
|
||||
.keyword-text {
|
||||
color: #d70c18;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
.separator {
|
||||
}
|
||||
.analysis_div {
|
||||
@@ -176,13 +220,14 @@
|
||||
.dimension-line::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0.5em; /* 对齐padding-left的起始位置 */
|
||||
top: 1em; /* 垂直居中 */
|
||||
transform: translateY(-50%);
|
||||
width: 8px; /* 圆点大小(默认是4px左右,调大到8px) */
|
||||
height: 8px; /* 和宽度一致,保证圆形 */
|
||||
left: 0.5rem; /* 对齐padding-left的起始位置 */
|
||||
top: 0.5rem;
|
||||
// transform: translateY(-50%);
|
||||
width: 16rpx; /* 圆点大小(默认是4px左右,调大到8px) */
|
||||
height: 16rpx; /* 和宽度一致,保证圆形 */
|
||||
border-radius: 50%; /* 圆形 */
|
||||
background-color: #333; /* 圆点颜色,可自定义 */
|
||||
|
||||
}
|
||||
|
||||
.tr {
|
||||
|
||||
@@ -20,15 +20,16 @@
|
||||
required: true
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// 判断一下维度有没有关键词命中率这一项
|
||||
const isKeywordsStatus = computed(() => props.value.evalSettingVos.some(res => res.dimensCode === '01'));
|
||||
const keywords = computed(() => {
|
||||
if (!props.value.relKeyword) return [];
|
||||
return props.value.relKeyword.split(/[,、/]/).map((key) => key.trim());
|
||||
});
|
||||
|
||||
const highlightedText = computed(() => {
|
||||
// 如果没有关键词,直接返回原文本
|
||||
if (!keywords.value.length) return props.anserResult;
|
||||
if (!keywords.value.length || !isKeywordsStatus.value) return props.anserResult;
|
||||
// 构建正则表达式,匹配所有关键词(不区分大小写)
|
||||
// 对关键词进行转义,避免特殊字符影响正则
|
||||
const escapedKeywords = keywords.value.map((keyword) => keyword.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="item" :class="{'no-touch':qnsTyp === 'ES' && !isDisabled}">
|
||||
<view class="item" :class="{'no-touch':qnsTyp === 'ES' && !isDisabled && ['examination', 'practice', 'mistake_in', 'pk_in'].includes(props.mode)}">
|
||||
<view class="top">
|
||||
<view class="type">{{ subject_type_text }}</view>
|
||||
<view class="score" v-if="['settlement', 'examination', 'pk_in'].includes(props.mode)">
|
||||
@@ -9,7 +9,7 @@
|
||||
<view class="right">
|
||||
<!-- 反馈中心 -->
|
||||
<slot name="title-right"></slot>
|
||||
<view class="mark_and_feedback_div" v-if="['examination', 'practice'].includes(props.mode)">
|
||||
<view class="mark_and_feedback_div" v-if="['examination', 'practice', 'mistake_in'].includes(props.mode)">
|
||||
<image
|
||||
v-if="props.mode === 'examination'"
|
||||
:src="markIcon(props.item.mark ? '#e8b531' : '#ABABAB')"
|
||||
@@ -20,7 +20,7 @@
|
||||
:src="feedbackIcon()"
|
||||
class="img"
|
||||
@click="feedback_click()"
|
||||
v-if="props.mode2 !== 'mistake'"
|
||||
v-if="props.mode !== 'mistake_in'"
|
||||
></image>
|
||||
</view>
|
||||
<template v-if="['mistake'].includes(props.mode)">
|
||||
@@ -47,13 +47,14 @@
|
||||
<view class="collapse-content" ref="contentRef">
|
||||
<view class="option_div" v-show="props.showStem">
|
||||
<template v-if="qnsTyp === 'ES'">
|
||||
|
||||
<questionVue
|
||||
:status="subject_data.es_status"
|
||||
:dataInfo="props.item?.my_answer"
|
||||
:isPreview="props.isPreview"
|
||||
:activeVoiceId="subject_data.qnsId"
|
||||
@buutton_click="questionButtonClick"
|
||||
:button_complete_show="['practice', 'pk_in'].includes(props.mode)"
|
||||
:button_complete_show="['practice', 'pk_in', 'mistake_in'].includes(props.mode)"
|
||||
></questionVue>
|
||||
</template>
|
||||
<template v-else>
|
||||
@@ -70,7 +71,7 @@
|
||||
class="option_div_button"
|
||||
v-if="
|
||||
qnsTyp === 'MU' &&
|
||||
['practice', 'study', 'pk_in'].includes(props.mode) &&
|
||||
['practice', 'study', 'pk_in', 'mistake_in'].includes(props.mode) &&
|
||||
!props.isPreview &&
|
||||
clearResult
|
||||
"
|
||||
@@ -91,7 +92,7 @@
|
||||
class="analysis_div"
|
||||
v-if="
|
||||
!clearResult &&
|
||||
['study', 'mistake', 'settlement', 'practice', 'practice_record', 'pk_in'].includes(props.mode)
|
||||
['study', 'mistake', 'settlement', 'practice', 'mistake_in', 'practice_record', 'pk_in'].includes(props.mode)
|
||||
"
|
||||
>
|
||||
<view class="analysis_title" v-if="qnsTyp !== 'ES'">
|
||||
@@ -116,7 +117,7 @@
|
||||
<referenceAnswer
|
||||
v-if="qnsTyp === 'ES'"
|
||||
:value="subject_data.itemVos[0]"
|
||||
:anserResult="subject_data.anserResult"
|
||||
:anserResult="subject_data.itemVos[0]?.itemAnswer"
|
||||
></referenceAnswer>
|
||||
<view class="analysis_note" v-if="props.mode !== 'pk_in'">
|
||||
试题解析:{{ subject_data?.analyContent }}
|
||||
@@ -156,7 +157,7 @@
|
||||
},
|
||||
showStem: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
default: true
|
||||
},
|
||||
mode: {
|
||||
type: String,
|
||||
@@ -165,10 +166,11 @@
|
||||
// 考试: examination
|
||||
// 练习: practice
|
||||
// 错题本: mistake
|
||||
// 错题本重新答题中: mistake_in
|
||||
// 学习: study
|
||||
// 考试结算页 settlement
|
||||
// 练习记录页 practice_record, 'practice_record'
|
||||
return ['examination', 'practice', 'mistake', 'study', 'settlement', 'practice_record', 'pk_in'].includes(
|
||||
return ['examination', 'practice', 'mistake', 'mistake_in', 'study', 'settlement', 'practice_record', 'pk_in'].includes(
|
||||
value
|
||||
);
|
||||
}
|
||||
@@ -182,10 +184,6 @@
|
||||
clearResult: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
mode2: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -1,412 +0,0 @@
|
||||
<template>
|
||||
<uni-popup ref="popup" mask-background-color="rgba(0,0,0,0.9)">
|
||||
<view class="popup-content" @touchmove.stop catchmove="true" @touchmove.stop.prevent="handleTouchMove">
|
||||
<view class="fl1"></view>
|
||||
<view class="max-div">
|
||||
<view class="festival-text-pic-div">
|
||||
<image
|
||||
class="festival-text-img"
|
||||
mode="widthFix"
|
||||
src="@/static/images/pointsAndRank/festival-text.png"
|
||||
></image>
|
||||
</view>
|
||||
<image
|
||||
class="festival-bg-up-div"
|
||||
mode="widthFix"
|
||||
src="@/static/images/pointsAndRank/festival-bg-up.png"
|
||||
></image>
|
||||
<view class="max-area-div">
|
||||
<!-- 右上角百禄图标 -->
|
||||
<view class="festival-special-mascot">
|
||||
<image-preview
|
||||
class="festival-special-mascot-img"
|
||||
mode="widthFix"
|
||||
:src="holidayInfo.ossAddr"
|
||||
></image-preview>
|
||||
</view>
|
||||
<!-- 几个特殊节日的特殊背景 -->
|
||||
<view class="festival-special-bg" v-if="holidayInfo.backgroundOssAddr">
|
||||
<image-preview
|
||||
class="festival-special-bg-img"
|
||||
mode="widthFix"
|
||||
: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"
|
||||
></image>
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="festival-button-div" @click="startLottery()">{{ done.buttonText }}</view>
|
||||
</view>
|
||||
<view class="close-div" @click="close(false)"></view>
|
||||
</view>
|
||||
<view class="fl1"></view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { HolidayInfo, CompleteCallback, StartLotteryCallback } from './types/holiday';
|
||||
import { RewardType, AnimationStatus } from './types/holiday';
|
||||
import { ref, computed, reactive } from 'vue';
|
||||
import { optionErrorIcon, optionSuccessIcon } from '@/common/imgSvg';
|
||||
import { obtainRewardRandom } from '@/api/pointsAndRank';
|
||||
import common from '@/common/common';
|
||||
|
||||
const countToRef = ref(null);
|
||||
const popup = ref(null);
|
||||
const animationLoading = ref<AnimationStatus>(AnimationStatus.UNSTARTED);
|
||||
const done = computed(() =>
|
||||
holidayInfo.rewardType === RewardType.RANDOM_POINT
|
||||
? {
|
||||
tipText: '最高可获',
|
||||
buttonText: animationLoading.value === AnimationStatus.COMPLETED ? '开心收下' : '立即抽取'
|
||||
}
|
||||
: { tipText: '恭喜获得', buttonText: '开心收下' }
|
||||
);
|
||||
// 显示的分数
|
||||
const score = ref(10);
|
||||
let lotteryTimer: number | null = null;
|
||||
|
||||
const emits = defineEmits(['checkInFun']);
|
||||
|
||||
// 开始抽奖
|
||||
const startLottery = async () => {
|
||||
// 固定积分,或者随机积分但是已经抽全完毕,再次点击按钮就是关闭
|
||||
if (holidayInfo.rewardType === RewardType.FIXED_POINT || animationLoading.value === AnimationStatus.COMPLETED) {
|
||||
close(true);
|
||||
return;
|
||||
}
|
||||
// 正在抽取中防止重复点击
|
||||
if (animationLoading.value === AnimationStatus.LOADING) return;
|
||||
animationLoading.value = AnimationStatus.LOADING;
|
||||
// 访问接口获取结果
|
||||
if (lotteryTimer) clearInterval(lotteryTimer);
|
||||
startLotteryCallback({
|
||||
holidayCode: holidayInfo.holidayCode,
|
||||
successCb: (body) => {
|
||||
// const { body } = await obtainRewardRandom({ holidayCode: holidayInfo.holidayCode });
|
||||
const finalScore = body.val;
|
||||
// 记录已完成的循环圈数
|
||||
let completedLoops = 0;
|
||||
// 1. 数值范围(可自定义)
|
||||
const LOTTERY_MIN = body.start; // 最小值
|
||||
const LOTTERY_MAX = body.end; // 最大值
|
||||
// 2. 循环圈数
|
||||
const LOOP_TIMES = finalScore - LOTTERY_MIN > 10 ? 1 : 2;
|
||||
// 3. 跳动速度(ms/次,越大越慢)
|
||||
const JUMP_SPEED = 80;
|
||||
// 3. 核心:循环指定圈数后,最后一轮停在目标数字
|
||||
lotteryTimer = setInterval(() => {
|
||||
// 先判断:是否已完成指定圈数 + 当前轮次能精准到目标数字
|
||||
if (completedLoops >= LOOP_TIMES) {
|
||||
if (score.value === finalScore) {
|
||||
clearInterval(lotteryTimer!);
|
||||
lotteryTimer = null;
|
||||
animationLoading.value = AnimationStatus.COMPLETED;
|
||||
return;
|
||||
}
|
||||
// 最后一轮:继续递增(不重置)
|
||||
score.value += 1;
|
||||
} else {
|
||||
// 未完成指定圈数:正常循环(到max重置,计数+1)
|
||||
score.value += 1;
|
||||
// 当数值到max时,代表完成1圈
|
||||
if (score.value >= LOTTERY_MAX) {
|
||||
completedLoops += 1;
|
||||
score.value = LOTTERY_MIN; // 重置为最小值,开始下一圈
|
||||
}
|
||||
}
|
||||
}, JUMP_SPEED);
|
||||
},
|
||||
failCb: (res) => {
|
||||
console.log('报错');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const handleTouchMove = (e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
};
|
||||
// 节日奖励信息响应式对象
|
||||
const holidayInfo = reactive<HolidayInfo>({
|
||||
// 假日编码
|
||||
holidayCode: '',
|
||||
// 是否存在节日奖励(true:有奖励 false:无奖励)
|
||||
rewardFlag: false,
|
||||
// 奖励类型(枚举限定:1-固定积分 2-随机积分)
|
||||
rewardType: RewardType.RANDOM_POINT,
|
||||
// 文案
|
||||
holidayDesc: '',
|
||||
// 奖励分数(字符串类型,兼容不同格式的积分值)
|
||||
rewardPoints: 0,
|
||||
// 可以获得的最高分
|
||||
rangeEnd: 0,
|
||||
// 可以获得的最低分
|
||||
rangeStart: 0,
|
||||
// 奖励获取标识(true:已获取 false:未获取)
|
||||
obtainFlag: false,
|
||||
// 文案图片的OSS存储key(用于图片上传/读取标识)
|
||||
ossKey: '',
|
||||
// 文案图片的OSS访问地址(图片完整URL)
|
||||
ossAddr: '',
|
||||
// 背景图片的OSS存储key(用于图片上传/读取标识)
|
||||
backgroundOssKey: '',
|
||||
// 背景图片的OSS访问地址(图片完整URL)
|
||||
backgroundOssAddr: ''
|
||||
});
|
||||
let completeCallback: CompleteCallback | undefined; // 关闭弹窗的回调
|
||||
let startLotteryCallback: StartLotteryCallback | undefined; // 抽奖的回调
|
||||
|
||||
// 退出
|
||||
const close = (status: boolean): void => {
|
||||
uni.showTabBar({
|
||||
success() {
|
||||
popup.value.close();
|
||||
console.log('点击退出,执行回调函数');
|
||||
typeof completeCallback === 'function' &&
|
||||
completeCallback({
|
||||
status
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
const open = (
|
||||
holidayBody: any,
|
||||
lotteryCb: StartLotteryCallback = () => {},
|
||||
completeCb: CompleteCallback = () => {}
|
||||
): void => {
|
||||
startLotteryCallback = lotteryCb; // 抽奖的回调
|
||||
completeCallback = completeCb; // 关闭弹窗的回调
|
||||
|
||||
Object.assign(holidayInfo, holidayBody);
|
||||
// if (!holidayInfo.rewardFlag || holidayInfo.obtainFlag) {
|
||||
if (!holidayInfo.rewardFlag) {
|
||||
// 如果当前没有节日窗口,立刻返回回调函数
|
||||
completeCallback({ status: false });
|
||||
return;
|
||||
}
|
||||
// 设置初始得分
|
||||
if (holidayInfo.rewardType === RewardType.RANDOM_POINT) {
|
||||
score.value = holidayInfo.rangeEnd;
|
||||
} else {
|
||||
score.value = holidayInfo.rewardPoints;
|
||||
}
|
||||
animationLoading.value = AnimationStatus.UNSTARTED;
|
||||
uni.hideTabBar({
|
||||
success() {
|
||||
popup.value.open();
|
||||
}
|
||||
});
|
||||
};
|
||||
defineExpose({ open, close });
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.max-area-div {
|
||||
width: 520rpx;
|
||||
height: 542rpx;
|
||||
background-image: url('@/static/images/pointsAndRank/festival-bg.png');
|
||||
background-size: 100%;
|
||||
border-radius: 0 0 60rpx 60rpx;
|
||||
position: relative;
|
||||
|
||||
// .festival-tip-div {
|
||||
// z-index: 20;
|
||||
// position: relative;
|
||||
// margin-left: 16rpx;
|
||||
// margin-bottom: -16rpx;
|
||||
// .festival-tip-img {
|
||||
// margin-top: 30rpx;
|
||||
// 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;
|
||||
.festival-main-img {
|
||||
margin-left: 16rpx;
|
||||
width: 530rpx;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
.festival-main-text {
|
||||
position: absolute;
|
||||
left: 40rpx;
|
||||
top: 50rpx;
|
||||
width: 150rpx;
|
||||
// background-color:red;
|
||||
.festival-main-title {
|
||||
font-weight: 600;
|
||||
font-size: 34rpx;
|
||||
color: #b24325;
|
||||
line-height: 46rpx;
|
||||
text-align: right;
|
||||
}
|
||||
.festival-main-number-div {
|
||||
margin-top: 10rpx;
|
||||
font-family: DINAlternate, DINAlternate;
|
||||
color: #b24325;
|
||||
line-height: 64rpx;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.festival-button-div {
|
||||
position: relative;
|
||||
z-index: 20;
|
||||
width: 392rpx;
|
||||
height: 108rpx;
|
||||
margin: 0 auto;
|
||||
background-image: url('@/static/images/pointsAndRank/festival-button.png');
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
font-weight: 600;
|
||||
font-size: 38rpx;
|
||||
color: #b24325;
|
||||
line-height: 108rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.festival-special-bg {
|
||||
width: 520rpx;
|
||||
height: 542rpx;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
border-radius: 0 0 60rpx 60rpx;
|
||||
z-index: 10;
|
||||
.festival-special-bg-img {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.festival-special-mascot {
|
||||
z-index: 50;
|
||||
position: absolute;
|
||||
right: -36rpx;
|
||||
top: 70rpx;
|
||||
transform-origin: left bottom;
|
||||
transform: translateY(-100%);
|
||||
.festival-special-mascot-img {
|
||||
width: 180rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.festival-text-pic-div {
|
||||
width: 100%;
|
||||
.festival-text-img {
|
||||
width: 400rpx;
|
||||
}
|
||||
}
|
||||
.festival-bg-up-div {
|
||||
width: 580rpx;
|
||||
margin-bottom: -14rpx;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.popup-content {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: calc(10rpx + 2%) 0;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
.max-div {
|
||||
width: 600rpx;
|
||||
border-radius: 38rpx;
|
||||
position: relative;
|
||||
padding: 26rpx;
|
||||
margin-top: var(--status-bar-height);
|
||||
margin-bottom: calc(180rpx + 15%);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.close-div {
|
||||
// 基础样式:设置按钮大小、圆形、边框等
|
||||
margin-top: 50rpx;
|
||||
position: relative; // 为伪类定位做准备
|
||||
width: 62rpx; // 圆圈直径,可根据需求调整
|
||||
height: 62rpx;
|
||||
border: 4rpx solid #b9b9b9; // 圆圈边框
|
||||
border-radius: 50%; // 变成正圆
|
||||
box-sizing: border-box; // 保证边框不影响整体大小
|
||||
// 伪类通用样式:十字的基础线条
|
||||
&::before,
|
||||
&::after {
|
||||
content: ''; // 伪类必须有content
|
||||
position: absolute; // 绝对定位居中
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 24rpx; // 十字线条长度,可调整
|
||||
height: 4rpx; // 十字线条粗细,可调整
|
||||
background-color: #b9b9b9; // 十字颜色
|
||||
transform: translate(-50%, -50%); // 居中对齐
|
||||
}
|
||||
// 第一条线旋转45度
|
||||
&::before {
|
||||
transform: translate(-50%, -50%) rotate(45deg);
|
||||
}
|
||||
// 第二条线旋转-45度,组合成×
|
||||
&::after {
|
||||
transform: translate(-50%, -50%) rotate(-45deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -16,14 +16,6 @@
|
||||
src="@/static/images/pointsAndRank/festival-bg-up.png"
|
||||
></image>
|
||||
<view class="max-area-div">
|
||||
<!-- 右上角百禄图标 -->
|
||||
<view class="festival-special-mascot">
|
||||
<image-preview
|
||||
class="festival-special-mascot-img"
|
||||
mode="widthFix"
|
||||
:src="holidayInfo.ossAddr"
|
||||
></image-preview>
|
||||
</view>
|
||||
<!-- 几个特殊节日的特殊背景 -->
|
||||
<view class="festival-special-bg" v-if="holidayInfo.backgroundOssAddr">
|
||||
<image-preview
|
||||
@@ -34,12 +26,20 @@
|
||||
</view>
|
||||
<!-- 顶部的字-->
|
||||
<view class="festival-main-div">
|
||||
<!-- 右上角百禄图标 -->
|
||||
<view class="festival-special-mascot">
|
||||
<image-preview
|
||||
class="festival-special-mascot-img"
|
||||
mode="widthFix"
|
||||
:src="holidayInfo.ossAddr"
|
||||
></image-preview>
|
||||
</view>
|
||||
<view class="festival-text-div">{{ holidayInfo.holidayDesc }}</view>
|
||||
<image
|
||||
class="festival-main-img"
|
||||
mode="widthFix"
|
||||
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 }}
|
||||
@@ -49,7 +49,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="festival-button-div" @click="startLottery()">{{ done.buttonText }}</view>
|
||||
</view>
|
||||
<view class="close-div" @click="close(false)"></view>
|
||||
@@ -60,7 +60,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { HolidayInfo, CompleteCallback, StartLotteryCallback } from './types/holiday';
|
||||
import type { HolidayInfo, CompleteCallback, StartLotteryCallback,pointsBadges } from './types/holiday';
|
||||
import { RewardType, AnimationStatus } from './types/holiday';
|
||||
import { ref, computed, reactive } from 'vue';
|
||||
import { optionErrorIcon, optionSuccessIcon } from '@/common/imgSvg';
|
||||
@@ -73,7 +73,7 @@
|
||||
const done = computed(() =>
|
||||
holidayInfo.rewardType === RewardType.RANDOM_POINT
|
||||
? {
|
||||
tipText: '最高可获',
|
||||
tipText: animationLoading.value === AnimationStatus.COMPLETED ? '恭喜获得' : '最高可获',
|
||||
buttonText: animationLoading.value === AnimationStatus.COMPLETED ? '开心收下' : '立即抽取'
|
||||
}
|
||||
: { tipText: '恭喜获得', buttonText: '开心收下' }
|
||||
@@ -99,6 +99,8 @@
|
||||
startLotteryCallback({
|
||||
holidayCode: holidayInfo.holidayCode,
|
||||
successCb: (body) => {
|
||||
console.log('badgesList', body.badgesList);
|
||||
holidayInfo.badgesList = body.badgesList
|
||||
// const { body } = await obtainRewardRandom({ holidayCode: holidayInfo.holidayCode });
|
||||
const finalScore = body.val;
|
||||
// 记录已完成的循环圈数
|
||||
@@ -168,20 +170,35 @@
|
||||
// 背景图片的OSS存储key(用于图片上传/读取标识)
|
||||
backgroundOssKey: '',
|
||||
// 背景图片的OSS访问地址(图片完整URL)
|
||||
backgroundOssAddr: ''
|
||||
backgroundOssAddr: '',
|
||||
// 获得的徽章
|
||||
badgesList:[]
|
||||
});
|
||||
let completeCallback: CompleteCallback | undefined; // 关闭弹窗的回调
|
||||
let startLotteryCallback: StartLotteryCallback | undefined; // 抽奖的回调
|
||||
|
||||
// 退出
|
||||
const close = (status: boolean): void => {
|
||||
// 如果是固定积分,就设置一下
|
||||
console.log('如果是固定积分,就设置一下', holidayInfo.rewardType);
|
||||
|
||||
if(holidayInfo.rewardType === RewardType.FIXED_POINT) {
|
||||
startLotteryCallback({
|
||||
holidayCode: '',
|
||||
failCb: undefined,
|
||||
successCb: () => {
|
||||
console.log('设置成功');
|
||||
}
|
||||
})
|
||||
}
|
||||
uni.showTabBar({
|
||||
success() {
|
||||
popup.value.close();
|
||||
console.log('点击退出,执行回调函数');
|
||||
typeof completeCallback === 'function' &&
|
||||
completeCallback({
|
||||
status
|
||||
status,
|
||||
badgesList:holidayInfo.badgesList
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -193,7 +210,7 @@
|
||||
): void => {
|
||||
startLotteryCallback = lotteryCb; // 抽奖的回调
|
||||
completeCallback = completeCb; // 关闭弹窗的回调
|
||||
|
||||
console.log('holidayBody', holidayBody);
|
||||
Object.assign(holidayInfo, holidayBody);
|
||||
if (!holidayInfo.rewardFlag || holidayInfo.obtainFlag) {
|
||||
// if (!holidayInfo.rewardFlag) {
|
||||
@@ -281,8 +298,9 @@
|
||||
}
|
||||
|
||||
.festival-text-div {
|
||||
position: relative;
|
||||
z-index: 60;
|
||||
width: 338rpx;
|
||||
width: 100%;
|
||||
height: 136rpx;
|
||||
padding-top: 0;
|
||||
margin: 0 auto;
|
||||
@@ -333,8 +351,8 @@
|
||||
.festival-special-mascot {
|
||||
z-index: 50;
|
||||
position: absolute;
|
||||
right: -36rpx;
|
||||
top: 70rpx;
|
||||
right: -66rpx;
|
||||
top: 40rpx;
|
||||
transform-origin: left bottom;
|
||||
transform: translateY(-100%);
|
||||
.festival-special-mascot-img {
|
||||
|
||||
@@ -28,6 +28,14 @@ export interface HolidayInfo {
|
||||
ossAddr : string;
|
||||
backgroundOssKey : string;
|
||||
backgroundOssAddr : string;
|
||||
badgesList : Array<pointsBadges>;
|
||||
}
|
||||
|
||||
// 徽章弹窗列表项
|
||||
export interface pointsBadges {
|
||||
pointsBadgeImg:string;
|
||||
pointsBadgeName:string;
|
||||
remark:string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -38,6 +46,7 @@ export interface HolidayInfo {
|
||||
export interface CompleteCallback {
|
||||
(params : {
|
||||
status : boolean;
|
||||
badgesList : Array<pointsBadges>;
|
||||
}) : void;
|
||||
}
|
||||
|
||||
@@ -45,7 +54,7 @@ export interface CompleteCallback {
|
||||
/** 抽取积分成功的回调类型 */
|
||||
export interface LotterySuccessCb {
|
||||
// val 为抽取到的积分,start积分的最小数,end为积分的最大值
|
||||
(data : { val : number; start : number; end : number }) : void;
|
||||
(data : { val : number; start : number; end : number, badgesList : Array<pointsBadges>;}) : void;
|
||||
}
|
||||
|
||||
/** 抽取积分失败的回调类型 */
|
||||
|
||||
@@ -258,16 +258,22 @@ export default function useCheckIn() {
|
||||
successCb = () => {},
|
||||
failCb = () => {}
|
||||
}) => {
|
||||
obtainRewardRandom({
|
||||
holidayCode
|
||||
}).then(({body}) => {
|
||||
console.log('抽取成功回调', body);
|
||||
// 把缓存中的记录设置为已经抽取积分
|
||||
if(holidayCode) {
|
||||
obtainRewardRandom({
|
||||
holidayCode
|
||||
}).then(({body}) => {
|
||||
console.log('抽取成功回调', body);
|
||||
// 把缓存中的记录设置为已经抽取积分
|
||||
setLocalSignStatus({ obtainFlag: true});
|
||||
successCb?.(body);
|
||||
}).catch((error) => {
|
||||
failCb?.(error)
|
||||
})
|
||||
} else {
|
||||
setLocalSignStatus({ obtainFlag: true});
|
||||
successCb?.(body);
|
||||
}).catch((error) => {
|
||||
failCb?.(error)
|
||||
})
|
||||
successCb?.();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -330,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转圈
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<image class="talk-btn-icon" v-show="keyboardIsShow && !answerValue" src="/src/static/images/course/record.png"
|
||||
mode="" @click="changeBtn"></image>
|
||||
<image class="talk-btn-icon" v-show="keyboardIsShow && !!answerValue" src="/src/static/images/course/send.png"
|
||||
mode="" @click.stop="showKeyboard"></image>
|
||||
mode="" @click.stop="showKeyboard()"></image>
|
||||
</view>
|
||||
<!-- @click="showTalkingModel = false" -->
|
||||
<!-- <uv-popup ref="talkModelRef" mode="bottom" overlay-style="#000000" overlay-opacity="0.9"
|
||||
@@ -58,10 +58,10 @@
|
||||
<view class="trans-loading-box" v-show="transLoading">
|
||||
<CommonLoading color="#fff" class="loading-box" />
|
||||
</view>
|
||||
<view class="voice-input-box">
|
||||
<uv-textarea ref="inputRef" v-model="answerValue" :maxlength="props.textValueLength"
|
||||
v-show="!transLoading" @click.stop customStyle="background: #ffffff00; padding-bottom: 50rpx;"
|
||||
height="200rpx" text-style="color: #fff"
|
||||
<view class="voice-input-box">
|
||||
<uv-textarea ref="inputRef" v-model="answerValue" :maxlength="props.textValueLength" v-show="!transLoading"
|
||||
@click.stop customStyle="background: #ffffff00; padding-bottom: 50rpx; color: #fff; caret-color: #fff" height="200rpx"
|
||||
text-style="color: #fff"
|
||||
placeholderStyle="color:#999999;font-size:26rpx;border-color: #ffffff00 !important;"
|
||||
placeholder=""></uv-textarea>
|
||||
</view>
|
||||
@@ -151,6 +151,9 @@
|
||||
adjustPosition,
|
||||
formatType
|
||||
} = toRefs(props);
|
||||
|
||||
|
||||
|
||||
const isLoadingState = computed(() => props.isLoading);
|
||||
|
||||
const showTalkingModel = ref(false);
|
||||
@@ -267,7 +270,7 @@
|
||||
transLoading.value = false
|
||||
closeModel()
|
||||
uni.showToast({
|
||||
title: '系统异常,请联系管理员',
|
||||
title: err.message || '系统异常,请联系管理员',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
@@ -515,6 +518,7 @@
|
||||
// }
|
||||
isMoving.value = true;
|
||||
isTalking.value = true;
|
||||
answerValue.value = ''
|
||||
emit('startRecord');
|
||||
recNum.value += 1;
|
||||
let _recnum = recNum.value
|
||||
@@ -599,6 +603,12 @@
|
||||
common.msg('暂无问题需要回答!');
|
||||
}
|
||||
};
|
||||
//
|
||||
const clearInputText = (text = '') => {
|
||||
let oldText = answerValue.value
|
||||
answerValue.value = text;
|
||||
return oldText
|
||||
}
|
||||
const changeBtn = () => {
|
||||
if (props.isDisabled) return;
|
||||
keyboardIsShow.value = !keyboardIsShow.value;
|
||||
@@ -607,6 +617,7 @@
|
||||
onHide(() => {
|
||||
isGettingPermission.value = true
|
||||
})
|
||||
defineExpose({clearInputText})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -311,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转圈
|
||||
|
||||
@@ -126,18 +126,27 @@ import { onUnload } from '@dcloudio/uni-app';
|
||||
}
|
||||
}
|
||||
const setVoiceTime = (sum) => {
|
||||
sum += 1
|
||||
if(Math.ceil(talkVoiceObj.value.duration)>0){
|
||||
voiceTime.value = (Math.ceil(talkVoiceObj.value.duration) || 1 ) + 's'
|
||||
}else{
|
||||
if(sum === 20) {
|
||||
voiceTime.value = (unref(dataInfo).voiceTime || 0) + 's';
|
||||
return
|
||||
plus.io.getAudioInfo({
|
||||
filePath: unref(dataInfo).talkingVoice,
|
||||
success:(res)=>{
|
||||
voiceTime.value = (Math.floor(res.duration) || 1) + 's'
|
||||
},
|
||||
fail:(res)=>{
|
||||
voiceTime.value = (unref(dataInfo).voiceTime || 1) + 's'
|
||||
}
|
||||
setTimeout(()=>{
|
||||
setVoiceTime(sum)
|
||||
},200)
|
||||
}
|
||||
})
|
||||
// sum += 1
|
||||
// if(Math.ceil(talkVoiceObj.value.duration)>0){
|
||||
// voiceTime.value = (Math.ceil(talkVoiceObj.value.duration) || 1 ) + 's'
|
||||
// }else{
|
||||
// if(sum === 20) {
|
||||
// voiceTime.value = (unref(dataInfo).voiceTime || 0) + 's';
|
||||
// return
|
||||
// }
|
||||
// setTimeout(()=>{
|
||||
// setVoiceTime(sum)
|
||||
// },200)
|
||||
// }
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
+25
-11
@@ -45,31 +45,31 @@
|
||||
<!-- <view class="questions-view">
|
||||
<scroll-view :scroll-x="true" :show-scrollbar="false">
|
||||
<view class="question-row">
|
||||
<view
|
||||
class="question-item"
|
||||
v-for="item in Math.ceil(questionList.length / 2)"
|
||||
@click="sendText(questionList[item - 1].hotContent)"
|
||||
>
|
||||
<view class="question-item" v-for="item in Math.ceil(questionList.length / 2)"
|
||||
@click="sendText(questionList[item - 1].hotContent)">
|
||||
{{ questionList[item - 1].hotContent }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="question-row">
|
||||
<view
|
||||
class="question-item"
|
||||
v-for="item in questionList.length - Math.ceil(questionList.length / 2)"
|
||||
@click="sendText(questionList[item + Math.ceil(questionList.length / 2) - 1].hotContent)"
|
||||
>
|
||||
<view class="question-item" v-for="item in questionList.length - Math.ceil(questionList.length / 2)"
|
||||
@click="sendText(questionList[item + Math.ceil(questionList.length / 2) - 1].hotContent)">
|
||||
{{ questionList[item + Math.ceil(questionList.length / 2) - 1].hotContent }}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<<<<<<< HEAD
|
||||
</view> -->
|
||||
<view class="talking-list" v-show="talkingList.length > 0">
|
||||
=======
|
||||
</view>
|
||||
<view class="talking-list">
|
||||
>>>>>>> dev-0120
|
||||
<scroll-view class="talking-scroll-list" :scroll-y="true" :scroll-top="scrollTop" :show-scrollbar="false"
|
||||
:scroll-with-animation="false">
|
||||
<TalkingItem v-for="(item, index) in talkingList" :talkingType="item.type" :talkingInfo="item"
|
||||
:isLast="index + 1 === talkingList.length" :isAnswering="!answerIsOver"
|
||||
:activeVoiceId="activeVoiceTalkingItemId" @handleEvents="talkItemEvents"></TalkingItem>
|
||||
<<<<<<< HEAD
|
||||
|
||||
<view class="question-item-box mt-16" v-for="item in talkQnsList">
|
||||
<view class="question-item" @click="sendText(item.hotContent)">
|
||||
@@ -77,6 +77,8 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
=======
|
||||
>>>>>>> dev-0120
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="router-list">
|
||||
@@ -324,7 +326,8 @@
|
||||
if (commond === 'ASK') {
|
||||
console.log('发送问题成功!');
|
||||
if (talkingList.value.length > 0 && talkingList.value[talkingList.value.length - 1].isLoading) {
|
||||
talkingList.value.pop();
|
||||
// talkingList.value.pop();
|
||||
talkingList.value = talkingList.value.filter(t => !t.isLoading)
|
||||
}
|
||||
seqNo.value = body.seqNo;
|
||||
touchBtnCallBack.value && touchBtnCallBack.value();
|
||||
@@ -342,6 +345,7 @@
|
||||
isLoading: true,
|
||||
id: _id + 'loading'
|
||||
});
|
||||
answerIsOver.value = false;
|
||||
scrollToBottomNow();
|
||||
return;
|
||||
}
|
||||
@@ -364,6 +368,7 @@
|
||||
answerIsOver.value = false;
|
||||
answerText.value = '';
|
||||
talkingList.value.pop();
|
||||
talkingList.value = talkingList.value.filter(t => !t.isLoading)
|
||||
talkingList.value.push({
|
||||
type: 'answer',
|
||||
talkingText: answerText.value,
|
||||
@@ -409,6 +414,7 @@
|
||||
|
||||
if (commond === 'ASK-ERR') {
|
||||
console.log('提问失败,系统异常!');
|
||||
answerIsOver.value = true;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
@@ -728,6 +734,10 @@
|
||||
});
|
||||
} else {
|
||||
talkingList.value.pop();
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
talkingList.value = talkingList.value.filter(t => !t.isLoading)
|
||||
>>>>>>> dev-0120
|
||||
uni.showToast({
|
||||
title: '未识别到文字',
|
||||
icon: 'none',
|
||||
@@ -737,6 +747,7 @@
|
||||
})
|
||||
.catch((err) => {
|
||||
talkingList.value.pop();
|
||||
talkingList.value = talkingList.value.filter(t => !t.isLoading)
|
||||
uni.showToast({
|
||||
title: '系统异常,请联系管理员',
|
||||
icon: 'none',
|
||||
@@ -1196,10 +1207,13 @@
|
||||
box-sizing: border-box;
|
||||
min-height: 300rpx;
|
||||
|
||||
<<<<<<< HEAD
|
||||
&.talking-list-qns {
|
||||
height: calc(100% - 600rpx);
|
||||
}
|
||||
|
||||
=======
|
||||
>>>>>>> dev-0120
|
||||
.talking-scroll-list {
|
||||
height: 100%;
|
||||
|
||||
|
||||
+22
-11
@@ -309,20 +309,31 @@
|
||||
common.navigateTo('/pages/login/login');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
initCheckInStatus((checkInInfo, holidayBody) => {
|
||||
// 先判断是否有节日活动
|
||||
const handleCheckInComplete = (params) => {
|
||||
const {isSigned, checkInDays, popUpStatus} = checkInInfo
|
||||
setTimeout(() => {
|
||||
if(!isSigned && !popUpStatus) {
|
||||
checkInRef.value.open(isSigned, checkInDays, checkInFun, (status, days, pointsList = [], badgesList = []) => {
|
||||
handlePointsBadgePopup(pointsList, badgesList);
|
||||
});
|
||||
}
|
||||
}, 140)
|
||||
const handleCheckInComplete = ({ badgesList }) => {
|
||||
// 先判断弹窗
|
||||
console.log('badgesList', badgesList);
|
||||
const { isSigned, checkInDays, popUpStatus } = checkInInfo;
|
||||
setTimeout(() => {
|
||||
handlePointsBadgePopup([], badgesList, () => {
|
||||
setTimeout(() => {
|
||||
if (!isSigned && !popUpStatus) {
|
||||
checkInRef.value.open(
|
||||
isSigned,
|
||||
checkInDays,
|
||||
checkInFun,
|
||||
(status, days, pointsList = [], badgesList = []) => {
|
||||
handlePointsBadgePopup(pointsList, badgesList);
|
||||
}
|
||||
);
|
||||
}
|
||||
}, 140);
|
||||
});
|
||||
}, 140);
|
||||
};
|
||||
holidayRef.value?.open(holidayBody, startLotteryFun, handleCheckInComplete)
|
||||
holidayRef.value?.open(holidayBody, startLotteryFun, handleCheckInComplete);
|
||||
});
|
||||
const userInfo = getUserInfo();
|
||||
if (userInfo) {
|
||||
|
||||
@@ -67,13 +67,6 @@
|
||||
|
||||
<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"
|
||||
/> -->
|
||||
<TouchBtn
|
||||
class="talk-btns"
|
||||
ref="touchBtnRef"
|
||||
@@ -317,7 +310,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转圈
|
||||
@@ -383,6 +376,7 @@
|
||||
console.log('answerMethod', answerMethod.value);
|
||||
addProblem();
|
||||
// 记录练习起始时间
|
||||
|
||||
practiceStartTime = new Date().getTime();
|
||||
setupKeyboardHeightListener((height) => {
|
||||
popup_input_bottom.value = `${height}px`;
|
||||
|
||||
@@ -123,6 +123,11 @@ export default function useWebSocket(aaas = null, options = {}) {
|
||||
setPlayNumber(body.lock)
|
||||
}
|
||||
break;
|
||||
case MessageType.TEXT_MESSAGE:
|
||||
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
console.log('其他消息', msgType, body);
|
||||
break;
|
||||
|
||||
@@ -49,8 +49,7 @@
|
||||
<Subject
|
||||
v-else
|
||||
:item="item"
|
||||
:mode="mode"
|
||||
mode2="mistake"
|
||||
mode="mistake_in"
|
||||
:isPreview="item.isPreview"
|
||||
:clearResult="item.clearResult"
|
||||
@subject_click="subject_click"
|
||||
@@ -99,8 +98,6 @@
|
||||
const feedbackRef = ref(null);
|
||||
const dialogRef = ref(null);
|
||||
const touchBtnRef = ref(null);
|
||||
|
||||
const mode = ref('practice'); // 考试 examination 练习practice 错题本: mistake
|
||||
const paperData = reactive({
|
||||
name: '' // 名称
|
||||
}); // 试卷信息
|
||||
@@ -122,7 +119,7 @@
|
||||
|
||||
// 下面语音组件的禁用状态判断
|
||||
const touchIsDisabled = computed(() => topic.value?.es_status !== '' && topic.value?.es_status !== undefined);
|
||||
|
||||
|
||||
const progress = computed(() => {
|
||||
// 计算进度百分比(保留两位小数)
|
||||
const total = storageIdList.value.length;
|
||||
@@ -130,7 +127,7 @@
|
||||
const completed = questionNumber.value + 1;
|
||||
return Math.min(Math.round((completed / total) * 10000) / 100, 100);
|
||||
});
|
||||
|
||||
|
||||
// 滑动切换
|
||||
const swiperChange = (item) => {
|
||||
questionNumber.value = item.detail.current;
|
||||
@@ -292,8 +289,8 @@
|
||||
// 录音组件提交
|
||||
const touchBtnSubmit = (type, submitObj) => {
|
||||
const topic = topicList[questionNumber.value];
|
||||
// touchBtnRef.value?.clearinputText(); // 清除发送框数据
|
||||
console.log('录音组件提交');
|
||||
touchBtnRef.value?.clearInputText(); // 清除发送框数据
|
||||
console.log('录音组件提交', topic);
|
||||
if (type === 'voice') {
|
||||
if (topic.es_status == '00') return;
|
||||
topic.es_status = '00'; // 00转圈
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 120 KiB |
Reference in New Issue
Block a user