This commit is contained in:
bb_pan 2025-09-01 18:27:21 +08:00
parent 2435684baf
commit 6fd15f6a47
1 changed files with 30 additions and 19 deletions

View File

@ -127,6 +127,7 @@ const qrCode = ref('') //二维码
const maInfo = ref({}) // const maInfo = ref({}) //
const scanQrCodeRef = ref(null) const scanQrCodeRef = ref(null)
const remark = ref('') const remark = ref('')
const isSubmit = ref(false)
// //
@ -249,26 +250,36 @@ const submitCode = () => {
remark: remark.value, remark: remark.value,
}, },
] ]
let param = { try {
backApplyInfo: info, if (isSubmit.value) return
backApplyDetailsList: detail, isSubmit.value = true
uni.showLoading({ title: '提交中...', mask: true })
let param = {
backApplyInfo: info,
backApplyDetailsList: detail,
}
insertBack(param)
.then((res) => {
console.log(res)
if (res.code == 200) {
uni.showToast({ title: '新增成功', icon: 'none' })
uni.navigateTo({ url: `/pages/back/index` })
// uni.navigateBack({
// delta: 1, //
// })
} else {
uni.showToast({ title: res.msg, icon: 'none' })
}
})
.catch((error) => {
console.log(error)
})
} catch (error) {
console.log('🚀 ~ submitCode ~ error:', error)
} finally {
isSubmit.value = false
uni.hideLoading()
} }
insertBack(param)
.then((res) => {
console.log(res)
if (res.code == 200) {
uni.showToast({ title: '新增成功', icon: 'none' })
uni.navigateTo({ url: `/pages/back/index` })
// uni.navigateBack({
// delta: 1, //
// })
} else {
uni.showToast({ title: res.msg, icon: 'none' })
}
})
.catch((error) => {
console.log(error)
})
} }
} }