Commit 87b807a5 by 李伟康

feat(equity): 提单成功后显示加载提示并延迟打开通知弹窗

在提单成功后,新增显示 loading 提示,并延时 1500ms 后再打开通知弹窗,优化用户体验。
同时确保合同预览跳转逻辑在弹窗关闭后正确执行。
1 parent 8e53cf5f
......@@ -619,38 +619,43 @@ export default {
this.$emit('jump', 'EquityManagement')
}, 1500)
} else {
// 从URL获取文件名
const getFileNameFromUrl = (url) => {
return url.split('/').pop().split('?')[0] || '未知文件'
}
const { contractNo } = params,
url = await uni.$api.equityApi.printContract({ contractNo }),
fileName = getFileNameFromUrl(url),
type = 3
if (!url) throw '获取合同失败'
this.noticeObj = {
title: '提单成功',
text: '提单合同支持分享或保存',
type: 'success',
buttons: [
{
text: '查看合同',
type: 'primary',
callback: _ => {
this.$refs.reportNotice.close()
this.$emit('jump', 'EquityManagement')
// 跳转到预览页面
uni.navigateTo({
url: `/pages/common/filePreview?fileUrl=${encodeURIComponent(url)}&fileType=${type}&fileName=${encodeURIComponent(fileName)}`
})
uni.showLoading({
mask: true
})
setTimeout(async () => {
// 从URL获取文件名
const getFileNameFromUrl = (url) => {
return url.split('/').pop().split('?')[0] || '未知文件'
}
const { contractNo } = params,
url = await uni.$api.equityApi.printContract({ contractNo }),
fileName = getFileNameFromUrl(url),
type = 3
if (!url) throw '获取合同失败'
this.noticeObj = {
title: '提单成功',
text: '提单合同支持分享或保存',
type: 'success',
buttons: [
{
text: '查看合同',
type: 'primary',
callback: _ => {
this.$refs.reportNotice.close()
this.$emit('jump', 'EquityManagement')
// 跳转到预览页面
uni.navigateTo({
url: `/pages/common/filePreview?fileUrl=${encodeURIComponent(url)}&fileType=${type}&fileName=${encodeURIComponent(fileName)}`
})
}
}
}
]
}
setTimeout(() => {
uni.hideLoading()
this.$refs.reportNotice.open()
}, 100)
]
}
setTimeout(() => {
uni.hideLoading()
this.$refs.reportNotice.open()
}, 100)
}, 1500)
}
} else throw message
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!