Merge branch 'develop' of http://25.13.9.101:9000/K17_AITS/tra-app into develop

This commit is contained in:
田岩
2025-09-25 10:25:44 +08:00
5 changed files with 16 additions and 10 deletions
+1 -1
View File
@@ -711,7 +711,7 @@
<style lang="scss">
.ai-answer {
width: 100%;
// overflow: hidden;
overflow: hidden;
margin-bottom: 20rpx;
.user-info {
+7 -3
View File
@@ -113,9 +113,13 @@
adjustPosition: {
default: false,
type: Boolean
}
},
formatType: {
default: 'mp3',// 生成语音文件类型
type: String
},
});
const { isDisabled, onlyVoice, adjustPosition } = toRefs(props);
const { isDisabled, onlyVoice, adjustPosition, formatType } = toRefs(props);
const isLoadingState = computed(() => props.isLoading);
const showTalkingModel = ref(false);
@@ -225,7 +229,7 @@
const startRecord = () => {
isStartNum.value += 1;
unref(recordObjCom).start({
format: 'mp3'
format: formatType.value
});
};
+2 -3
View File
@@ -206,7 +206,6 @@
const isContinue = ref('N')
// 初始化数据
const getData = async flag => {
isContinue.value = 'N'
try {
const {
body
@@ -247,9 +246,9 @@
.then(res => {
if (res) {
// 继续学习 获取学习历史接口
isContinue.value = 'Y'
// 滚动到最下面
scrollToBottomNow()
isContinue.value = 'Y'
sendMessage({
commond: 'STDY',
body: {
@@ -823,7 +822,7 @@
crsId: crsId.value,
teacherNo: choiceTeacher.value,
studyType: isPreview.value ? 'P' : 'S',
isContinue: isContinue.value,
isContinue: 'Y',
stdyId: stdyId.value
}).then(res => {
const {
+3 -2
View File
@@ -50,7 +50,7 @@
:activeVoiceId="activeVoiceTalkingItemId" @handleEvents="talkItemEvents"></TalkingItem>
</scroll-view>
</view>
<TouchBtn class="talk-btns" @uploadVoice="uploadRecordNow" @submitAnswer="submitAnswerNow"
<TouchBtn class="talk-btns" @uploadVoice="uploadRecordNow" @submitAnswer="submitAnswerNow" formatType="wav"
@startRecord="startRecordCallback" :loadingText="sendLoadingText" :isLoading="!answerIsOver"
:adjustPosition="true" :isDisabled="isHistory" />
</scroll-view>
@@ -605,8 +605,9 @@
isLoading: true
});
scrollToBottomNow();
commonUploadVoiceFile(voicePath, '/traask/traAskchat/voiceTrans', {})
commonUploadVoiceFile(voicePath, '/traask/traTestchat/voiceTrans', {})
.then((_res) => {
console.log(_res)
if (!!(_res.body.transContent || '').trim()) {
talkingList.value.pop();
askData.value = {
+3 -1
View File
@@ -38,7 +38,7 @@
<view class="ai-info">
<!-- <image src="@/static/images/dialog/pet-3.png" alt="" class="image-pet-bg"></image> -->
<image src="@/static/images/dialog/pet-bg-base.png" alt="" class="image-pet-bg"></image>
<image :src="userInfo?.mascotInfo?.imgAddr || ''" alt="" class="image-pet" mode="widthFix"></image>
<image :src="luimgAddr" alt="" class="image-pet" mode="widthFix"></image>
<view class="ai-info-bg-box">
<view class="hello-text">{{ userInfo ? 'Hi,我是' + userInfo?.mascotInfo?.mascotName : 'Hi' }}</view>
<view class="info-text">工作学习我都能帮你</view>
@@ -174,6 +174,7 @@
const feedbackRef = ref();
const watermarkRef = ref();
const userInfo = ref(getUserInfo());
const luimgAddr = computed(()=> unref(userInfo)?.mascotInfo?.imgAddr || '')
const userParams = '/' + (unref(userInfo)?.userName??'') + ' ' + (unref(userInfo)?.loginName??'');
const questionList = ref([
// '对公小程序开户流程?',
@@ -840,6 +841,7 @@
uni.offKeyboardHeightChange(setHeight);
});
onShow(() => {
userInfo.value = getUserInfo();
uni.onKeyboardHeightChange(setHeight);
nextTick(() => {
watermarkRef.value?.updateWatermarkText();