mirror of
https://gitee.com/dromara/go-view.git
synced 2024-11-29 18:28:28 +08:00
feat: 不符合接口格式时添加拦截
This commit is contained in:
parent
06e54ae132
commit
37b84fcf12
@ -131,7 +131,11 @@ const sendHandle = async () => {
|
||||
loading.value = false
|
||||
if (res) {
|
||||
const { data } = res
|
||||
if (!data && !targetData.value.filter) window['$message'].warning('您的数据不符合默认格式,请配置过滤器!')
|
||||
if (!data && !targetData.value.filter) {
|
||||
window['$message'].warning('您的数据不符合默认格式,请配置过滤器!')
|
||||
showMatching.value = true
|
||||
return
|
||||
}
|
||||
targetData.value.option.dataset = newFunctionHandle(data, res, targetData.value.filter)
|
||||
showMatching.value = true
|
||||
return
|
||||
|
@ -117,7 +117,11 @@ const sendHandle = async () => {
|
||||
const res = await customizeHttp(toRaw(targetData.value.request), toRaw(chartEditStore.getRequestGlobalConfig))
|
||||
loading.value = false
|
||||
if (res) {
|
||||
if (!res?.data && !targetData.value.filter) window['$message'].warning('您的数据不符合默认格式,请配置过滤器!')
|
||||
if (!res?.data && !targetData.value.filter) {
|
||||
window['$message'].warning('您的数据不符合默认格式,请配置过滤器!')
|
||||
showMatching.value = true
|
||||
return
|
||||
}
|
||||
targetData.value.option.dataset = newFunctionHandle(res?.data, res, targetData.value.filter)
|
||||
showMatching.value = true
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user