<template>
  <view>
	<view class="banner">
		<view class="banner-item info">
			<view class="info-title">
				{{tableData.advertisingName}}
			</view>
			<view class="info-text">{{tableData.shopDescription}}</view>
			<view class="info-racord">
				<view class="info-price"><span>1000</span>元/月</view>
				<view class="info-intention">2456人有意向</view>
			</view>
		</view>
		<view class="banner-item field">
			<view class="banner-item-title">基础信息</view>
			<view class="banner-item-form">
				<u-row gutter="16">
					<u-col span="7">
						<view class="form-item">
							<view class="label">广告位类型：</view>
							<text>{{tableData.advertisingType}}</text>
						</view>
					</u-col>
					<u-col span="5">
						<view class="form-item">
							<view class="label">所属端：</view>
							<text>{{tableData.affiliation || '--'}}</text>
						</view>
					</u-col>
					<u-col span="7">
						<view class="form-item">
							<view class="label">轮播顺序：</view>
							<text>{{tableData.rotationOrder || '--'}}</text>
						</view>
					</u-col>
				</u-row>
			</view>
		</view>
		<view class="banner-item">
			<view class="banner-item-title">广告信息</view>
			<view class="banner-item-form">
				<u-row gutter="16">
					<u-col span="7">
						<view class="form-item">
							<view class="label">广告尺寸：</view>
							<text>{{tableData.dimensions || '--'}}</text>
						</view>
					</u-col>
					<u-col span="5">
						<view class="form-item">
							<view class="label">可上传大小：</view>
							<text>{{tableData.size || '--'}}</text>
						</view>
					</u-col>
					<u-col span="7">
						<view class="form-item">
							<view class="label">位置示意图：</view>
						</view>
					</u-col>
					<u-col span="12">
						<image :src="tableData.locationDiagram" width="100%"></image>
					</u-col>
				</u-row>
			</view>
		</view>
	</view>
    <!-- 底部 -->
    <view class="page-footer">
		<!-- <view class="footer-service">
			<u-image :showLoading="true" :src="$imgUrl('/sevice-icon.png')"  width="30rpx" height="30rpx"></u-image>
			<text>客服</text>
		</view> -->
	<view class="footer-btn">
		<u-button type="primary" @click="leaseAdd('/pages/intentionApply/intentionApply')"  style="margin-right:10px;height: 35px;">意向申请</u-button>
		<u-button type="success" style="height: 35px;"  @click="leaseAdd('/pages/advertisementAdd/advertisementAdd')">租赁申请</u-button>
		<!-- <u-button type="success" style="margin-left: unset;" @click="leaseAdd">广告申请</u-button> -->
	</view>
		<!-- <view class="footer-service">
			<u-image :showLoading="true"  :src="$imgUrl('/share-icon.png')"  width="30rpx" height="30rpx"></u-image>
			<text>分享</text>
		</view> -->
		
    </view>
  </view>
</template>

<script>

export default {
  data() {
    return {
		tableData:{},
		swiperList: [
			{
				id: 0,
				type: 'image',
				url: this.$imgUrl('/img/1.jpg')
			}
		],
		latitude: 39.909,
		longitude: 116.39742,
    };
  },
  onLoad(option){
	let data = JSON.parse(option.item)
	this.tableData = data;
  },
  methods: {
	  leaseAdd(url){
		  console.log(this.tableData)
		  uni.navigateTo({
		  	url:`${url}?ids=${this.tableData.id}&type=${this.tableData.advertisingType}`
		  })
	  }
  }
};
</script>

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