<template>
	<view style="height: 100vh;background: #F9FAFF;">
		<view class="myproject-top">
			<navs :top='top' :page='pageName' :color='color'></navs>
		</view>
		<view class="myproject-box">
			<view>
				<view>项目名称</view>
				<view style="flex: 1;text-align: right;">xxxxxxx小程序</view>
			</view>
			<view @click="goTo()">
				<view>项目进度</view>
				<view style="flex: 1;text-align: right;">设计完成80%</view>
				<view class="iconfont icon-tubiaoyanse"></view>
			</view>
			<view>
				<view>项目计划</view>
				<view style="flex: 1;text-align: right;">2023.08.31完成交付</view>
			</view>
			<view>
				<view>当前阶段</view>
				<view style="flex: 1;text-align: right;">设计阶段</view>
			</view>
			<view @click="feedback()">
				<view>我要反馈</view>
				<view class="iconfont icon-tubiaoyanse"></view>
			</view>
			<uni-popup ref="feedback" type="center">
				<view class="feedback-box">
					<textarea class="msg" placeholder-style="color:#D8D8D8" placeholder="请输入内容" />
					<view class="feedback-btn" @click="onSubmit()">提交</view>
				</view>
			</uni-popup>
			<uni-popup ref="success" type="center">
				<view class="success-box">
					<view class="iconfont icon-Gro11up"></view>
					<view class="success-text">xxxxx成功</view>
				</view>
			</uni-popup>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				pageName: '我的项目',
				color: 1,
				top: 0
			};
		},
		onLoad() {
			this.top = uni.getMenuButtonBoundingClientRect().top;
		},
		methods: {
			goTo() {
				uni.navigateTo({
					url: '/pages/projectSchedule/projectSchedule'
				})
			},
			feedback() {
				this.$refs.feedback.open()
			},
			onSubmit() {
				this.$refs.feedback.close()
				this.$refs.success.open()
			}
		}
	}
</script>

<style lang="scss">
	.myproject-top {
		background-color: #fff;
		padding-bottom: 8rpx;
	}

	.myproject-box {
		padding: 24rpx 32rpx 0 28rpx;

		>view {
			display: flex;
			background-color: #fff;
			border-radius: 20rpx;
			height: 112rpx;
			line-height: 112rpx;
			padding: 0 24rpx 0 28rpx;
			justify-content: space-between;
			margin-top: 20rpx;

			&:first-child {
				margin-top: 0;
			}

			.icon-tubiaoyanse {
				font-size: 24rpx;
				color: #A4A4A4;
				margin-left: 20rpx;
			}
		}
	}

	.feedback-box {
		width: 628rpx;
		height: 462rpx;
		border-radius: 40rpx;
		background: #ffffff;
		padding: 30rpx 24rpx;
		box-sizing: border-box;

		.msg {
			width: 580rpx;
			height: 274rpx;
			border-radius: 12rpx;
			background: #f8f8f8;
			padding: 24rpx 22rpx;
			box-sizing: border-box;
			font-size: 30rpx;
			font-weight: 400;
		}

		.feedback-btn {
			width: 303rpx;
			height: 76rpx;
			border-radius: 12rpx;
			background: #3887fd;
			margin: 44rpx auto 0;
			color: #fff;
			font-size: 30rpx;
			font-weight: 500;
			text-align: center;
			line-height: 76rpx;
		}
	}

	.success-box {
		width: 628rpx;
		height: 462rpx;
		border-radius: 40rpx;
		background: #ffffff;
		padding-top: 120rpx;
		box-sizing: border-box;

		.icon-Gro11up {
			text-align: center;
			color: #3887FD;
			font-size: 164rpx;
		}

		.success-text {
			font-size: 32rpx;
			font-weight: 600;
			color: #333;
			text-align: center;
			line-height: 100rpx;
			margin-top: 11rpx;
		}
	}
</style>
