From 2f66b264fed5d3b9d0132281b63c7037c886e040 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期三, 09 十月 2024 13:43:41 +0800
Subject: [PATCH] ll

---
 h5_meeting/pages/index/index.vue |  210 +++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 172 insertions(+), 38 deletions(-)

diff --git a/h5_meeting/pages/index/index.vue b/h5_meeting/pages/index/index.vue
index a1878d3..6f01181 100644
--- a/h5_meeting/pages/index/index.vue
+++ b/h5_meeting/pages/index/index.vue
@@ -2,37 +2,53 @@
 	<view class="main_app">
 		<image src="@/static/bg@2x.png" class="main_bg" mode=""></image>
 		<view class="header_wrap">
-			<view class="title" @touchend="touchend">浼氳瀹�</view>
+			<view class="title" @touchend="touchend">{{info.roomName}}</view>
 			<view class="time_wrap">
 				<view class="time">{{time}}</view>
 				<view class="date">{{date}}</view>
 			</view>
 		</view>
-		<view class="home_status orange">浼氳涓�</view>
-		<view class="meeting_name">浼氳鍚嶇О</view>
-		<view class="meeting_con">
+		<view class="home_status">
+			<text v-if="!info.meetingListResponseList || info.meetingListResponseList.length == 0">绌洪棽涓�</text>
+			<text
+				v-if="info.meetingListResponseList && info.meetingListResponseList.length > 0 && info.meetingListResponseList[0].meetingStatus == 4">鍗冲皢寮�濮�</text>
+			<text class="orange"
+				v-if="info.meetingListResponseList && info.meetingListResponseList.length > 0 && info.meetingListResponseList[0].meetingStatus == 2">浼氳涓�</text>
+			<text
+				v-if="info.meetingListResponseList && info.meetingListResponseList.length > 0 && info.meetingListResponseList[0].meetingStatus == 1">鏈紑濮�</text>
+			<text
+				v-if="info.meetingListResponseList && info.meetingListResponseList.length > 0 && info.meetingListResponseList[0].meetingStatus == 3">宸茬粨鏉�</text>
+			<text
+				v-if="info.meetingListResponseList && info.meetingListResponseList.length > 0 && info.meetingListResponseList[0].meetingStatus == 5">宸叉挙閿�</text>
+		</view>
+		<view v-if="meetingInfo.meetingName" class="meeting_name">{{meetingInfo.meetingName}}</view>
+		<view v-if="meetingInfo.meetingTime && meetingInfo.bookingUser" class="meeting_con">
 			<view class="content">
 				<view class="line">
 					<image src="@/static/ic_time@2x.png"></image>
-					<text>10~12</text>
+					<text>{{meetingInfo.meetingTime }}</text>
 				</view>
 				<view class="line">
 					<image src="@/static/ic_people@2x.png"></image>
-					<text>10~12</text>
+					<text>棰勭害浜猴細{{meetingInfo.bookingUser }}</text>
 				</view>
 			</view>
-			<view class="qrcode"></view>
+			<view v-if="showQrbg" class="qrcode_wrap">
+				<canvas id="qrcode" canvas-id="qrcode" class="qrcode"></canvas>
+			</view>
 		</view>
 		<view class="meeting_wrap">
-			<view class="title">浠婃棩浼氳锛�6锛�</view>
+			<view class="title">
+				浠婃棩浼氳锛坽{ info.meetingListResponseList && info.meetingListResponseList.length > 0 ? info.meetingListResponseList.length : 0 }}锛�
+			</view>
 			<view class="list">
-				<view class="item">
-					<view class="name">寮�鍙戦儴浼氳</view>
-					<view class="line">棰勭害浜猴細鏉庢��鑻�</view>
-					<view class="line">13:30锝�15:00锛堝嵆灏嗗紑濮嬶級</view>
+				<view class="item" v-for="item in info.meetingListResponseList">
+					<view class="name">{{item.meetingName}}</view>
+					<view class="line">棰勭害浜猴細{{item.bookingUser}}</view>
+					<view class="line">{{item.meetingTime}}锛坽{statusMap[item.meetingStatus]}}锛�</view>
 					<image src="@/static/ic_meeting@2x.png" class="item_bg"></image>
 				</view>
-				<view class="item empty">
+				<view v-if="!info.meetingListResponseList || info.meetingListResponseList.length == 0" class="item empty">
 					<view class="name">鏆傛棤浼氳</view>
 					<view class="line">棰勭害浜猴細-</view>
 					<view class="line">-</view>
@@ -40,38 +56,100 @@
 				</view>
 			</view>
 		</view>
+
+		<!--  -->
+		<swiper
+			v-if="info.fileType == 0 && (info.meetingListResponseList == null || info.meetingListResponseList.length == 0)"
+			class="swiper" circular autoplay indicator-dots>
+			<swiper-item v-for="item in info.multifileList">
+				<image class="swiper_item" :src="item.fileurlFull" mode="aspectFill"></image>
+			</swiper-item>
+		</swiper>
+		<!--  -->
+		<template
+			v-if="info.fileType == 1 && info.multifileList && info.multifileList.length > 0 && (info.meetingListResponseList == null || info.meetingListResponseList.length == 0)">
+			<video :src="info.multifileList[0].fileurlFull" class="app_video" :autoplay="true" loop :controls="false"></video>
+		</template>
 	</view>
 </template>
 
 <script>
 	import dayjs from 'dayjs'
+	// import vueQr from 'vue-qr/src/packages/vue-qr.vue'
+	import UQRCode from 'uqrcodejs'
 	import {
 		meetScreenData
 	} from '@/api/index.js'
 	export default {
+		// components: {vueQr},
 		data() {
 			return {
 				time: '',
 				date: '',
+				showQrbg: false,
 				timer: null,
-				touchNum: 0,
-				param: {}
+				touchNum: 0,
+				param: {},
+				info: {},
+				statusMap: {
+					1: '鏈紑濮�',
+					2: '杩涜涓�',
+					3: '宸茬粨鏉�',
+					4: '鍗冲皢寮�濮�',
+					5: '宸叉挙閿�',
+				},
+				meetingInfo: {}
 			}
 		},
-		onLoad() {
-			this.initDatetime()
-			this.param = uni.getStorageSync('param') || {}
-			if(!this.param.code){
-				return uni.navigateTo({
-					url: '/pages/index/config'
-				})
-			}
+		onShow() {
+			this.initDatetime()
+			this.param = uni.getStorageSync('param') || {}
+			if (!this.param.code) {
+				return uni.navigateTo({
+					url: '/pages/index/config'
+				})
+			}
 			this.getData()
 		},
+		onReady() {},
 		methods: {
 			getData() {
-				meetScreenData({
-					roomId: this.param.code
+				this.showQrbg = false
+				meetScreenData({
+					roomId: this.param.code
+				}).then(res => {
+					this.info = res.data
+					if (this.info.meetingListResponseList && this.info.meetingListResponseList.length > 0) {
+						this.meetingInfo = this.info.meetingListResponseList[0]
+						this.$nextTick(() => {
+							this.qrcodeCreate()
+							this.$forceUpdate()
+						})
+					} else {
+						this.showQrbg = false
+						this.meetingInfo = {}
+					}
+				})
+			},
+			qrcodeCreate() {
+				this.showQrbg = true
+				this.$nextTick(() => {
+					// 鑾峰彇uQRCode瀹炰緥
+					var qr = new UQRCode();
+					// 璁剧疆浜岀淮鐮佸唴瀹�
+					// qr.data = "https://uqrcode.cn/doc";
+					qr.data =
+						"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxac2a80c2144c4ee0&redirect_uri=http://192.168.0.109:8080/redirect.html&response_type=code&scope=snsapi_base&state=1#wechat_redirect";
+					// 璁剧疆浜岀淮鐮佸ぇ灏忥紝蹇呴』涓巆anvas璁剧疆鐨勫楂樹竴鑷�
+					qr.size = 83;
+					// 璋冪敤鍒朵綔浜岀淮鐮佹柟娉�
+					qr.make();
+					// 鑾峰彇canvas涓婁笅鏂�
+					var canvasContext = uni.createCanvasContext('qrcode', this); // 濡傛灉鏄粍浠讹紝this蹇呴』浼犲叆
+					// 璁剧疆uQRCode瀹炰緥鐨刢anvas涓婁笅鏂�
+					qr.canvasContext = canvasContext;
+					// 璋冪敤缁樺埗鏂规硶灏嗕簩缁寸爜鍥炬缁樺埗鍒癱anvas涓�
+					qr.drawCanvas();
 				})
 			},
 			touchend() {
@@ -81,8 +159,8 @@
 						console.log('鍗曞嚮')
 					}
 					if (this.touchNum >= 2) {
-						uni.navigateTo({
-							url: '/pages/index/config'
+						uni.navigateTo({
+							url: '/pages/index/config'
 						})
 					}
 					this.touchNum = 0
@@ -96,23 +174,59 @@
 					this.time = dayjs().format('HH:mm')
 					this.date = dayjs().format('YYYY-MM-DD') + ' ' + weeks[new Date().getDay()]
 				}, 1000)
+				setInterval(() => {
+					this.getData()
+				}, this.param.time ? this.param.time * 1000 : 60 * 1000)
 			}
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
+	page,
+	body {
+		overflow: hidden;
+	}
+
+	.swiper {
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 999;
+		width: 100%;
+		height: 100vh;
+
+		.swiper_item {
+			background-color: #0095AC;
+			width: 100%;
+			height: 100vh;
+		}
+	}
+
+	.app_video {
+		width: 100%;
+		height: 100vh;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 999;
+	}
+
 	.main_app {
 		width: 100%;
-		min-height: 100vh;
-		position: relative;
+		height: 100vh;
+		position: fixed;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
 		font-size: 28rpx;
 		display: flex;
 		flex-direction: column;
 		justify-content: space-between;
-		padding-bottom: 35rpx;
+		padding-bottom: 42rpx;
 		color: #fff;
-
+		overflow: hidden;
 		.meeting_wrap {
 			margin-left: 42rpx;
 			margin-top: 85rpx;
@@ -144,10 +258,14 @@
 					flex-direction: column;
 					width: 403rpx;
 					height: 315rpx;
-					background: linear-gradient(90deg, #0095AC 0%, #00B5D1 100%);
+					background: linear-gradient(90deg, #0080FF 0%, #00B0FF 100%);
 					border-radius: 7rpx;
 					margin-right: 28rpx;
 					position: relative;
+
+					&:nth-of-type(1) {
+						background: linear-gradient(90deg, #0095AC 0%, #00B5D1 100%);
+					}
 
 					.item_bg {
 						position: absolute;
@@ -162,6 +280,13 @@
 						flex: 1;
 						font-weight: bold;
 						font-size: 39rpx;
+						width: 100%;
+						word-break: break-all;
+						text-overflow: ellipsis;
+						display: -webkit-box;
+						-webkit-box-orient: vertical;
+						-webkit-line-clamp: 3;
+						/* 瓒呭嚭鍑犺鐪佺暐 */
 					}
 
 					.line {
@@ -171,7 +296,7 @@
 				}
 
 				.empty {
-					background: rgba(255, 255, 255, 0.11);
+					background: rgba(255, 255, 255, 0.11) !important;
 				}
 			}
 		}
@@ -198,11 +323,20 @@
 				}
 			}
 
-			.qrcode {
-				width: 166rpx;
-				height: 166rpx;
-				border: 1px solid red;
+			.qrcode_wrap {
+				width: 92px;
+				height: 92px;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				background-color: #fff;
+
+				.qrcode {
+					width: 84px;
+					height: 84px;
+				}
 			}
+
 		}
 
 		.meeting_name {
@@ -225,7 +359,7 @@
 		}
 
 		.header_wrap {
-			padding: 34rpx 34rpx 0 0;
+			padding: 42rpx 34rpx 0 0;
 			display: flex;
 			justify-content: space-between;
 			align-items: center;

--
Gitblit v1.9.3