更新修复bug

This commit is contained in:
wpf 2023-10-18 21:43:27 +08:00
parent e06cb77c1c
commit d00ca8006e
2 changed files with 26 additions and 5 deletions

View File

@ -65,19 +65,19 @@ const back = ()=>{
<iframe class="iframe" :src="iframeSRC"></iframe>
</div> -->
<div class="img-list w-full h-full">
<div id="img1" class="img-list-item" @click="changeImg(1)">
<div id="img1" class="img-list-item" @click="changeImg(0)">
<water cid="img1"/>
<img :src="orderList[0]?.image"/>
</div>
<div id="img2" class="img-list-item" @click="changeImg(2)">
<div id="img2" class="img-list-item" @click="changeImg(1)">
<water cid="img2"/>
<img :src="orderList[1]?.image"/>
</div>
<div id="img3" class="img-list-item" @click="changeImg(3)">
<div id="img3" class="img-list-item" @click="changeImg(2)">
<water cid="img3"/>
<img :src="orderList[2]?.image"/>
</div>
<div id="img4" class="img-list-item" @click="changeImg(4)">
<div id="img4" class="img-list-item" @click="changeImg(3)">
<water cid="img4"/>
<img :src="orderList[3]?.image"/>
</div>

View File

@ -5,6 +5,7 @@ const iframeSRC = ref("https://goview.lihaink.cn/#/chart/preview/62")
const MP4SRC = ref("")
const isVideo = ref(false)
const videoRef = ref(null)
import axios from "axios"
const loadStorage = ()=>{
if(localStorage.getItem('scene')) iframeSRC.value = localStorage.getItem('scene');
@ -50,7 +51,6 @@ user_channel.on('message', (data: any) => {
isVideo.value = true;
nextTick(()=>{
videoRef.value.play();
showIframe.value = true;
})
}
} catch (error) {
@ -61,6 +61,27 @@ user_channel.on('message', (data: any) => {
})
const orderList = ref([]);
const loadOrderList = ()=>{
axios.get('https://chat.lihaink.cn/index/demo1').then((res)=>{
orderList.value = res.data.data;
if(orderList.value[3].type==1){
isVideo.value = false;
showIframe.value = true;
iframeSRC.value = orderList.value[3].uri;
}else {
isVideo.value = true;
showIframe.value = false;
MP4SRC.value = orderList.value[3].uri;
nextTick(()=>{
videoRef.value.play();
})
}
})
}
loadOrderList()
</script>
<template>