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