diff --git a/src/api/arraybuffer.js b/src/api/arraybuffer.js
index 45a922f2..fd835f86 100644
--- a/src/api/arraybuffer.js
+++ b/src/api/arraybuffer.js
@@ -23,8 +23,8 @@ function streamRequest(options) {
onError
} = options
- headers['Accept'] = 'text/event-stream'
- headers['Content-Type'] = 'application/json;charset=UTF-8'
+ // headers['Accept'] = 'text/event-stream'
+ headers['Content-Type'] = 'text/event-stream'
headers['summary'] = token
// 创建请求任务
@@ -33,8 +33,10 @@ function streamRequest(options) {
method,
data,
header: headers,
+ responseType: 'arraybuffer',
...baseConfig,
success: (res) => {
+ console.log(res.data)
onComplete?.(res)
},
fail: (err) => {
diff --git a/src/pages/course/components/talkingItem.vue b/src/pages/course/components/talkingItem.vue
index 4140086e..4cbb7541 100644
--- a/src/pages/course/components/talkingItem.vue
+++ b/src/pages/course/components/talkingItem.vue
@@ -1,4 +1,4 @@
-
+
@@ -79,6 +79,24 @@
+
+
+
+
+
+
+ {{ dataInfo?.userInfo?.teacherName }}
+ {{dataInfo?.userInfo?.teacherDesc}}
+
+
+
+
+
+ {{ showContent }}
+
+
+
+
@@ -162,7 +180,6 @@ import ChartThree from "./chartThree.vue"
import common from '@/common/common';
import { getUserInfo } from '@/common/common';
import { useStorageStore } from "@/store/storage.js"
-import { demoUsage } from "@/api/arraybuffer.js"
import { onUnload } from '@dcloudio/uni-app'
const storageStore = useStorageStore()
@@ -249,6 +266,7 @@ const audioCacheObj = computed(() => storageStore.audioObj)
else if(props.type === 4) return unref(dataInfo)?.chatContent || unref(dataInfo)?.qnsContent
else if(props.type === 5) return unref(dataInfo)?.chatContent || unref(dataInfo)?.evalContent
else if(props.type === 0) return unref(dataInfo)?.chatContent || unref(dataInfo)?.talkingContent
+ else return unref(dataInfo)?.chatContent || unref(dataInfo)?.talkingContent
}
})
const showContent = computed(() => {
@@ -256,13 +274,6 @@ const audioCacheObj = computed(() => storageStore.audioObj)
return _str.replace(/\/n/g,"\n")
})
- onMounted(()=>{
- // demoUsage({
- // question: unref(dataInfo)?.pgrphContent,
- // streaming: true
- // })
- // if(props.isTransform){}
- })
onUnload(()=>{
pauseVoice()
})
@@ -406,6 +417,7 @@ const audioCacheObj = computed(() => storageStore.audioObj)
.ai-answer{
width: 100%;
overflow: hidden;
+ margin-bottom: 20rpx;
.user-info{
overflow: hidden;
.avatar-box{
@@ -584,6 +596,7 @@ const audioCacheObj = computed(() => storageStore.audioObj)
.user-answer{
overflow: hidden;
width: 100%;
+ margin-bottom: 20rpx;
.user-info{
overflow: hidden;
.avatar-box{
diff --git a/src/pages/course/index.vue b/src/pages/course/index.vue
index ccaa3359..03089a63 100644
--- a/src/pages/course/index.vue
+++ b/src/pages/course/index.vue
@@ -4,6 +4,7 @@
+
课程中心
@@ -112,17 +113,17 @@
+