This commit is contained in:
zoujiandong
2025-07-16 10:51:19 +08:00
parent b0f1a37ece
commit eb358d594b
66 changed files with 570 additions and 234 deletions
+15 -6
View File
@@ -3,8 +3,8 @@
</template>
<script setup>
import { onMounted, onUnmounted, ref } from 'vue';
const playJs=ref("//player.polyv.net/resp/live-h5-player/latest/liveplayer.min.js");
import { onMounted, onUnmounted, ref,watch} from 'vue';
const playJs=ref("//player.polyv.net/script/player.js");
const player=ref(null);
const props=defineProps({
vid:{
@@ -12,6 +12,10 @@ const props=defineProps({
default:''
}
})
const user_id=ref('');
watch(()=>props.vid,()=>{
loadPlayerScript(loadPlayer);
})
const loadPlayerScript=(callback)=> {
if (!window.polyvLivePlayer) {
const myScript = document.createElement('script');
@@ -23,17 +27,22 @@ const props=defineProps({
}
};
const loadPlayer=()=> {
let userInfo=uni.getStorageSync('userInfo');
if(userInfo.user_id){
user_id.value=userInfo.user_id;
}
const polyvLivePlayer = window.polyvLivePlayer;
player.value = polyvLivePlayer({
player.value = polyvPlayer({
wrap: '#player',
width: '100%',
height: 250,
forceH5:true,
df:3,
uid:user_id.vlaue,
vid: props.vid,
});
}
onMounted(()=>{
loadPlayerScript(loadPlayer);
})
onUnmounted(()=>{
player.value.destroy();
})
+9 -10
View File
@@ -7,7 +7,7 @@
:zIndex="99"
:placeholder="false"
activeColor="#3CC7C0"
:safeAreaInsetBottom="false"
:safeAreaInsetBottom="true"
>
<up-tabbar-item text="临床病例库" @click="handleClick" :activeIcon="ku_on" :inactiveIcon="ku">
<!-- <view class="aa" slot="active-icon">222</view> -->
@@ -86,7 +86,7 @@ const handleClick = (e) => {
};
</script>
<style >
<style lang='scss'>
.u-page__item__slot-icon{
width: 47rpx;
height: 47rpx;
@@ -94,13 +94,12 @@ const handleClick = (e) => {
.u-tabbar__content__item-wrapper{
border-top: 2rpx solid #f3f4f6!important;
}
/* .page{
:deep(.u-tabbar){
border-top: 2rpx solid #f3f4f6!important;
}
:deep(.u-tabbar--fixed){
border-top: 2rpx solid #f3f4f6!important;
}
} */
.u-tabbar-item__text{
margin-bottom: 20rpx!important;
}
</style>