fix(dispatch): 拣货拍照分区并展示有效预约审核依据
This commit is contained in:
@@ -67,7 +67,14 @@ export default {
|
||||
const filePath = chosen.tempFilePaths?.[0]; if (!filePath) return
|
||||
if (chosen.tempFiles?.[0]?.size > 10 * 1024 * 1024) throw new Error('请选择不超过10MiB的图片')
|
||||
this.pending = { slot, key: this.key() }; this.persist()
|
||||
const photo = await uploadLoadingPhoto(this.number, slot, filePath, this.pending.key); this.ensureScope()
|
||||
let photo
|
||||
try { photo = await uploadLoadingPhoto(this.number, slot, filePath, this.pending.key) }
|
||||
catch (cause) {
|
||||
this.ensureScope()
|
||||
if (/^(?:A0|HTTP_)?400$/.test(String(cause.code))) { this.pending = null; this.persist() }
|
||||
throw cause
|
||||
}
|
||||
this.ensureScope()
|
||||
this.pending.photo = photo; this.persist(); await this.bind(); return true
|
||||
}, true)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user