Commit a4ac5e12 authored by gongguan's avatar gongguan

奖品图片上传图片操作较快时图片无法保存的bug

parent f6f20e7f
......@@ -41,6 +41,7 @@ Component({
OBJECT_TYPE,
LOWER_TYPE,
showDialogMask: true,
canSavePrize: true,
dialogTop: "",
rankTips: {
status: "success",
......@@ -292,9 +293,11 @@ Component({
})
},
uploadImage: throttleHandle(async function() {
if (!this.data.showDialogMask) return;
try {
this.setData({
showDialogMask: false,
canSavePrize: false
});
const res = await chooseImage();
this.setData({
......@@ -334,10 +337,12 @@ Component({
image: url,
},
showDialogMask: true,
canSavePrize: true
});
} catch (error) {
this.setData({
showDialogMask: true,
canSavePrize: true
});
console.error(error);
}
......@@ -361,6 +366,13 @@ Component({
});
},
updatePrize() {
if (!this.data.canSavePrize) {
my.showToast({
type: "fail",
content: "请等待图片上传完毕",
});
return
}
const {
name,
ename,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment