inleft
2022-08-11 af029bdfb645bd2b75fbab687c1a5f45b428d801
src/components/mini/box15-videoPlayBox.vue
@@ -56,11 +56,29 @@
         return {
            dp: null,
            video: {},
            firstLoad: true
         }
      },
      methods: {
         myPlay() {
            this.$message.info("start play..")
         },
         changePlay(videoData) {
            // this.video = {
            //    img: "http://t.inleft.com/share/media_photo/idea_beijing.jpg",
            //    url: "http://t.inleft.com/share/mp3/EOPMusic%282%29.mp3",
            //    type: "normal"
            // }
            this.loadVideo(videoData)
            // 以下为隐藏一些作者的信息和视频播放源 如不需要可删除
            // document.querySelector(".dplayer-menu").remove(); //隐藏右键菜单
            document.querySelector(".dplayer-mask").remove();
            document.querySelector(".dplayer-info-panel-item-url").remove(); //隐藏播放源
            let length = document.querySelectorAll(".dplayer-menu-item").length;
            document.querySelectorAll(".dplayer-menu-item")[length - 1].remove(); // 去掉作者信息
            document.querySelectorAll(".dplayer-menu-item")[length - 2].remove(); // 去掉作者信息
         },
         loadVideo(videoInfo) {
            this.dp = new DPlayer({
@@ -115,25 +133,8 @@
               }
            })
         }
      },
      mounted() {
         this.video = {
            img: "http://t.inleft.com/share/media_photo/idea_beijing.jpg",
            url: "http://t.inleft.com/share/mp3/EOPMusic%282%29.mp3",
            type: "normal"
         }
         this.loadVideo(this.video)
         // 以下为隐藏一些作者的信息和视频播放源 如不需要可删除
         // document.querySelector(".dplayer-menu").remove(); //隐藏右键菜单
         document.querySelector(".dplayer-mask").remove();
         document.querySelector(".dplayer-info-panel-item-url").remove(); //隐藏播放源
         let length = document.querySelectorAll(".dplayer-menu-item").length;
         document.querySelectorAll(".dplayer-menu-item")[length - 1].remove(); // 去掉作者信息
         document.querySelectorAll(".dplayer-menu-item")[length - 2].remove(); // 去掉作者信息
      }
   }
</script>
<style lang="less" scoped>