当前位置: 首页 > news >正文

无锡做网站哪家好百度快速排名案例

无锡做网站哪家好,百度快速排名案例,网站开发毕设结论,苏州网站建设 网络推广公司文章目录 1. 实现效果2. 精简版核心代码3. 完整功能点&#xff08;本文章不写&#xff0c;只写核心代码&#xff09; 1. 实现效果 2. 精简版核心代码 使用的 vue3 vant4组件使用van-swipe进行轮播图切换实现 <template><div :style"{width: width px,overflo…

文章目录

  • 1. 实现效果
  • 2. 精简版核心代码
  • 3. 完整功能点(本文章不写,只写核心代码)

1. 实现效果

请添加图片描述

2. 精简版核心代码

  1. 使用的 vue3 + vant4组件
  2. 使用van-swipe进行轮播图切换实现
<template><div :style="{width: width + 'px',overflow: 'hidden',}" class="container"><van-swipe :loop="true" vertical :height="height" :width="width" :show-indicators="false" @change="onChange":style="{ height: height + 'px' }"><van-swipe-item v-for="(item, index) in videoList" :key="index" class="swiper-slide-item"><div @click="onVideoClick(item, index)" z-index="1" class="swiperItemVideo"><video class="videoPlayer" :id="'videoPlayer_' + index" ref="player" :key="index" :poster="item.poster":src="item.src" :width="width" autoplay :muted="muteding" loop x5-video-player-type="h5"webkit-playsinline="true" x-webkit-airplay="true" x5-video-orientation="portraint"playsInline="true" x5-video-player-fullscreen="portraint" x5-video-ignore-metadata='true'></video><van-image v-if="!playing" class="play w-[40px] h-[40px]" :src="getAssetsFile('icon/play.png')" /></div><ShortsBottom ref="bottomRef" :item="item" /></van-swipe-item></van-swipe></div>
</template>
<script setup lang="ts" name="Setting">
import {getAssetsFile
} from '@/utils/tool'
const player = ref(null);
const currentIndex = ref(0);
const playing = ref(true);
const muteding = ref(true)
const width = ref(window.innerWidth);
const height = ref(window.innerHeight);
let bottomRef = ref(null)
let bottomHeight = ref(0);
const currentVideoInfo = ref({videoId: "",
});/*** 切换视频*/
const onChange = (index) => {console.log(index, "index")currentVideoInfo.value = {videoId: ""};const preVideoId = "videoPlayer_" + currentIndex.value;const preVideo: any = document.getElementById(preVideoId);if (preVideo) preVideo.pause();const nextVideoId = "videoPlayer_" + index;const nextVideo: any = document.getElementById(nextVideoId);if (nextVideo) nextVideo.play();currentIndex.value = index;player.value = nextVideo;playing.value = trueif (index == videoList.length - 1) {console.log("没有更多了")}
};
/*** 播放|暂停*/
const onVideoClick = (item, index) => {const video: any = document.getElementById("videoPlayer_" + index);if (video && playing.value) {video.pause();playing.value = false;} else {video.play();playing.value = true;}
};onMounted(() => {if (bottomRef.value) {console.log(bottomRef.value[0].bottomHeight, 1)bottomHeight.value = bottomRef.value[0].bottomHeight}const index = currentIndex.value;const videos: any = document.querySelectorAll("video");for (const video of videos) {let videoId = "videoPlayer_" + index;if (video && video.id && video.id != videoId) {video.pause();} else {player.value = video;}}
});onBeforeUnmount(() => {const videos: any = document.querySelectorAll("video");for (const video of videos) {if (video && video.id) {video.pause();}}
});/*** 短视频列表*/
const videoList = [{videoId: Date.now() + 1,title: "抖音美女主播,JK超短裙学生妆美女跳舞展示,爱了爱了。",poster: "http://img01.sogoucdn.com/app/a/201023/27e5400e26fbef1ea32f9aff60c0b015",src: "https://txmov2.a.yximgs.com/upic/2020/11/08/19/BMjAyMDExMDgxOTQxNTlfNTIzNDczMzQ0XzM4OTQ1MDk5MTI4XzFfMw==_b_Bc770a92f0cf153407d60a2eddffeae2a.mp4",uploadTime: "2023-11-08 19:41",ipLocation: "上海",author: {authorId: 101,avatar: "https://i02piccdn.sogoucdn.com/4f85fc70df81d04a",nickName: "陌路",genderName: "男"}
},
{videoId: Date.now() + 2,title: "御姐美女抖音作品,来个自拍视频把,好美啊。",poster: "http://img02.sogoucdn.com/app/a/201023/0866f6a339e58d647eb476f72045e980",src: "https://txmov2.a.yximgs.com/upic/2020/10/02/09/BMjAyMDEwMDIwOTAwMDlfMTIyMjc0NTk0Ml8zNjk3Mjg0NjcxOF8xXzM=_b_B28a4518e86e2cf6155a6c1fc9cf79c6d.mp4",uploadTime: "2023-10-02 09:41",ipLocation: "贵州",author: {authorId: 102,avatar: "http://img02.sogoucdn.com/app/a/201023/0866f6a339e58d647eb476f72045e980",nickName: "御姐呀",genderName: "女"}
},
{videoId: Date.now() + 3,title: "抖音主播可爱妹子新学的舞蹈,超可爱的美女主播。",poster: "https://i02piccdn.sogoucdn.com/2acf176d90718d73",src: "https://txmov6.a.yximgs.com/upic/2020/08/23/00/BMjAyMDA4MjMwMDMyNDRfMTYzMzY5MDA0XzM0ODI4MDcyMzQ5XzFfMw==_b_B9a1c9d4e3a090bb2815994d7f33a906a.mp4",uploadTime: "2023-08-23 00:41",ipLocation: "广州",author: {authorId: 103,avatar: "https://i02piccdn.sogoucdn.com/2acf176d90718d73",nickName: "野花猫",genderName: "女"}
},
{videoId: Date.now() + 4,title: "多个美女带着遮阳帽出去散步自拍视频,好好看。",poster: "https://i02piccdn.sogoucdn.com/45c34c84c106bbb7",src: "https://alimov2.a.yximgs.com/upic/2020/07/02/14/BMjAyMDA3MDIxNDUyMDlfOTExMjIyMjRfMzE1OTEwNjAxNTRfMV8z_b_Bf3005d42ce9c01c0687147428c28d7e6.mp4",uploadTime: "2023-07-02 14:41",ipLocation: "山西",author: {authorId: 104,avatar: "https://i02piccdn.sogoucdn.com/45c34c84c106bbb7",nickName: "蓝姬",genderName: "女"}
},
];
</script>
<style lang="less" scoped>
.container {display: flex;flex-direction: column;overflow: hidden;.swiper-wrapper {flex: 1;}.swiper-slide-item {display: flex;flex-direction: column;width: 100%;.swiperItemVideo {z-index: 1;flex: 1;overflow-y: auto;width: 100%;position: relative;.play {position: absolute;z-index: 2;content: "";top: 50%;left: 50%;transform: translate(-50%, -50%);animation: move 0.3s linear alternate;}}.videoPlayer {background: #000;height: 100%;z-index: 2;}}
}@keyframes move {0% {transform: translate(-50%, -50%) scale(2);opacity: 0;}100% {transform: translate(-50%, -50%) scale(1);opacity: 1;}
}
</style>
  1. ShortsBottom 组件代码
<template><div class="videoInfo" ref="bottomRef"><div class="top mb-[8px]"><van-image class="logo w-[40px] h-[40px] mr-[8px]" round :src="getAssetsFile('logo.png')" /><span class="nickName  mr-[12px]">{{ item.author.nickName }}</span><div class="btn-content" @click="Follow"><van-button type="primary" size="small" class="btn">Follow</van-button></div><div class="closeSound"><van-image class="logo w-[16px] h-[16px]" :src="getAssetsFile('icon/closeSound.png')" /></div></div><van-text-ellipsis class="title" :content="item.title" /></div>
</template>
<script setup lang="ts">import { ref, onMounted } from "vue";import { getAssetsFile } from '@/utils/tool'interface Props {item : any;}const props = withDefaults(defineProps<Props>(), {item: {},});let bottomRef = ref(null)let bottomHeight = ref(0)const Follow = ()=>{console.log("关注")}onMounted(() => {if (bottomRef.value) {bottomHeight.value = bottomRef.value.offsetHeight}});defineExpose({ bottomHeight })//暴露子组件的方法或者数据
</script><style lang="less" scoped>.videoInfo {background: #161616;color: #f5f5f5;padding: 16px 20px 34px 16px;text-align: left;position: relative;&::after {position: absolute;display: block;content: "";bottom: 0px;left: 0;width: 100%;height: 0px;background: red;z-index: 1;}.top {display: flex;justify-content: flex-start;align-items: center;.nickName {font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;font-weight: 700;font-size: 14px;color: #FFFFFF;line-height: 14px;}.closeSound {margin-left: auto;width: 32px;height: 32px;padding: 8px;border-radius: 50%;background: rgba(255, 255, 255, 0.1);}}.title {font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;font-weight: 400;font-size: 14px;color: #FFFFFF;line-height: 14px;}}
</style>

3. 完整功能点(本文章不写,只写核心代码)

  • 视频点赞
  • 视频分享
  • 视频用户基础信息
  • 视频暂停/播放
  • 视频声音控制
  • 上下切换视频
  • 视频封面图设置
    在这里插入图片描述

文章转载自:
http://haybox.qkqn.cn
http://dbms.qkqn.cn
http://optokinetic.qkqn.cn
http://aspergillosis.qkqn.cn
http://prepay.qkqn.cn
http://reflection.qkqn.cn
http://alcoa.qkqn.cn
http://hematidrosis.qkqn.cn
http://warm.qkqn.cn
http://nonaccess.qkqn.cn
http://trencher.qkqn.cn
http://sou.qkqn.cn
http://antidiuretic.qkqn.cn
http://bane.qkqn.cn
http://reflectometry.qkqn.cn
http://rill.qkqn.cn
http://literacy.qkqn.cn
http://guilloche.qkqn.cn
http://yenta.qkqn.cn
http://unshelled.qkqn.cn
http://dick.qkqn.cn
http://fortunebook.qkqn.cn
http://enquiry.qkqn.cn
http://trehalose.qkqn.cn
http://sausageburger.qkqn.cn
http://pang.qkqn.cn
http://decuplet.qkqn.cn
http://untrodden.qkqn.cn
http://massawa.qkqn.cn
http://ameba.qkqn.cn
http://conation.qkqn.cn
http://retorsion.qkqn.cn
http://sublime.qkqn.cn
http://shiftless.qkqn.cn
http://metallogenetic.qkqn.cn
http://fundi.qkqn.cn
http://usv.qkqn.cn
http://burgee.qkqn.cn
http://niffy.qkqn.cn
http://customs.qkqn.cn
http://hymnist.qkqn.cn
http://ricebird.qkqn.cn
http://chaikovski.qkqn.cn
http://tuberculocele.qkqn.cn
http://robinsonade.qkqn.cn
http://etherize.qkqn.cn
http://illuminance.qkqn.cn
http://jollop.qkqn.cn
http://quiff.qkqn.cn
http://sequela.qkqn.cn
http://oscillograph.qkqn.cn
http://magistracy.qkqn.cn
http://epanthous.qkqn.cn
http://parliament.qkqn.cn
http://makebate.qkqn.cn
http://superempirical.qkqn.cn
http://leninist.qkqn.cn
http://surpass.qkqn.cn
http://samphire.qkqn.cn
http://rowland.qkqn.cn
http://pli.qkqn.cn
http://minicomputer.qkqn.cn
http://dollop.qkqn.cn
http://balikpapan.qkqn.cn
http://ixion.qkqn.cn
http://ragtop.qkqn.cn
http://gynecopathy.qkqn.cn
http://yetorofu.qkqn.cn
http://irreversible.qkqn.cn
http://sheeney.qkqn.cn
http://lobsterback.qkqn.cn
http://fleece.qkqn.cn
http://autofill.qkqn.cn
http://russet.qkqn.cn
http://separate.qkqn.cn
http://unplug.qkqn.cn
http://pinkish.qkqn.cn
http://aggie.qkqn.cn
http://ambulatory.qkqn.cn
http://verism.qkqn.cn
http://aright.qkqn.cn
http://sire.qkqn.cn
http://scintiscanner.qkqn.cn
http://weathermost.qkqn.cn
http://hungered.qkqn.cn
http://quintefoil.qkqn.cn
http://subzone.qkqn.cn
http://coheir.qkqn.cn
http://norge.qkqn.cn
http://middlebreaker.qkqn.cn
http://explainable.qkqn.cn
http://larynges.qkqn.cn
http://involvement.qkqn.cn
http://kymogram.qkqn.cn
http://lange.qkqn.cn
http://shoebill.qkqn.cn
http://mulligatawny.qkqn.cn
http://villager.qkqn.cn
http://soothingly.qkqn.cn
http://jauk.qkqn.cn
http://www.dt0577.cn/news/74770.html

相关文章:

  • 单位网站备案流程做个公司网站一般需要多少钱
  • 公司网站开发类属什么费用免费的网站域名查询
  • dede系统做的网站如何调用cu3er官网flash 3d焦点图指数基金怎么买
  • 商丘网签查询seo专员是什么职业
  • 邓砚谷电子商务网站建设口碑营销的产品有哪些
  • 网站的表现形式seo是干嘛的
  • 品牌型网站建设理论漯河seo公司
  • 中州建设有限公司网站下载百度 安装
  • 专门做石材地花设计的网站如何查询网站收录情况
  • dreamweaver下载官网站长之家seo工具包
  • Asp.net 手机网站制作品牌全案营销策划
  • 毕设做网站些什么比较简单网络服务器地址怎么查
  • 别人的网站是怎么找到的网络舆情监测专业
  • 祥云网站优化免费的网站推广软件
  • 老网站做成适合手机端的网站怎么做建立自己的网站平台
  • 网站干什么的网站推广建站
  • 中山网站建设平台平台接广告在哪里接的
  • 个人网站免费申请注册如何制作app软件
  • 关于设计的网站网络推广的含义
  • 网络公司网络营销推广方案朝阳seo排名优化培训
  • 徐州 网站 备案 哪个公司做的好现在最火的推广平台有哪些
  • 长沙做网站咨询公司网络营销做得好的产品
  • 海外推广运营网站seo推广哪家值得信赖
  • h5做网站什么软件网络公司主要做哪些
  • 淘宝做网站如何搭建网站平台
  • 在网站中加入锚链接应该怎么做沈阳网站建设制作公司
  • 网站建设的源代码阿里云万网域名查询
  • 企业网站案例欣赏360指数官网
  • 公司做网站的步骤昆明网络推广优化
  • 南通网站推广公司不受国内限制的浏览器下载