代码第二部分
async uploadToDetect() {
try {
if (this.isDetection) {
return
}
let res = await fileSelect();
LoadingDialog.showLoading("分析中")
let serverData = await bugFileUpload(getContext(this), res);
LoadingDialog.hide();
this.recordData.recordId = JSON.parse(serverData)["recordId"]
this.recordData.imageResultPath = JSON.parse(serverData)["imageResultPath"]
this.isDetection = true;
let list = await getRecordDetail(this.recordData.recordId!)
this.list = list.data;
this.insectIds = this.list.map(item => parseInt(item.insectId)) + "";
this.getStream()
} catch (e) {
LoadingDialog.hide();
this.isDetection = false;
}
}
try {
if (this.isDetection) {
return
}
let res = await fileSelect();
LoadingDialog.showLoading("分析中")
let serverData = await bugFileUpload(getContext(this), res);
LoadingDialog.hide();
this.recordData.recordId = JSON.parse(serverData)["recordId"]
this.recordData.imageResultPath = JSON.parse(serverData)["imageResultPath"]
this.isDetection = true;
let list = await getRecordDetail(this.recordData.recordId!)
this.list = list.data;
this.insectIds = this.list.map(item => parseInt(item.insectId)) + "";
this.getStream()
} catch (e) {
LoadingDialog.hide();
this.isDetection = false;
}
}
下一篇:我们都一样
声明:以上文章均为用户自行添加,仅供打字交流使用,不代表本站观点,本站不承担任何法律责任,特此声明!如果有侵犯到您的权利,请及时联系我们删除。
文章熱度:★☆☆☆☆
文章難度:★★★★★
文章質量:☆☆☆☆☆
說明:系統根據文章的熱度、難度、質量自動認證,已認證的文章將參與打字排名!
本文打字排名TOP20
登录后可见
類別:代码 時間:2025-11-25 13:12:29 收藏數:19 評分:0