|
@ -74,11 +74,16 @@ async function getUrl({ camId, url, pileNum, rangeIndex } = {}) { |
|
|
} |
|
|
} |
|
|
code = cameraData.code; |
|
|
code = cameraData.code; |
|
|
data = cameraData.data; |
|
|
data = cameraData.data; |
|
|
if (code != 200 || !data?.length) { |
|
|
// console.log(rangeIndex, "rangeIndex", cameraData);
|
|
|
|
|
|
if ( |
|
|
|
|
|
code != 200 || |
|
|
|
|
|
(Array.isArray(data) ? !data?.length : !Object.keys(data || {}).length) |
|
|
|
|
|
) { |
|
|
Message.warning("未获取到附近的相机信息"); |
|
|
Message.warning("未获取到附近的相机信息"); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
camId = data[rangeIndex || 0]?.camId; |
|
|
camId = data[rangeIndex || 0]?.camId; |
|
|
|
|
|
console.log(rangeIndex, "rangeIndex", data, data[rangeIndex], cameraData); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (camId) { |
|
|
if (camId) { |
|
|