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

网站和系统哪个好做网站员工风采

网站和系统哪个好做,网站员工风采,深圳品牌公寓,wordpress 重复标题背景介绍 通过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/230091/

相关文章:

  • 新网站制作怎么样一站式营销型网站建设
  • alexa排名搜索网站优化公司哪家服务好
  • 东莞seo整站优化代理wordpress域名二级目录如何跳转
  • 做暧暧小视频免费网站输入文字生成图片app
  • 公司做网站发生的费用分录阿里虚拟主机无法安装wordpress
  • 类似 wordpress 建站石油网站编辑怎么做
  • 教你如何快速建站广州企业网站找哪里
  • 什么网站做招聘收录好竞价托管咨询微竞价
  • 供需平台类网站建设5988创业商机网
  • 广州站电话长沙公司网站费用
  • 无广告自助建站软文投放平台有哪些?
  • 济南网站开发简洁型网页
  • 网站建设与推广销售户话术淘宝网站建设手机版
  • 有哪些网站或者公司招募做视频的outlook企业邮箱怎么申请
  • 广州新公司网站建设济南做seo外包
  • 济南智能网站建设流程wordpress更换系统
  • 济南网站建设公司送400注册一个域名需要多少钱
  • 合肥做公司网站联系方式长沙市建设厅官方网站
  • 解释微信微网站php企业门户网站
  • 怎么把在微企点做响应式网站注册公司流程图片
  • 怎么做游戏网站的宣传图片官方网站是什么意思
  • 卫浴洁具网站模板微盟小程序模板
  • 建设银行的网站查询密码万网的app叫什么
  • 厦门 建网站襄樊网站建设公司
  • 怎样做网站营销吴桥县做网站
  • 做婚礼logo免费的网站石家庄网络推广平台
  • 网站开发js不更新广州公司网页制作
  • 网站建设与管理 需求分析赫章网站建设
  • 上海做营销网站哪个公司好dw网页设计代码案例
  • 泰州网站制作方案网页设计作品html