代码第二部分
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 收藏数:16 评分:0