<template>
	<view class="content">
		<fxyk-navbar :isSearch="false" :title="title"/>
		<view style="height:10rpx"></view>
		<fxyk-card class="u-margin-10" :showHead="false" :projectTime="projectTime" :bodyInfo="2" />
		<fxyk-button v-if="status === 2" content="项目终止" width="321" height="83" bgColor="#40349C" @click.native="jump_project_end"/>
		<view style="height:10rpx"></view>
		<fxyk-card class="u-margin-10" :projectInfo="projectInfo"/>
		<fxyk-gap />
		<u-time-line class="u-margin-bottom-20" style="margin-left:17rpx;padding:0;">
			<fxyk-timeline-newest v-for="i in 9" :key="i" projectStatus="1" :projectIndex="i" />
		</u-time-line>
	</view>
</template>

<script>
	export default {
		data() {
			return { 
				status: '',
				projectInfo: {
					'name':'放大镜结果呢人哪里哪里就那几个那经历过那就南大街了',
					'code':11111,
					'text':'放大镜结果呢人哪里哪里就那几个那经历过那就南大街了',
					'large':11111,
					'space':11111,
					'invest':11111,
					'people':11111,
					'phone':11111	
				},
				projectTime: {
					edTime: 30,
					wcTime: 15,
					start: 1591494571,
					end: 1594000171
				}
			}
		},
		onLoad(option) {
			let status = parseInt(option.status)
			this.status = 2
		},
		computed: {
			// 导航栏标题
			title() {
				if (this.status === 1) {
					return '已完成'
				} else if (this.status === 2) {
					return '进行中'
				} else {
					return '已终止'
				}
			}
		},
		methods: {
			// 跳到节点管理页  不跳
			// jump_project_info_point() {
			// 	uni.navigateTo({
			// 		url: '/pages/index/projectInfoPoint'
			// 	})
			// },
			// 跳到项目终止页
			jump_project_end() {
				uni.navigateTo({
					url: '/pages/index/projectEnd'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	page {
		width: 100%;
		height: 100%;
	}
	.content {
		width: 100%;
		height: 100%;
		min-height: 100vh;
		background-color: $yk-bg-color;
	}
	.project-end {
		width: 321rpx;
		height: 83rpx;
		background: #40349C;
		box-shadow: 0rpx 4rpx 2rpx #1B0E81;
		border-radius: 17rpx;
		font-size: 33rpx;
		font-family: SimSun;
		font-weight: 400;
		line-height: 44rpx;
		color: #FFFFFF;
		margin-left: 215rpx;
	}
</style>
