refactor(special-fund):优化专项资金详情获取逻辑
-移除了接口成功调用时的重复通知 - 增加了接口调用失败时的错误通知 - 优化了代码结构,提高了用户体验
This commit is contained in:
@@ -327,11 +327,7 @@ const init = async () => {
|
||||
}
|
||||
const getDetailInfo = async () => {
|
||||
getFundDetailProcess(route.query.id).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
|
||||
if (res.code === 1000) {
|
||||
formData.value = res.data.formData
|
||||
opentionData.value = res.data
|
||||
@@ -339,6 +335,12 @@ const getDetailInfo = async () => {
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
})
|
||||
}else{
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user