This commit is contained in:
bb_pan 2025-09-01 14:55:43 +08:00
parent 4374511cb2
commit 18a8c1faa5
2 changed files with 24 additions and 8 deletions

View File

@ -188,7 +188,11 @@ const onClick = (e, item, itemIndex) => {
}
swipeRef.value[itemIndex].closeAll()
}
const isSubmit = ref(false)
const submit = async () => {
if (isSubmit.value) return
isSubmit.value = true
let param = {
id: id.value,
taskId: taskId.value,
@ -209,6 +213,7 @@ const submit = async () => {
uni.showToast({ title: error.data.msg, icon: 'none' })
} finally {
uni.hideLoading()
isSubmit.value = false
}
// console.log(param)
// submitBackApply(param).then(res => {

View File

@ -202,7 +202,12 @@ const onRepairItem = (item) => {
}
const isSubmit = ref(false)
const handleSubmit = async () => {
try {
if (isSubmit.value) return
isSubmit.value = true
uni.showLoading({ title: '提交中...', mask: true })
//
const res = await repairSubmitAPI([{ taskId: taskId.value }])
if (res.code === 200) {
@ -212,6 +217,12 @@ const handleSubmit = async () => {
})
uni.navigateBack()
}
} catch (error) {
console.log('🚀 ~ handleSubmit ~ error:', error)
} finally {
uni.hideLoading()
isSubmit.value = false
}
}