feat: add voice transcription feedback workflow
This commit is contained in:
@@ -41,9 +41,21 @@ Page({
|
||||
this.setData({ testing: true, connectionText: '正在检测服务...', connectionTone: 'idle' })
|
||||
try {
|
||||
const health = await getHealth()
|
||||
let connectionText = '服务、数据库和语音转录正常'
|
||||
let connectionTone = 'success'
|
||||
if (!health.databaseConfigured) {
|
||||
connectionText = '服务正常,数据库尚未配置'
|
||||
connectionTone = 'warning'
|
||||
} else if (!health.speechConfigured) {
|
||||
connectionText = '服务和数据库正常,语音转录尚未配置'
|
||||
connectionTone = 'warning'
|
||||
} else if (!health.speechAvailable) {
|
||||
connectionText = '服务和数据库正常,本地语音模型尚未就绪'
|
||||
connectionTone = 'warning'
|
||||
}
|
||||
this.setData({
|
||||
connectionText: health.databaseConfigured ? '服务和数据库连接正常' : '服务正常,数据库尚未配置',
|
||||
connectionTone: health.databaseConfigured ? 'success' : 'warning'
|
||||
connectionText,
|
||||
connectionTone
|
||||
})
|
||||
} catch (error) {
|
||||
this.setData({ connectionText: getApiErrorMessage(error), connectionTone: 'error' })
|
||||
|
||||
Reference in New Issue
Block a user