vue视频、图片自动轮播并伴随进度条

在这里插入图片描述

废话不多说直接上代

多余没用的部分自己看着删除

<template><div class="showImg"><el-carousel ref="carousel" trigger="hover" :autoplay="false" class="dimControl" :height="`${(currenInnerWith*0.375) > 3840 ? 1440 : currenInnerWith*0.375}px`"@change="carouselChange" :interval="5000" arrow="never" style="cursor: pointer;"><el-carousel-item v-for="(item,index) in imgArr" :key="item.id"><!-- @timeupdate="commonVideoUpdata(index,'video')" --><template v-if="item.banner_type==2 && isIndex==index"><video:ref="'videoRef'+index"@click="gotoBanner(item)"class="box-bg video-bg":class="'videoRef'+index":id="'videoRef'+index":muted="true"autoplay="autoplay"@mouseover="changeInterval(true)"@mouseleave="changeInterval(false)":poster="item.video_cover_url":src="item.video_url"/><span v-if="isAudioBox" class="audio-box" @click="handleAudio(index,9)"><i v-if="!isIcon" class="iconfont audio-icon" @click.stop="handleAudio(index,true)">&#xe6de;</i><i v-if="isIcon" class="iconfont audio-icon" @click.stop="handleAudio(index,false)">&#xe6db;</i></span></template><divv-else@click="gotoBanner(item)"class="box-bg"@mouseover="changeInterval(true)"@mouseleave="changeInterval(false)":style="`background-image:url(${item.url});height:${(currenInnerWith*0.375) > 3840?1440:currenInnerWith*0.375}px`"alt="#":src="item.url"/></el-carousel-item></el-carousel><div class="category-list"></div></div>
</template><script>
import axiosSrr from "@/plugins/ssr-axios";export default {props: {datas: {type: Object},isSwiperTool: {type: Boolean,default: true}},async fetch(){return axiosSrr.post("/banner/OWI_GetBanner", {banner_code: "home_banner"}).then((res) => {let retData = [];res.data.data.entities.forEach((item, i) => {let arr = {};arr.url = item.image_url;arr.id = i;arr.display_order = Number(item.display_order);arr.redirect_url = item.redirect_url;arr.banner_type = item.banner_type;arr.image_url2 = item.image_url2;arr.image_url3 = item.image_url3;arr.video_cover_url = item.video_cover_url;arr.video_url = item.video_url;retData.push(arr);});this.imgArr = retData;this.banner_duration = res.data.data.banner_duration});},data() {return {currentIndex: 0, //当前所在图片下标timer: null, //定时轮询imgArr: [],carouselData: {pic: {// master: require("@/assets/img/bitmap.png"),master: [require("@/assets/banner-bg/banner1_4k.png"),require("@/assets/banner-bg/banner1_4k.png"),require("@/assets/banner-bg/banner1_4k.png")],gifs: require("@/assets/img/dynamic_graph.png")}},screenWidth: 1440,industryData: [], //banner 下行业分类信息notice: '',currentTimeProgress: 0,isIndex: 0,intervalId: null,timeInterval: null,banner_duration: 5,isAudio: false,isIcon: false,isAudioBox: false,isCount: 0,currenInnerWith:1920,loopTimer:false,};},methods: {openTip() {},async getNotice() {let dataRet = await this.$axios.post("common_api/OWI_GetAnnouncementList")this.notice = dataRet.data.msg_list},/*** 屏幕尺寸判断*/screenChange(e) {if(!process.browser){return}let width = document.body.clientWidth;// let width = 3840;let p = "";// p=width < 2048?e[0]:(2048 <= width && width < 3840?e[1]:e[2])if (width < 2048) {p = e[0];} else if (2048 <= width && width < 3840) {p = e[1];} else {p = e[2];}return p;},//开启定时器startIntervals() {// 事件里定时器应该先清除在设置,防止多次点击直接生成多个定时器clearInterval(this.timer);this.timer = setInterval(() => {this.currentIndex++;if (this.currentIndex > this.imgArr.length - 1) {this.currentIndex = 0;}}, 5000);},// 点击左右箭头clickIcon(val) {if (val === "down") {this.currentIndex++;if (this.currentIndex === this.imgArr.length) {this.currentIndex = 0;}} else {/* 第一种写法this.currentIndex--;if(this.currentIndex < 0){this.currentIndex = this.imgArr.length-1;} */// 第二种写法if (this.currentIndex === 0) {this.currentIndex = this.imgArr.length;}this.currentIndex--;}},// 点击控制圆点changeImg(index) {this.currentIndex = index;},/*** 鼠标移入事件*/enter(e, id) {this.currentIndex = id;},//鼠标移入移出控制changeInterval(val) {if (val) {clearInterval(this.timer);} else {// this.startInterval();}},gotoBanner(val) {if (val.redirect_url) {window.open(val.redirect_url);}},getIndustryImg(val) {switch (val) {case "直播":return require("@/assets/img/cover_trade_ZhiBo.png");break;case "数字营销":return require("@/assets/img/cover_trade_ShuZiYingXiao.png");break;case "数据新闻":return require("@/assets/img/cover_trade_ShuJuXinWen.png");break;case "短视频":return require("@/assets/img/cover_trade_DuanShiPin.png");break;case "数字创意":return require("@/assets/img/cover_trade_ShuZiChuangYi@2x.png");break;case "数字文物":return require("@/assets/img/cover_trade_ShuZiWenWu@2x.png");break;case "桥梁模型":return require("@/assets/img/cover_trade_bridge@2x.png");break;case "数字信息":return require("@/assets/img/cover_trade_ShuZiXinXi.png");break;}},// 获取行业应用async getIndustryApplication() {let res = await this.$axios.post("/banner/OWI_GetBanner", {banner_code: "home_industry_application"});let arr=[]let arrSort=res.data.entities?.sort((a, b) => {return a.display_order - b.display_order;})arrSort?.map(item=>{arr.push({url: item.redirect_url,bg: item.image_url})})if (process.browser) {this.$nextTick(() => {this.industryData = arr})}},async getindustryData() {let res = await this.$axios.post("/api_source/OWI_TreeCategoryV2", {category_type: 10,current_category_show_id: "",only_show_categories: true});this.industryData = [];let industryIndex = 0;let mapData = new Map();res.data.entities.forEach(item => {let industryitem = item.self;industryitem.bg = this.getIndustryImg(industryitem.name);industryitem.url = `/web_site_front/resources/resources_model_new1?parentVal=行业应用&ClassName=${industryitem.name}&showId=${industryitem.show_id}`;industryitem.title = industryitem.name;mapData.set(industryitem.title, industryitem)//this.industryData.push(industryitem);//industryIndex++;});let freeObj = {name: '限时免费',url: 'https://www.cgpool.com/web_site_front/resourcesArea/resources_zone_info?id=300',bg: require('@/assets/img/cover_trade_Xianshi@2x.png')}mapData.set(freeObj.name, freeObj)let bridge = {name: '桥梁模型',url: 'https://www.cgpool.com/web_site_front/resourcesArea/resources_zone_info?id=290',bg: require('@/assets/img/cover_trade_bridge@2x.png')}mapData.set(bridge.name, bridge)let digiDecoration = {name: '数字家装',url: 'https://www.cgpool.com/web_site_front/resourcesArea/resources_zone_info?id=301',bg: require('@/assets/img/cover_trade_jiazhuang@2x.png')}mapData.set(digiDecoration.name, digiDecoration)let intelligentManufacture = {name: '智能制造',url: 'https://www.cgpool.com/web_site_front/resourcesArea/resources_zone_info?id=209',bg: require('@/assets/img/cover_trade_zhizao@2x.png')}mapData.set(intelligentManufacture.name, intelligentManufacture)let BAndB = {name: '民宿模型',url: 'https://www.cgpool.com/web_site_front/resourcesArea/resources_zone_info?id=292',bg: require('@/assets/img/cover_trade_minsu@2x.png')}mapData.set(BAndB.name, BAndB)// 2024 0408 需求更改// 1 限时免费 2 数字创意  3 数字家装 4 智能制造  5 桥梁模型 6 短视频let tmpArray = [];let Index1 = mapData.get("限时免费")tmpArray.push(Index1)let Index2 = mapData.get("数字创意")tmpArray.push(Index2)let Index3 = mapData.get("数字家装")tmpArray.push(Index3)let Index4 = mapData.get("智能制造")tmpArray.push(Index4)let Index5 = mapData.get("桥梁模型")tmpArray.push(Index5)let Index6 = mapData.get("民宿模型")tmpArray.push(Index6)// this.industryData = tmpArray// this.industryData.splice(1,1)// this.industryData.splice(2,0,sliceArr[0])/****/},async getBanner() {let res = await this.$axios.post("/banner/OWI_GetBanner", {banner_code: "home_banner"});this.banner_duration = res.data.banner_duration;this.imgArr=[]res.data.entities.forEach((item, i) => {let arr = {};arr.url = item.image_url;arr.id = i;arr.display_order = Number(item.display_order);arr.redirect_url = item.redirect_url;arr.banner_type = item.banner_type;arr.image_url2 = item.image_url2;arr.image_url3 = item.image_url3;arr.video_cover_url = item.video_cover_url;arr.video_url = item.video_url;this.imgArr.push(arr);});if (this.imgArr.length > 0) {this.createElChange()this.carouselChange(0)}},// 公共video获取时间commonVideoUpdata(id, type) {const self = thisif(!process.browser){return}let videoEl = document.getElementsByClassName('videoRef' + id)videoEl[0]?.addEventListener("timeupdate", function () {let el = document.querySelector(".new-indicator")if (el) {let currTime = this.currentTime //当前时间let duration = this.duration //总时间let pre = currTime / durationself.setStyleHandel(pre * 40)if (this.currentTime == this.duration) {self.handelNext()return}}})},handleToggleImg() {const self = thislet time = self.banner_duration * 1000let times = self.banner_duration * 1000 + 300clearInterval(self.intervalId);if(!process.browser){return}let el = document.querySelector(".new-indicator")if (el) {let count = 0; // 计数器// let intervalId; // 用于保存 setInterval 返回的 IDfunction executeTask() {// 执行任务的逻辑,这里假设是打印当前计数count++; // 增加计数self.setStyleHandel((40 / (time / 100)) * count)if (count === time / 100) {// 达到执行次数上限,停止定时器clearInterval(self.intervalId);}}// 每200毫秒执行一次 executeTask 函数self.intervalId = setInterval(executeTask, 100);// 5秒后停止定时器clearInterval(self.timeInterval);self.timeInterval = setInterval(() => {clearInterval(self.intervalId);clearInterval(self.timeInterval);self.handelNext()}, times);}},setStyleHandel(count) {if(!process.browser){return}let el = document.querySelector(".new-indicator")el.style.opacity = 1el.style = "background: #fff"el.style.width = `${count >= 6 ? count : 6}px`},carouselChange(e) {if (process.browser) {this.isIndex = ethis.isAudioBox = truethis.isAudio = falsethis.isIcon = falsethis.isCount = 0clearInterval(this.intervalId);clearInterval(this.timeInterval);if (process.browser) {this.$nextTick(() => {this.handleSetLeft()let el = document.querySelectorAll(".new-indicator")el?.forEach(function (indicator) {indicator.style = "width:6px"indicator.style = "opacity:0"indicator.style = "background: rgba(255, 255, 255, 0.45)"});this.imgArr?.map((item, i) => {let videoObj = this.$refs['videoRef' + i]if (Object(videoObj).length > 0) {videoObj[0].currentTime = 0setTimeout(() => {videoObj[0].play()}, 500);// let playTimer=setTimeout(() => {//   // videoObj[0].muted=false//   videoObj[0].play()// },500);// clearTimeout(playTimer);}})this.createElChange()if (Object(this.imgArr).length > 0) {el.forEach(item => {item.style = `width:${0}%`})}if (this.imgArr[e].banner_type == 1) {this.handleToggleImg()} else {this.commonVideoUpdata(e, 'video')}})}}},handleAudio(id, Boolean) {const self = thisself.isCount++// 获取 video 元素const myVideo = self.$refs['videoRef' + id];// 切换静音状态self.isAudio = !self.isAudio;// 更新视频静音状态myVideo[0].muted = self.isAudio;self.isIcon = !self.isAudio// 如果是第一次点击,并且视频正在播放,触发播放if (!self.isAudio && !myVideo[0].paused) {myVideo[0].play();}if (self.isCount == 1) {this.handleAudio(id, Boolean)}},handelNext() {if (process.server){return}this.isAudioBox = false;if (this.imgArr?.length == 1 && this.imgArr[this.isIndex]?.banner_type == 2) {this.isCount++;this.isIcon = truethis.isAudioBox = true;// 获取 video 元素const myVideo = this.$refs["videoRef" + this.isIndex];myVideo?.forEach((item, i) => {item.muted = true})}this.$refs.carousel?.next();if (this.imgArr.length == 1) {this.carouselChange(0);}},createElChange() {if (process.browser) {this.$nextTick(() => {let indicators = document.querySelectorAll(".new-indicator")// 删除这些元素indicators.forEach(function (indicator) {indicator.parentNode.removeChild(indicator);});const indicatorElement = this.$refs.carousel.$el.querySelector('.el-carousel__indicator.is-active');const newElement = document.createElement('span');newElement.textContent = '';newElement.className = 'new-indicator';newElement.style.width = `6px`;newElement.style.opacity = `0`;indicatorElement?.appendChild(newElement);})}},handleSetLeft() {if (process.browser) {this.$nextTick(() => {let element = document.querySelector(".showImg .el-carousel__indicators")let audio = document.querySelector(".showImg .audio-box")let leftDistance = element.getBoundingClientRect().left;// 输出距离if (audio) {audio.style = `left:${leftDistance + window.pageXOffset + element.clientWidth + 12}px`}})}},gotoIndustryInfo(val) {window.open(val.url);}},//进入页面后启动定时轮询mounted() {// this.getindustryData();this.getIndustryApplication();this.getBanner();this.startIntervals();this.startIntervals();this.getNotice();const self = thiswindow.addEventListener("resize", function () {self.handleSetLeft()if (!self.loopTimer) { // 使用节流机制,降低函数被触发的频率self.loopTimer = true;setTimeout(function () {window.screenWidth = window.innerWidth;self.loopTimer = false;self.$nextTick(() => {if(window.screenWidth>3840){self.currenInnerWith = 3840}else{self.currenInnerWith = window.screenWidth;}})}, 100)}});if(window.innerWidth>3840){this.currenInnerWith = 3840}else{this.currenInnerWith = window.innerWidth;}},destroyed() {// 组件销毁后解绑事件window.onresize = null;},
};
</script><style lang="scss" scoped>
$desktop2: "only screen and (max-width: 1295px)";
$desktop: "only screen and (min-width: 1296px)";
$desktop1500: "only screen and (min-width: 1500px)";
$desktop1501: "only screen and (min-width: 1501px) and (max-width: 1799px)";
$desktop1800: "only screen and (min-width: 1800px)";
$desktop_3840: "only screen and (min-width: 3840px)";
$desktop_4000: "only screen and (min-width: 4000px)";
.fontText {@media #{$desktop} {margin: 0 72px;}@media #{$desktop1500} {margin: 0 56px;}@media #{$desktop1501} {margin: 0 72px;}@media #{$desktop1800} {margin: 0 72px;}@media #{$desktop2} {margin: 0 72px;}@media #{$desktop_3840} {margin: 0px auto;}@media #{$desktop_4000} {margin: 0px auto;}margin: 0px;
}* {padding: 0;margin: 0;
}/* 清除li前面的圆点 */
li {list-style-type: none;
}.showImg {position: relative;width: 100%;// height: 587px;background: #fafafa;.box-category {// position: absolute;// top: calc(100% - 48px);// right: calc((100% - 1440px) / 2 - -220px);transform: translateY(-50%);width: 64px;height: 30px;border-radius: 15px;background-color: rgba(25, 27, 41, 0.45);line-height: 30px;text-align: center;font-size: 25px;cursor: pointer;color: rgba(255, 255, 255, 0.45);margin-right: 8px;margin-top: 14px;i {font-weight: bold;}}.box-bg {// height: 585px;width: 100%;height: 100%;max-width: 3840px;max-height: 1440px;background-repeat: no-repeat;margin: 0 auto;background-size: cover;background-repeat: no-repeat;background-position: center center;.img-box {width: 365px;position: absolute;left: calc((100% - 1440px) - -15px);z-index: 2;img {max-width: 100%;margin-top: 290px;}}}.video-bg {position: absolute;left: 50%;transform: translateX(-50%);width: 100%;height: 100%;object-fit: cover;}.audio-box {border-radius: 50%;background-color: #00000073;height: 40px;width: 40px;position: absolute;bottom: 26px;text-align: center;line-height: 40px;&:hover {background-color: rgba(255, 255, 255, 0.25);}.audio-icon {cursor: pointer;color: #fff;}}}/* 轮播图片 */
.showImg img {width: 100%;height: 100%;
}/* 箭头图标 */
.iconDiv {display: inline-block;
}.iconDiv:hover {color: #fff;
}/* 控制圆点 */
.banner-box {position: absolute;right: calc((100% - 1440px) / 2 - -70px);top: calc(100% - 63px);display: flex;
}.banner-circle {height: 20px;background-color: rgba(25, 27, 41, 0.45);border-radius: 15px;line-height: 30px;height: 30px;
}.banner-circle ul {margin: 0 20px;height: 100%;display: flex;
}.banner-circle ul li {display: inline-block;width: 14px;height: 14px;margin: 0 5px;border-radius: 7px;background-color: rgba(255, 255, 255, 0.3);cursor: pointer;align-self: center;
}.active {background-color: #ffffff !important;width: 30px !important;border-radius: 7px !important;
}@keyframes hoverLi {0% {width: 14px;}25% {width: 20px;}50% {width: 24px;}75% {width: 28px;}100% {width: 30px;}
}.active:hover {animation-name: hoverLi;animation-duration: 3s;
}.category-list {margin: 0 auto;align-self: center;
}::v-deep .el-carousel {width: 100vw;
}::v-deep .el-carousel__item {width: 100%;
}::v-deep .el-carousel__indicators {height: 40px;padding: 0 28px;background: rgba(0, 0, 0, 0.45);border-radius: 20px;bottom: 26px;// left: 75%;.el-carousel__indicator {line-height: 40px;height: 40px;margin-top: 0px;}.el-carousel__indicator--horizontal {padding: 12px 0;margin: 0 4px;}.is-active {max-width: 40px;position: relative;.new-indicator {width: 6px;height: 8px;position: absolute;top: 15px;border-radius: 6px;transition: width .3s;}.el-carousel__button {width: 40px;height: 8px;border-radius: 6px;background: rgba(255, 255, 255, 0.45);}}.el-carousel__button {width: 8px;height: 8px;border-radius: 50%;background: rgba(255, 255, 255, 0.45);margin-top: 3px;}
}.category-list {.fontText {display: flex;justify-content: space-between;// margin:0 72px;margin-top: 40px;min-width: 1296px;max-width: 3678px;font-family: Alibaba-PuHuiTi-B;.hangyeImgSty {width: 40px;height: 40px;position: relative;top: 8px;margin-right: 10px;}.Notice {width: 426px;height: 56px;background: url("@/assets/img/NoticeBg.png") no-repeat;background-size: 100% 100%;display: flex;cursor: pointer;//  align-items: center;.NoticeIcon {width: 24px;height: 24px;margin: 16px 12px 16px 24px;}span {line-height: 52px;height: 56px;}}}}</style>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/381531.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

探索Python自然语言处理的新篇章:jionlp库介绍

探索Python自然语言处理的新篇章&#xff1a;jionlp库介绍 1. 背景&#xff1a;为什么选择jionlp&#xff1f; 在Python的生态中&#xff0c;自然语言处理&#xff08;NLP&#xff09;是一个活跃且不断发展的领域。jionlp是一个专注于中文自然语言处理的库&#xff0c;它提供了…

BUUCTF逆向wp [MRCTF2020]Xor

第一步 查壳&#xff0c;该题是32位&#xff0c;无壳。 第二步 跟进main&#xff0c;发现反汇编不了 通过下图我们可以发现一串类似字符串的东西 第三步 我们看一下汇编 我们可以得到这些信息&#xff1a;flag的长度为27&#xff08;下面是对本条指令cmp edx 27指令的应用…

英福康INFICON UL1000检漏仪介绍PPT

英福康INFICON UL1000检漏仪介绍PPT

【C++】C++类和对象详解(上)

目录 思维导图大纲&#xff1a; 思维方面&#xff1a; 1. 类的定义&#xff1a; 2. 类的特点&#xff1a; 3. this指针&#xff1a; 4. 类的默认成员函数 默认构造函数 1.构造函数 2.析构函数 3.拷贝构造函数 4. 赋值运算符重载 1. 运算符重载 5. 日期类实现&#…

【IntelliJ IDEA】一篇文章集合所有IDEA的所有设置

IntelliJ IDEA 是一款功能强大的集成开发环境&#xff08;IDE&#xff09;&#xff0c;其设置涵盖了多个方面&#xff0c;以满足不同开发者的需求和偏好。由于 IDEA 的设置相当复杂和详尽&#xff0c;这里无法在一篇简短的文章中详细介绍所有设置。然而&#xff0c;我可以提供一…

AV1技术学习:Intra Prediction

对于帧内预测模式编码块&#xff0c;亮度分量的预测模式和色度分量的预测模式在比特流中分别发出信号。亮度预测模式是基于相邻左侧和上侧两个编码块预测上下文的概率模型进行熵编码的。色度预测模式的熵编码取决于色度预测模式的状态。帧内预测以变换块为单位&#xff0c;并使…

VB之制作一个简易计算器

文章目录 创建制作界面设置文本样式技巧双击控件实现功能完整代码vb.net十分适合用于快速开发windows下的桌面程序 创建 制作界面 20个button 一个richtextbox 设置文本样式技巧 ‘左键框选全部控件,进行统一属性设置!’ 双击控件实现功能 注意控件ID与函数对应 完整代码…

首个WebAgent在线评测框架和流程数据管理平台来了,GPT-4、Qwen登顶闭源和开源榜首!

在当今科技迅速发展的时代&#xff0c;大型语言模型&#xff08;Large Language Model&#xff0c;LLM&#xff09;正以前所未有的速度改变着我们与数字世界的互动方式。基于LLM的智能代理&#xff08;LLM Agent&#xff09;&#xff0c;从简单的信息搜索到复杂的网页操作&…

压缩pdf大小的方法 指定大小软件且清晰

在数字化时代&#xff0c;pdf文件因其良好的兼容性和稳定性&#xff0c;已成为文档分享的主流格式。然而&#xff0c;高版本的pdf文件往往体积较大&#xff0c;传输和存储都相对困难。本文将为您详细介绍几种简单有效的方法&#xff0c;帮助您减小pdf文件的大小&#xff0c;让您…

MacOS M1 安装item2 并配置Zsh

文章目录 1 下载item22 美化item22.1 配置主题2.2 设置黑色的主题&#xff1a;2.3 配置显示状态栏 status bar 3 安装 Oh my zsh3.1 设置主题3.2 设置插件3.3 安装第三方插件1 下载仓库解压2 使用 git clone 一些常用插件以及其作用 参考 1 下载item2 MacOS自带终端&#xff0…

使用小波分析实现文字种类自动识别

文章目录 数据简介开始实验小波分解得出结果结果分析误差分析参考文献 数据简介 各找一篇中文&#xff0c;日文&#xff0c;韩文&#xff0c;英文&#xff0c;俄文较长的学术论文。将论文转化为JPG格式。拆分每张JPG生成更多小的JPG。最终获得很多5个不同语言的JPG并且自带标签…

go中map

文章目录 Map简介哈希表与Map的概念Go语言内建的Map类型Map的声明Map的初始化Map的访问Map的添加和修改Map的删除Map的遍历 Map的基本使用Map的声明与初始化Map的访问与操作Map的删除Map的遍历Map的并发问题实现线程安全的Map 3. Map的访问与操作3.1 访问Map元素代码示例&#…

python—爬虫爬取视频样例

下面是一个使用Python爬虫爬取视频的基本例子。创建一个Python爬虫来爬取视频通常涉及到几个步骤&#xff1a;发送HTTP请求、解析网页内容、提取视频链接、下载视频文件。 import jsonimport requests from lxml import etreeif __name__ __main__:# UA伪装head {"User…

持续集成07--Jenkins配置Allure测试报告

前言 在持续集成&#xff08;CI&#xff09;流程中&#xff0c;自动化测试报告是评估软件质量和追踪问题的重要工具。Allure Framework作为一个轻量级且功能丰富的测试报告工具&#xff0c;能够生成详细的测试报告&#xff0c;帮助团队更好地理解测试结果。本章节“持续集成07-…

深度学习每周学习总结N4:中文文本分类-Pytorch实现(基本分类(熟悉流程)、textCNN分类(通用模型)、Bert分类(模型进阶))

&#x1f368; 本文为&#x1f517;365天深度学习训练营 中的学习记录博客&#x1f356; 原作者&#xff1a;K同学啊 | 接辅导、项目定制 目录 0. 总结&#xff1a;1. 基础模型a. 数据加载b. 数据预处理c. 模型搭建与初始化d. 训练函数e. 评估函数f.拆分数据集运行模型g. 结果可…

Qt QProcess 进程间通信读写数据通信

本文介绍了如何使用Qt的QProcess 进行程序开发&#xff0c;包括启动进程间通信、设置环境变量、通用方法&#xff1b;方便在日常开发中使用&#xff1b; 1.使用Qt进行程序开发&#xff0c;可以通过QProcess类用于启动外部程序并与其进行通信.&#xff1b; 进程A&#xff08;…

Grafana :利用Explore方式实现多条件查询

背景 日志统一推送到Grafana上管理。所以&#xff0c;有了在Grafana上进行日志搜索的需求&#xff0c;而进行日志搜索通常需要多条件组合。 解决方案 通过Grafana的Explore的方式实现多条件查询。 直接看操作步骤&#xff1a; 在主页搜索框中输入“Explore” 进入这个界面…

Linux下开放指定端口

比如需要开放82端口&#xff1a; #查询是否开通 firewall-cmd --query-port82/tcp#开放端口82 firewall-cmd --zonepublic --add-port82/tcp --permanent#重新加载防火墙 firewall-cmd --reload

[计算机网络] VPN技术

1. 概述 虚拟专用网络&#xff08;VPN&#xff09;技术利用互联网服务提供商&#xff08;ISP&#xff09;和网络服务提供商&#xff08;NSP&#xff09;的网络基础设备&#xff0c;在公用网络中建立专用的数据通信通道。VPN的主要优点包括节约成本和提供安全保障。 优点&#…

Android RSA 加解密

文章目录 一、RSA简介二、RSA 原理介绍三、RSA 秘钥对生成1. 密钥对生成2. 获取公钥3. 获取私钥 四、PublicKey 和PrivateKey 的保存1. 获取公钥十六进制字符串1. 获取私钥十六进制字符串 五、PublicKey 和 PrivateKey 加载1. 加载公钥2. 加载私钥 六、 RSA加解密1. RSA 支持三…