<template>
	<view class="details">
		<view class="navbar">
			<view class="back">
				<text class="iconfont icon-fanhui " @click="backLast()"></text>
			</view>
			<text>活动详情</text>
		</view>
<!-- 		<view class="top">
			<u-navbar title="活动详情" :background="background" :border-bottom='false' title-color='#fff'></u-navbar>
		</view> -->
		<view class="content">
			<view class="title">
				<image :src="notice.cover ? notice.cover : '../../static/images/active.png'" mode=""></image>
				<view class="right">
					<view class="h1">
						{{notice.title}}
					</view>
					<view class="name">
						主持人：{{notice.compere}}
					</view>
					<view class="time">
						{{notice.day}}
					</view>
					<!-- <view class="text">
						<text>主持人：{{notice.compere}}</text>
						<text>参与者：{{notice.participant}}</text>
					</view>
					<view class="address">
						活动地址：{{notice.address}}
					</view>	
					<view class="time">
						活动日期：{{notice.day}}
					</view> -->
				</view>
			</view>
			<view class="desc">
				<view v-html="containt">{{containt}}</view>
			</view>
		
		</view>
	</view>
</template>

<script>
	import navBar from '../../components/navBar/navbar.vue';
	var app = getApp()
	export default {
		data() {
			return {
				background: 'rgba(255,255,255,0)',
				notice: {},
				containt:''
				}
			},
			onLoad(options) {
				if (this.is_weixin()) {
					this.navTitle()
				}
				app.request('/organization-activity/' + options.id , 'get').then(res => {
					console.log(res, 'course1')
					this.notice = res.data.data
					this.containt = res.data.data.body
				})
			},
		methods:{
			//判断是否是微信
			is_weixin() {
				let ua = navigator.userAgent.toLowerCase();
				return ua.indexOf('micromessenger') != -1;
			},
			navTitle() {
				let navTitle = document.getElementsByTagName('uni-page-head');
				navTitle[0].style.display = 'none'
			},
			backLast:function(){
				console.log(this.url)
				uni.reLaunch({
					url:'./active'
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.navbar {
			font-size: 32upx;
			height: 100upx;
			line-height: 100upx;
			color: #888888;
			position: relative;
			position: fixed;
			top: 0;
			z-index: 9999999;
			width: 100%;
			 background-color: #FFFFFF;
			text-align: center;
			border-bottom: solid 2upx #EFF1F6;
		
			.back {
				height: 100upx;
				width: 100upx;
				text-align: center;
				// background-color: #007AFF;
				position: absolute;
				float: left;
				left: 0upx;
				font-size: 32upx;
			}
		}
			.content {
				margin-top: 100upx;
				.title {
					padding: 20px;
					display: flex;
					align-items: center;
					justify-content: center;
			
					image {
						flex: 0 0 85px;
						height: 85px;
						border-radius: 9px;
						margin-right: 10px;
						background-color: #FFFFFF;
					}
			
					.right {
						flex: 1;
			
						.h1 {
							font-size: 16px;
							font-family: PingFang SC;
							font-weight: bold;
							// line-height: 20px;
							margin-top: 5px;
							// color: #FFFFFF;
							width: 211px;
							white-space: nowrap;
							/*设置不换行*/
							overflow: hidden;
							/*设置隐藏*/
							text-overflow: ellipsis;
							/*设置隐藏部分为省略号*/
						}
						// .text {
						// 	font-size: 13px;
						// 	font-family: PingFang SC;
						// 	font-weight: 400;
						// 	line-height: 20px;
						// 	color: rgba(40, 40, 40, .47);
						// 	margin-top: 3px;
						// 	width: 230px;
						// 	display: flex;
						// 	text{
						// 		display: block;
						// 		width: 115px;
						// 		white-space: nowrap;
						// 		/*设置不换行*/
						// 		overflow: hidden;
						// 		/*设置隐藏*/
						// 		text-overflow: ellipsis;
						// 		/*设置隐藏部分为省略号*/
						// 	}
						// }
						// .address{
						// 	font-size: 13px;
						// 	font-family: PingFang SC;
						// 	font-weight: 400;
						// 	line-height: 20px;
						// 	color: rgba(40, 40, 40, .47);
						// 	margin-top: 3px;
						// 	width: 230px;
						// }
						
						// .time {
						// 	font-size: 10px;
						// 	font-family: PingFang SC;
						// 	font-weight: 400;
						// 	line-height: 20px;
						// 	color: rgba(40, 40, 40, .47);
						// 	width: 230px;
						// 	white-space: nowrap;
						// 	/*设置不换行*/
						// 	overflow: hidden;
						// 	/*设置隐藏*/
						// 	text-overflow: ellipsis;
						// 	/*设置隐藏部分为省略号*/
						// }
			
						.name {
							font-size: 13px;
							font-family: PingFang SC;
							font-weight: 400;
							line-height: 20px;
							color: #282828;
							margin-top: 5px;
							opacity: 1;
						}
			
						.time {
							font-size: 10px;
							font-family: PingFang SC;
							font-weight: 400;
							line-height: 20px;
							color: #282828;
							opacity: 1;
						}
					}
				}
			
				.desc {
			
					padding: 20px;
					font-size: 13px;
					font-family: PingFang SC;
					font-weight: 400;
					line-height: 23px;
					color: #282828;
					opacity: 0.69;
				}
			
			}	
</style>
