mirror of
https://gitee.com/dromara/go-view.git
synced 2024-11-30 02:38:30 +08:00
feat: 不符合接口格式时添加拦截
This commit is contained in:
parent
d0d031d1bb
commit
e979149cfb
@ -131,7 +131,11 @@ const sendHandle = async () => {
|
|||||||
loading.value = false
|
loading.value = false
|
||||||
if (res) {
|
if (res) {
|
||||||
const { data } = 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)
|
targetData.value.option.dataset = newFunctionHandle(data, res, targetData.value.filter)
|
||||||
showMatching.value = true
|
showMatching.value = true
|
||||||
return
|
return
|
||||||
|
@ -117,7 +117,11 @@ const sendHandle = async () => {
|
|||||||
const res = await customizeHttp(toRaw(targetData.value.request), toRaw(chartEditStore.getRequestGlobalConfig))
|
const res = await customizeHttp(toRaw(targetData.value.request), toRaw(chartEditStore.getRequestGlobalConfig))
|
||||||
loading.value = false
|
loading.value = false
|
||||||
if (res) {
|
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)
|
targetData.value.option.dataset = newFunctionHandle(res?.data, res, targetData.value.filter)
|
||||||
showMatching.value = true
|
showMatching.value = true
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user