[lisa-feat]feat: 增加image_id
This commit is contained in:
@@ -316,7 +316,7 @@ Page({
|
||||
|
||||
setTimeout(() => {
|
||||
this.setData({
|
||||
imageId: recognitionResult.id,
|
||||
imageId: recognitionResult.image_id,
|
||||
bubbleList,
|
||||
animationStage: 'result',
|
||||
showResultArea: true
|
||||
|
||||
@@ -741,9 +741,9 @@ class ApiManager {
|
||||
}
|
||||
|
||||
// 获取识别结果
|
||||
async recognizeGetTask(taskId: string | number): Promise<{task_id: string, status: string, error_message: string, result?: IRecognitionResult}> {
|
||||
async recognizeGetTask(taskId: string | number): Promise<{image_id: string, task_id: string, status: string, error_message: string, result?: IRecognitionResult}> {
|
||||
|
||||
const response = await this.request<{task_id: string, status: string, error_message: string, result?: IRecognitionResult}>(`/api/v1/image/recognize/task/${taskId}`, 'GET')
|
||||
const response = await this.request<{image_id: string, task_id: string, status: string, error_message: string, result?: IRecognitionResult}>(`/api/v1/image/recognize/task/${taskId}`, 'GET')
|
||||
|
||||
console.log('图片识别成功:', response.data)
|
||||
return response.data
|
||||
@@ -773,7 +773,11 @@ class ApiManager {
|
||||
console.log('--lisa-res', res)
|
||||
if (res.status === 'completed' && res.result) {
|
||||
recognitionResult = {
|
||||
'res': res.result
|
||||
'res': res.result,
|
||||
'task_id': task_id,
|
||||
'status': res.status,
|
||||
'error_message': res.error_message,
|
||||
'image_id': res.image_id
|
||||
}
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user