fix:修改请求地址为null时引起的异常bug

This commit is contained in:
奔跑的面条 2022-06-11 14:36:19 +08:00
parent a22e4b814b
commit 58fee4a86f
2 changed files with 4 additions and 3 deletions

View File

@ -6,7 +6,8 @@ import { chartInitConfig } from '@/settings/designSetting'
const requestConfig: RequestConfigType = {
requestDataType: RequestDataTypeEnum.STATIC,
requestHttpType: RequestHttpEnum.GET
requestHttpType: RequestHttpEnum.GET,
requestUrl: ''
}
export class publicConfig implements PublicConfigType {

View File

@ -61,7 +61,7 @@
import { ref, toRefs } from 'vue'
import { icon } from '@/plugins'
import { SettingItemBox } from '@/components/Pages/ChartItemSetting'
import { RequestHttpEnum } from '@/enums/httpEnum'
import { RequestHttpEnum, ResultEnum } from '@/enums/httpEnum'
import { chartDataUrl, rankListUrl, numberUrl } from '@/api/mock'
import { http } from '@/api/http'
import { SelectHttpType } from '../../index.d'
@ -113,7 +113,7 @@ const sendHandle = async () => {
const res = await http(requestHttpType)(completePath || '', {})
setTimeout(() => {
loading.value = false
if (res.status === 200) {
if (res.status === ResultEnum.SUCCESS) {
// @ts-ignore
targetData.value.option.dataset = res.data
showMatching.value = true