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

合肥做网站是什么供别人采集的网站怎么做

合肥做网站是什么,供别人采集的网站怎么做,做6个页面的网站,石家庄网站搭建公司背景介绍 通过uni-app框架实现商城小程序商品详情页的视频与图片轮播功能,以提升用户体验和增加商品吸引力。通过展示商品视频和图片,用户可以更全面地了解商品细节,从而提高购买决策的便利性和满意度。这种功能适用于各类商品,如…

背景介绍

通过uni-app框架实现商城小程序商品详情页的视频与图片轮播功能,以提升用户体验和增加商品吸引力。通过展示商品视频和图片,用户可以更全面地了解商品细节,从而提高购买决策的便利性和满意度。这种功能适用于各类商品,如服装、家具、电子产品等。通过本文的步骤,您将学会如何在商城小程序中利用uni-app框架实现商品详情页的视频与图片轮播功能。

代码组件

新建文件:productConSwiper.vue

<template><view class='product-bg'><swiper :indicator-dots="indicatorDots" indicator-active-color="#E93323" :autoplay="autoplay":circular="circular" :interval="interval" :duration="duration" @change="change"><swiper-item v-if="videoline"><view class="item"><view v-if="!controls" style="width:100%;height:100% "><video id="myVideo" :src='videoline' objectFit="cover" controls style="width:100%;height:100% "show-center-play-btn show-mute-btn="true" auto-pause-if-navigate :custom-cache="false":enable-progress-gesture="false" :poster="imgUrls[0]" @pause="videoPause"></video></view><view class="poster" v-if="controls"><image class="image" :src="imgUrls[0]"></image></view><view class="stop" v-if="controls" @tap="bindPause"><image class="image" src="../../static/images/stop.png"></image></view></view></swiper-item><block v-for="(item,index) in imgUrls" :key='index'><swiper-item><image :src="item" class="slide-image" /></swiper-item></block></swiper></view>
</template><script>export default {props: {imgUrls: {type: Array,default: function() {return [];}},videoline: {type: String,value: ""}},data() {return {indicatorDots: true,circular: true,autoplay: true,interval: 3000,duration: 500,currents: "1",controls: true,isPlay: true,videoContext: null};},mounted() {if (this.videoline) {this.imgUrls.shift()this.videoContext = uni.createVideoContext('myVideo', this); // 创建videoContext}},methods: {videoPause(e) {},bindPause: function() { if (this.videoContext) {this.videoContext.play(); // 调用play方法this.$set(this, 'controls', false);this.autoplay = false;}},change: function(e) {this.$set(this, 'currents', e.detail.current + 1);}}}
</script><style scoped lang="scss">.product-bg {width: 100%;height: 750rpx;position: relative;}.product-bg swiper {width: 100%;height: 100%;position: relative;}.product-bg .slide-image {width: 100%;height: 100%;}.product-bg .pages {position: absolute;background-color: #fff;height: 34rpx;padding: 0 10rpx;border-radius: 3rpx;right: 30rpx;bottom: 30rpx;line-height: 34rpx;font-size: 24rpx;color: #050505;}#myVideo {width: 100%;height: 100%}.product-bg .item {position: relative;width: 100%;height: 100%;}.product-bg .item .poster {position: absolute;top: 0;left: 0;height: 750rpx;width: 100%;z-index: 9;}.product-bg .item .poster .image {width: 100%;height: 100%;}.product-bg .item .stop {position: absolute;top: 50%;left: 50%;width: 136rpx;height: 136rpx;margin-top: -68rpx;margin-left: -68rpx;z-index: 9;}.product-bg .item .stop .image {width: 100%;height: 100%;}
</style>

组件使用

import productConSwiper from '@/components/productConSwiper';
components: {productConSwiper,
},

sliderImage是一个图片地址数组
在这里插入图片描述

productInfo.video是视频的地址

<productConSwiper :imgUrls="sliderImage" :videoline="productInfo.video">
</productConSwiper>
http://www.yayakq.cn/news/22656/

相关文章:

  • 深圳优化网站关键词网络营销案例实例
  • 徐州网站建设xzwzjs建站公司怎么备案
  • 临安网站建设免费中小企业管理软件
  • 做字幕网站有哪些网站开发 密码
  • 国际贸易电子商务网站建设流程打开一个网站搜索页面跳转js
  • 网站后台怎么修改文字WordPress评论调用QQ头像
  • 合肥模板网站建设费用甘肃省嘉峪关建设局网站
  • 全国设计师网站大连网站建设优化
  • 个人能建网站吗wordpress分页代码
  • 德源网站建设我想开一家网店怎么开
  • 站长工具ip地址中国品牌建设促进会网站
  • 淄博网站制作网页公司排位及资讯
  • 学校网站建立网站制作 杭州公司
  • 杭州网站搭建公司温州 网站建设公司
  • 网站头部图片如何做建设银行大冶支行网站
  • 上海做网站比较有名的公司有哪些wordpress the7 下载
  • 笔记网站开发代码技术支持 东莞网站建设东莞天助
  • 做网站第一步做什么做生鲜的网站
  • 宝安做网站关键词查询网址
  • 建设银行人力资源网站应急管理部
  • 青岛网站搜索排名最新新闻热点事件摘抄及评论
  • 前沿的设计网站南昌如何做百度的网站
  • 搜狗怎么做网站滨州网站建设有实力
  • 东莞建工集团企业网站做网站的虚拟机怎么用
  • 兴平市住房和城乡建设局门户网站上海电子商城网站
  • 百度灰色关键词排名技术aso优化服务平台
  • 建设银行网站的登录验证程序安全吗h5制作官网
  • 成都互联网网站建设html5营销网站建设
  • 镭拓网站建设官网网站应用水印图片
  • 来推网站尧都网站建设