Fix(店铺资料):修改店铺资料--连续多次点击确认修改,会自动退出到个人中心页面,点店铺主页会反复提示修改成功再退出来,店铺资质图片会重复添加

This commit is contained in:
linxi
2024-08-27 18:14:57 +08:00
parent 0cb7d5f5e8
commit 33526c2df0
+8 -1
View File
@@ -229,7 +229,8 @@ export default {
'qrcode': '', 'qrcode': '',
'tips': '', 'tips': '',
'type': '' 'type': ''
} },
loading: false
} }
}, },
onShow() { onShow() {
@@ -330,6 +331,9 @@ export default {
}) })
}, },
submit() { submit() {
if(this.loading) {
return
}
if (!this.innApplyInfo.logo) { if (!this.innApplyInfo.logo) {
this.$dialog.error('请上传店铺LOGO') this.$dialog.error('请上传店铺LOGO')
return return
@@ -372,6 +376,7 @@ export default {
if (param.coverType === 2) { if (param.coverType === 2) {
param.cover = param.coverVideo param.cover = param.coverVideo
} }
this.loading = true
uni.showLoading() uni.showLoading()
postHotelInfoEdit(param).then((res) => { postHotelInfoEdit(param).then((res) => {
uni.hideLoading() uni.hideLoading()
@@ -380,11 +385,13 @@ export default {
content: '修改成功!', content: '修改成功!',
showCancel: false, showCancel: false,
success: () => { success: () => {
this.loading = false
uni.navigateBack() uni.navigateBack()
} }
}) })
}).catch((err) => { }).catch((err) => {
uni.hideLoading() uni.hideLoading()
this.loading = false
uni.showToast({ uni.showToast({
title: err.msg + '', title: err.msg + '',
icon: 'none', icon: 'none',