<template>
	<view class="column" style="height: 100%;position: relative;">
		<view class="top-content ">
			<view class="status_bar" :style="{height: statusBarHeight+'px'}"></view>
			<!-- 这里是状态栏 -->
			<view class="top-title">木易华康</view>
		</view>
		<view :style="{marginTop: `calc(${statusBarHeight}px + 88rpx)`}">
		<!-- 	<view class="imgbox">
				<image :src="enterpriseimg[0]" mode="widthFix"></image>
				<view class="myVideobox">
					<video id="myVideo" :src='enterpriseurl'
					show-mute-btn='true' @fullscreenchange='changvideo'
					vslide-gesture-in-fullscreen='true' :muted='muted' loop='true'
					@error="videoErrorCallback"  enable-danmu  controls  autoplay="true"
					class="videotop"></video>
				</view>
			</view> -->
			<view class="imgbox column">
				<image v-for="img in enterpriseimg" :src="img" mode="widthFix"></image>
			</view>
		</view>
		<!-- <tabbar :actindex="1"></tabbar> -->
	</view>
</template>

<script>
	// import{getenterprise} from '@/api/index.js'
	export default {
		data() {
			return {
				statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
				enterpriseurl:'https://hylj-1323137866.cos.ap-chongqing.myqcloud.com/userVideo/2025328/1743138661878.mp4',
				enterpriseimg:[
					'https://fs-1346741853.cos.ap-chengdu.myqcloud.com/fs/20250429/1ef08d879f6e49e69f49486424610b98.jpg',
					'https://fs-1346741853.cos.ap-chengdu.myqcloud.com/fs/20250429/11d396a6867049f083db1eeb05801f7a.jpg',
					'https://fs-1346741853.cos.ap-chengdu.myqcloud.com/fs/20250429/5048e93ec50e446fbb091993e76a6bd4.jpg',
					'https://fs-1346741853.cos.ap-chengdu.myqcloud.com/fs/20250429/ada7714e48dc4ce8913817b0361ae8c1.jpg',
					'https://fs-1346741853.cos.ap-chengdu.myqcloud.com/fs/20250429/e2b0a1c907b249fabf49d4482e551ec9.jpg',
					'https://fs-1346741853.cos.ap-chengdu.myqcloud.com/fs/20250429/3b81107b9cda41bbb1f93988a1b4f368.jpg',
					'https://fs-1346741853.cos.ap-chengdu.myqcloud.com/fs/20250429/9ae3f14f232a40f485989677f8d02323.jpg',
					'https://fs-1346741853.cos.ap-chengdu.myqcloud.com/fs/20250429/53a12478f8a14c01b803eec481ee0f85.jpg',
					'https://fs-1346741853.cos.ap-chengdu.myqcloud.com/fs/20250429/f7c09e4845d740549ee38662aa379e50.jpg',
					'https://fs-1346741853.cos.ap-chengdu.myqcloud.com/fs/20250429/5193ff633d554a49b80e271dba9a647d.jpg'
				],
				muted:true,
			}
		},
		//发送给朋友
		onShareAppMessage(res) {
			return {
				title: "木易华康",
				path: '/pages/index/index',
				imageUrl: 'https://fs-1346741853.cos.ap-chengdu.myqcloud.com/fs/20250323/6189704f2e134b84ad9c9e7c9999f103.jpg' //分享图标，路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
			}
			
		},
		//分享到朋友圈
		onShareTimeline(res) {
			return {
				title: "木易华康",
				imageUrl: 'https://fs-1346741853.cos.ap-chengdu.myqcloud.com/fs/20250323/6189704f2e134b84ad9c9e7c9999f103.jpg' //分享图标，路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
			}
			
		},
		mounted() {
			// this.getenterprise()
		},
		methods: {
			changvideo(e){
				if(e.target.fullScreen==true){
					this.muted=false
				}else{
					this.muted=true
				}
				e.target.fullScreen
			},
			getenterprise(){
				getenterprise().then(res=>{
					this.enterpriseurl=res.data.videoUrl
					this.enterpriseimg=res.data.images
					const url=this.enterpriseimg.split(',')
					this.enterpriseimg=url
					uni.setStorageSync('enterpriseurl',this.enterpriseurl)
					console.log(res)
				})
			},
			videoErrorCallback: function(e) {
				
			},
			// navToTest() {
			// 	 const course = {"companyId":100,"companyUserId":6806,"corpId":"ww5a88c4f879f204c5","courseId":63,"link":"1899022782092541952","linkType":3,"qwExternalId":9914983,"qwUserId":"18931","videoId":409}
			// 	 uni.navigateTo({
			// 		url: '/pages_course/video?course='+JSON.stringify(course)
			// 	 })
			// }
		}
	}
</script>

<style lang="scss" scoped>
.top-content {
	width: 100%;
	z-index: 10;
	position: fixed;
	top: 0;
	left: 0;
	background-color: #FFFFFF;
	.top-title {
		height: 88rpx;
		line-height: 88rpx;
		font-size: 42rpx;
		font-family: Source Han Sans CN;
		font-weight: bold;
		color: #222222;
		padding-left: 41rpx;
		background-color: #FFFFFF;
	}
}
.imgbox{
	position: relative;
	image{
		width: 100%;
		display: block;
	}
}
.videotop{
	width: calc(100% - 60rpx);
	height: 421rpx;
	border-radius: 20rpx;
	position: absolute;
	bottom: 30rpx;
	left: 50%;
	z-index: 9;
	transform: translateX(-50%);
}
</style>
