Commit ec34f1e4 authored by 王波's avatar 王波

1.增加提交loading

2.降级奖品选择后库存限制默认为不限制
parent 880f9e36
......@@ -283,7 +283,11 @@ Component({
this.setData({
prizeInitData: {
...this.data.prizeInitData,
isBackUp: e.detail.value
isBackUp: e.detail.value,
probability: "",
switchStock: STOCK_NO_LIMIT,
useStock: 0,
stock: ""
}
})
},
......
......@@ -123,11 +123,15 @@ Component({
},
// 提交信息
async onSubmit() {
my.showLoading();
console.log(this.data, 'this.data')
const isValidForm = await this.validateForm(this.data);
if (!isValidForm) return;
if (!isValidForm){
my.hideLoading();
return;
}
console.log('表演校验通过')
const params = this.formatActivityParams(this.data)
......@@ -142,12 +146,14 @@ Component({
})
}, 2000);
const { success, message } = await saveActivityInfo(params);
my.hideLoading();
if (success) {
this.backList();
} else {
this.showFailToast(message);
}
}
my.hideLoading();
},
showFailToast(text) {
my.showToast({
......
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