111
This commit is contained in:
@@ -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();
|
||||
})
|
||||
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user