<template>
<!-- 商务合作详情 -->
  <view class="page">
	<view class="page-info">
	  	<view class="banner">
	  		<view class="title">{{tableData.title}}</view>
			<view class="banner-info-top">
				<view class="times">{{tableData.createTime}}</view>
				<view><u-icon name="eye"></u-icon>{{tableData.viewsNumber}}人</view>
			</view>
	  		<view class="banner-info-item">
	  			<u-parse :html="tableData.content"></u-parse>
	  		</view>
	  	</view>
		<view class="info-box banner good-item" v-if="tableData.cereBasicInformationVenue.venueName">
			<view class="img">
				<u-image width="100%" height="100%" borderRadius="10" :src="$img+tableData.cereBasicInformationVenue.displayImage"></u-image>
			</view>
			<view class="info">
				<view class="title">{{tableData.cereBasicInformationVenue.venueName}}</view>
				<view class="info-item">
					<image  :src="$imgUrl('/kefu.png')"></image>
					<text>{{tableData.cereBasicInformationVenue.detailedLocation}}</text>
				</view>
			</view>
		</view>
		<view class="info-box banner">
			<view class="title">场地往期活动回顾</view>
			<u-row gutter="16">
				<u-col span="4" v-for="(item,index) in tableData.previousEvents">
					<image :src="$img+item" mode="heightFix" style="height:90px; border-radius: 10rpx;" ></image>
				</u-col>
			</u-row>
		</view>
		<view class="info-box banner">
			<view class="title">联系我们</view>
			<view class="info-item">合作类型：{{tableData.cooperationType}}</view>
			<view class="info-item">联系人：{{tableData.contactPerson}}</view>
			<view class="info-item">联系方式：{{tableData.contactPhone}}</view>
			<view class="info-item">邮箱：{{tableData.email}}</view>
		</view>
	</view>
  </view>
</template>

<script>

export default {
  data() {
    return {
		tableData:{},
    };
  },
  onLoad(option){
  	  this.tableData = JSON.parse(option.item)
	  if (typeof this.tableData.previousEvents === 'string') {
	            this.tableData.previousEvents = this.tableData.previousEvents.split(',');
	  }
  	  console.log(this.tableData)
	  let obj ={
		  id:this.tableData.id,
		  viewsNumber:Number(this.tableData.viewsNumber) +1 
	  }
	  this.$http.sendRequest('/cereBusinessCooperation/edit', 'POST', obj,1).then(res => {
	  	
	  })
  },
  methods: {
		leaseAdd(){
			uni.navigateTo({
				url: '/pages/leaseAdd/leaseAdd'
			})
		},
  }
};
</script>

<style scoped lang="scss">
@import 'businessDetail.scss';
</style>
