拍照支持裁剪
This commit is contained in:
@@ -53,7 +53,7 @@ Component({
|
||||
this.setData({
|
||||
currentNumber: e.detail,
|
||||
calcNumber: isNaN(Number(e.detail)) ? 0 : Number(e.detail),
|
||||
diff: isNaN(Number(e.detail)) ? "-" : Number(e.detail) - this.data.meterInfo?.overall
|
||||
diff: isNaN(Number(e.detail)) ? "-" : (Number(e.detail) - this.data.meterInfo?.overall).toFixed(2)
|
||||
})
|
||||
},
|
||||
handleClear() {
|
||||
@@ -82,7 +82,7 @@ Component({
|
||||
})
|
||||
alertSuccess("获取成功")
|
||||
} else {
|
||||
alertInfo("未能获取到")
|
||||
alertInfo("未能识别数字")
|
||||
}
|
||||
},
|
||||
async onSubmit() {
|
||||
@@ -98,6 +98,11 @@ Component({
|
||||
alertError(message)
|
||||
return
|
||||
}
|
||||
this.setData({
|
||||
currentNumber: null,
|
||||
calcNumber: null,
|
||||
diff: "-"
|
||||
})
|
||||
alertSuccess("录入成功")
|
||||
const that = this;
|
||||
setTimeout(async () => {
|
||||
@@ -115,11 +120,11 @@ Component({
|
||||
if (res.confirm) {
|
||||
// await that.changeEndStatus()
|
||||
wx.navigateBack()
|
||||
const pages = getCurrentPages();
|
||||
const prevPage = pages[pages.length - 2];
|
||||
if (prevPage.init){
|
||||
prevPage.init()
|
||||
}
|
||||
// const pages = getCurrentPages();
|
||||
// const prevPage = pages[pages.length - 2];
|
||||
// if (prevPage.init){
|
||||
// prevPage.init()
|
||||
// }
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user