fix: BUG修改

This commit is contained in:
kun 2023-10-26 11:19:18 +08:00
parent cd7fd1eee7
commit 03f9c0bee1

View File

@ -257,6 +257,7 @@ const playVideo = async () => {
// do you want... // do you want...
} }
); );
dataIndex.value = dataIndex.value + 1;
}; };
// //
const getVideo = async () => { const getVideo = async () => {
@ -272,10 +273,9 @@ const getVideo = async () => {
}, 200); }, 200);
const res = await getpreviewURL({ cameraIndexCode: cameraIndexCode.value, protocol: "ws" }); const res = await getpreviewURL({ cameraIndexCode: cameraIndexCode.value, protocol: "ws" });
playUrl.value = res.result; playUrl.value = res.result;
await playVideo(); videoList.value[videoList.value.length - 1].videoUrl = res.result;
let changeVal = dataIndex.value - 1; // dataIndex.value + 1-1
videoList.value[changeVal].videoUrl = res.result;
console.log(res); console.log(res);
await playVideo();
}; };
const BeginPlayer = (id: any) => { const BeginPlayer = (id: any) => {
console.log(id); console.log(id);
@ -293,8 +293,7 @@ const BeginPlayer = (id: any) => {
iCurrentSplit: 1, iCurrentSplit: 1,
openDebug: true openDebug: true
}); });
videoList.value[dataIndex.value].pluginValue = myPlugin.value; videoList.value[videoList.value.length - 1].pluginValue = myPlugin.value;
dataIndex.value++;
}; };
const changeTreeFilter = async (item: { const changeTreeFilter = async (item: {
data: { code: string | null; title: any; children: any[] }; data: { code: string | null; title: any; children: any[] };