<template>
	<view>

		<view class="basic-info">

			<view class="info-content">
				<view class="info-one-info ">
					<text>单位名称：</text>
					<text>{{this.getData.company}}</text>
				</view>
				<view>
					<text>维保单位：</text>
					<text>{{this.getData.maintenance_company}}</text>
				</view>
				<view>
					<text style="width:auto!important">开始日期：</text>
					<text>{{this.getData.start_time}}</text>
				</view>
				<view>
					<text>结束日期：</text>
					<text>{{this.getData.end_time}}</text>
				</view>
				<view>
					<text>销售人员：</text>
					<text>{{this.getData.salesman}}</text>
				</view>
				<view>
					<text>联系电话：</text>
					<text>{{this.getData.salesman_phone}}</text>
				</view>
				<view>
					<text>客户联系人：</text>
					<text>{{this.getData.customer}}</text>
				</view>
				<view>
					<text>客户电话：</text>
					<text>{{this.getData.customer_phone}}</text>
				</view>
				<view>
					<text>合同状态：</text>
					<text class="online">启用{{this.getData.status}}</text>
				</view>
				<view>
					<text>详细内容：</text>
					<a :href="`${this.getData.url}`" download>点击下载查看详情</a>
				</view>
			</view>
		</view>



	</view>
</template>

<script>
	export default {
		data() {
			return {
				getData: {}


			}
		},
		onNavigationBarButtonTap(e) {
			console.log(e)
			uni.navigateTo({
				url: '/pages/safeGuard/QA/QA',
				success: res => {},
				fail: () => {},
				complete: () => {}
			});
		},
		onLoad: function(option) {
			this.getSafeGuardData({
				'company_code': uni.getStorageSync('selectedCode')
			})

		},
		methods: {
			// 视频列表数据请求
			async getSafeGuardData(params = {}) {
				const res = await this.$myRequest({
					url: 'RiskProtection/getRiskProtectionData',
					data: params,
					showLoading: true
				})
				this.getData = res.data.data[0];
				console.log(this.getData.url)
			},
			//下载文件
			downLoadFile() {
				alert(this.getData.url)
				uni.redirectTo({
					url: 'http://47.103.74.123/fileUpload/火灾公众责任保险投保单-2009.doc'
				})
			}







		}
	}
</script>

<style lang="scss">






</style>
