Commit ee4bad1f by 岑成威

fix: 新加手机号码参数

1 parent 49c81bf3
...@@ -233,6 +233,7 @@ import { ...@@ -233,6 +233,7 @@ import {
shouldShowDailyGuide, shouldShowDailyGuide,
markDailyGuideShown markDailyGuideShown
} from '@/utils/aiAssistant/AiAssistantPref.js' } from '@/utils/aiAssistant/AiAssistantPref.js'
import { storageApi } from '@/utils/cache'
import RecordService from '@/utils/recordManager/RecordService.js' import RecordService from '@/utils/recordManager/RecordService.js'
import { getAiStreamSession } from '@/utils/aiAssistant/aiStreamSession.js' import { getAiStreamSession } from '@/utils/aiAssistant/aiStreamSession.js'
import { TransportType } from '@/utils/socket' import { TransportType } from '@/utils/socket'
...@@ -609,6 +610,7 @@ export default { ...@@ -609,6 +610,7 @@ export default {
'info', 'info',
`encode ${this.encodeCostMs}ms, request POST /api/audio/chat session=${sessionId}` `encode ${this.encodeCostMs}ms, request POST /api/audio/chat session=${sessionId}`
) )
const userInfo = storageApi.getUserInfo() || {}
let res let res
const tReqStart = Date.now() const tReqStart = Date.now()
try { try {
...@@ -621,7 +623,8 @@ export default { ...@@ -621,7 +623,8 @@ export default {
audio: audioBase64, audio: audioBase64,
sample_rate: 16000, sample_rate: 16000,
sample_width: 2, sample_width: 2,
channels: 1 channels: 1,
phone: userInfo.phone || ''
}, },
onTask: (task) => { onTask: (task) => {
this.helpAnswerAbort = () => { this.helpAnswerAbort = () => {
......
...@@ -309,7 +309,7 @@ class RecordService { ...@@ -309,7 +309,7 @@ class RecordService {
const useWs = !!wsBase const useWs = !!wsBase
const transport = useWs ? TransportType.WEBSOCKET : TransportType.HTTP const transport = useWs ? TransportType.WEBSOCKET : TransportType.HTTP
// HTTP 服务端固定为 /health(可在 AiAssistantBall 内按需覆盖) // HTTP 服务端固定为 /health(可在 AiAssistantBall 内按需覆盖)
const httpBaseUrl = 'https://lightmodification.test.glsx.com.cn' const httpBaseUrl = 'https://lightmodification.glsx.com.cn'
const client = new NativeChannelClient( const client = new NativeChannelClient(
useWs ? { transport } : { transport, baseUrl: httpBaseUrl } useWs ? { transport } : { transport, baseUrl: httpBaseUrl }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!