|
|
@@ -183,26 +183,26 @@ const signSubmit = async () => {
|
|
|
uni.showToast({ title: '请先签名', icon: 'none' })
|
|
|
return
|
|
|
}
|
|
|
- const f = flow.value
|
|
|
- if (!f) return
|
|
|
+ const currentFlow = flow.value
|
|
|
+ if (!currentFlow) return
|
|
|
|
|
|
const signUrl = getSignUrl()
|
|
|
- if (f.beforeSubmit) {
|
|
|
- const ok = await f.beforeSubmit(signUrl)
|
|
|
+ if (currentFlow.beforeSubmit) {
|
|
|
+ const ok = await currentFlow.beforeSubmit(signUrl)
|
|
|
if (!ok) return
|
|
|
}
|
|
|
await runSubmit(signUrl)
|
|
|
}
|
|
|
|
|
|
const runSubmit = async (signUrl: string) => {
|
|
|
- const f = flow.value
|
|
|
- if (!f) return
|
|
|
+ const currentFlow = flow.value
|
|
|
+ if (!currentFlow) return
|
|
|
try {
|
|
|
- const result = await f.submit(signUrl)
|
|
|
+ const result = await currentFlow.submit(signUrl)
|
|
|
if (result?.code === 0) {
|
|
|
isSigned.value = '1'
|
|
|
- uni.showToast({ title: f.successMessage, icon: 'success' })
|
|
|
- await f.loadData()
|
|
|
+ uni.showToast({ title: currentFlow.successMessage, icon: 'success' })
|
|
|
+ await currentFlow.loadData()
|
|
|
backendPdfViewerRef.value?.fetchPDF()
|
|
|
} else {
|
|
|
uni.showToast({ title: result?.msg || '签名失败', icon: 'error' })
|