Commit ec34f1e4 authored by 王波's avatar 王波

1.增加提交loading

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