xiaokuang 4 月之前
父節點
當前提交
ea4ac86190
共有 3 個文件被更改,包括 34 次插入12 次删除
  1. 7 3
      components/common/u-swiper/index.vue
  2. 1 1
      pages/index/home.vue
  3. 26 8
      pages/video/index.vue

+ 7 - 3
components/common/u-swiper/index.vue

@@ -9,7 +9,7 @@
 					</view>
 				</swiper-item>
 			</template>
-			<template v-for="(item, index) in items" v-if="useComponentName !== 'logoSwiper'">
+			<template v-for="(item, index) in limitList" v-if="useComponentName !== 'logoSwiper'">
 				<swiper-item :key="index">
 					<view class="image-wrapper" @tap="onImageClick(item)">
 						<image v-if="useComponentName === 'topSwiper'" :mode="imageMode" :src="item.url" :style="imageStyle" />
@@ -32,7 +32,7 @@
 		</view>
 		<view v-if="indicatorDots && useComponentName !== 'logoSwiper'" class="custom-indicator"
 			:class="{ 'morphing': indicatoDotsStyle === 'morphing' }">
-			<view v-for="(item, index) in items" :key="index" class="dot" :class="{ 'active': current === index }"></view>
+			<view v-for="(item, index) in limitList" :key="index" class="dot" :class="{ 'active': current === index }"></view>
 		</view>
 		<van-overlay :show="showOverlay" @tap="onClickHideOverlay">
 			<view class="overlay-wrapper">
@@ -119,6 +119,9 @@
 					style += 'border-radius:' + this.borderRadius + 'rpx;'
 				}
 				return style
+			},
+			limitList() {
+				return this.items.slice(0, this.limit);
 			}
 		},
 		watch: {},
@@ -129,7 +132,8 @@
 				current: 0,
 				logoPage: 1,
 				loading: false,
-				logoList: []
+				logoList: [],
+				limit: 6
 			}
 		},
 		created() {},

+ 1 - 1
pages/index/home.vue

@@ -47,7 +47,7 @@
 				</u-panel>
 			</view>
 			<view class="panel-group logo-group">
-				<u-panel title="战略合作方" link="https://www.productronicachina.com.cn/partners">
+				<u-panel title="战略合作方">
 					<u-swiper :items.sync="part1" useComponentName="logoSwiper" :autoplay="false" :height="250">
 						<template v-slot="{ scope }">
 							<view class="partners">

+ 26 - 8
pages/video/index.vue

@@ -18,6 +18,9 @@
 				</van-overlay>
 			</view>
 		</u-scroll-view>
+		<contact-us :show.sync="showContactUs" :qrcode_url="q_url" />
+		<float-button @custom-event="updateContactStatus()"></float-button>
+		<van-dialog id="van-dialog" />
 	</view>
 </template>
 
@@ -25,17 +28,27 @@
 	import NavBar from '@/components/layout/nav-bar'
 	import UScrollView from '@/components/common/u-scroll-view'
 	import VanOverlay from '@/wxcomponents/vant/overlay/index'
+	import floatButton from "@/components/layout/float-button"
+	import ContactUs from '@/pages/index/components/contact-us.vue'
 	import {
 		getDashboardInfo
 	} from '@/api'
 
 	export default {
-		components: { NavBar, UScrollView, VanOverlay },
+		components: {
+			NavBar,
+			UScrollView,
+			VanOverlay,
+			floatButton,
+			ContactUs
+		},
 		data() {
 			return {
 				showOverlay: false,
 				videoList: [],
-				videoUrl: ''
+				videoUrl: '',
+				showContactUs: false,
+				q_url: ''
 			}
 		},
 		props: {
@@ -59,6 +72,10 @@
 			videoPlay(item) {
 				this.videoUrl = item.url
 				this.showOverlay = true
+			},
+			updateContactStatus(data) {
+				this.showContactUs = data.showContactUs
+				this.q_url = data.q_url
 			}
 		}
 	}
@@ -68,16 +85,16 @@
 	.video-container {
 		.video-list {
 			display: grid;
-			grid-template-columns: 1fr 1fr;
+			grid-template-columns: 1fr;
 			grid-gap: 30rpx;
-			
+
 			.video-item {
 				width: 100%;
 				aspect-ratio: 5/3;
 				position: relative;
 				border-radius: 14rpx;
 				overflow: hidden;
-				
+
 				.cover-img {
 					position: absolute;
 					width: 100%;
@@ -86,7 +103,7 @@
 					left: 0;
 					z-index: 1;
 				}
-				
+
 				.video-play {
 					@include display-flex-center;
 					position: absolute;
@@ -100,7 +117,7 @@
 					margin: auto;
 					background-color: rgba(229, 117, 25, 0.5);
 					z-index: 1;
-				
+
 					.iconfont {
 						color: #FFFFFF;
 						font-size: 50rpx;
@@ -108,10 +125,11 @@
 				}
 			}
 		}
+
 		.overlay-wrapper {
 			@include display-flex-center;
 			height: 100%;
-		
+
 			video {
 				width: 100%;
 			}