<template>
	<view>
		<image src="/static/icon/background.png" mode="" class="background"></image>
		<view style="padding-top: 100rpx;">
			<view class="align-items">
				<back></back>
			</view>
			<view class="project-content">
				<view class="font-forty-eight blue">
					项目名称：{{name}}
				</view>
				<view class="font-forty-eight blue">
					项目地址：{{address}}
				</view>
			</view>
		</view>
		<view class="">
			<view class="project background-color1 font-sixty-four white" @click="add('repair')">添加</view>
			<view class="project background-color1 font-sixty-four white" @click="add('list')">查看</view>
			<view class="project background-color1 font-sixty-four white" @click="add('My')">我的</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: 0,
				name: '',
				address: '',
			}
		},
		onLoad(e) {
			console.log(e)
			this.id = e.id;
			this.name = e.name;
			this.address = e.address
		},
		methods:{
			add(type){
				let that = this;
				if(this.name === '安检'){
					uni.navigateTo({
						url: `/pages/noLogin/${type}?id=004&name=${that.name}&address=${that.address}`
					})
				}else if(this.name === '维修'){
					uni.navigateTo({
						url: `/pages/noLogin/${type}?id=005&name=${that.name}&address=${that.address}`
					})
				}else if(this.name === '开栓'){
					uni.navigateTo({
						url: `/pages/noLogin/${type}?id=006&name=${that.name}&address=${that.address}`
					})
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.background {
		z-index: -1;
		position: fixed;
		width: 100%;
		height: 100%;
		background-size: 100% 100%;
	}

	.project-content {
		border: 4rpx solid #3857F3;
		margin: 80rpx 55rpx 0;
		padding: 30rpx 20rpx;
		border-radius: 48rpx;
	}

	.project {
		border-radius: 72rpx;
		padding: 25rpx 0;
		text-align: center;
		margin: 60rpx 55rpx 0;
	}

	.project-img {
		width: 300rpx;
		height: 168rpx;
		margin: 20rpx auto;
	}
</style>