|
|
@@ -378,6 +378,8 @@
|
|
|
// 商品分组列表
|
|
|
showGroupPicker: false,
|
|
|
groupOptions: [],
|
|
|
+ // 防止提交审核重复提交
|
|
|
+ submitLoading: false
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -747,6 +749,14 @@
|
|
|
//提交审核
|
|
|
submit() {
|
|
|
console.log(this.form)
|
|
|
+ if(this.submitLoading) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '正在提交数据,请勿重复提交!',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.submitLoading = true
|
|
|
this.form.specItems = this.selectProductSunItem
|
|
|
this.makeChecked ? this.form.preBook = 1 : this.form.preBook = 0
|
|
|
if (!this.form.saleStartDate) {
|
|
|
@@ -778,6 +788,7 @@
|
|
|
if (this.productId == '') {
|
|
|
this.$http.post("/app/product/add", this.form).then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
+ this.submitLoading = false
|
|
|
uni.showToast({
|
|
|
title: '添加成功',
|
|
|
icon: 'none'
|
|
|
@@ -790,24 +801,25 @@
|
|
|
key: 'group',
|
|
|
});
|
|
|
} else {
|
|
|
+ this.submitLoading = false
|
|
|
uni.showToast({
|
|
|
title: res.data.message,
|
|
|
icon: 'none'
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
})
|
|
|
} else {
|
|
|
this.form.productId = this.productId
|
|
|
this.$http.post("/app/product/edit", this.form).then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
+ this.submitLoading = false
|
|
|
uni.showToast({
|
|
|
title: '编辑成功',
|
|
|
icon: 'none'
|
|
|
});
|
|
|
this.back()
|
|
|
} else {
|
|
|
+ this.submitLoading = false
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
|
title: res.data.message
|