<template>
	<view class='center'>
		<view style="background: linear-gradient( 180deg, #1FCA7C 0%, #F2F2F2 100%);">
			<u-navbar :autoBack="true" title="报修详情" placeholder="true" bgColor="transparent" leftIconColor="#FFF"
				:title-style="{color: '#FFF'}">
			</u-navbar>
			<view class="h-300 flex flex-row-between v-center  ml-60 mr-35">
				<view class="flex-column" style="color: #1BB871;">
					<text class="fs-52">今日报修</text>
					<text class="fs-30">报修详情我知道</text>
				</view>
				<image class="h-225 w-225" src="/pagesMain/static/icon_bxxq.png"></image>
			</view>
		</view>

		<view class="overflow-y"
			style="background: white;border-top-left-radius: 20rpx;border-top-right-radius: 20rpx;margin-top: -20rpx;">
			<scroll-view scroll-y style="height: 100%;">
				<view class="mar-20">
					<view class="flex-column-center">
						<image class="w-20 h-20 mr-10" style="background-color: #1FCA7C;"></image>
						<text style="flex: 1;text-align: left;">居家报修</text>
						<text style="font-size: 24rpx;color: #EEA616;">待支付</text>
					</view>
					<view class="flex-column br-12 fs-28 mt-30" style="background: #EBF5F0;">
						<view class="flex pad-30">
							<text class="fw-700 w-200" style="text-align: left;">业主姓名：</text>
							<text>张三</text>
						</view>
						<view class="flex pad-30">
							<text class="fw-700 w-200" style="text-align: left;">业主房间号</text>
							<text>利达国宾中心1栋2单元205室</text>
						</view>
						<view class="flex pad-30">
							<text class="fw-700 w-200" style="text-align: left;">业主手机号</text>
							<text>17778767876</text>
						</view>
					</view>
					<view class="flex-column-center fs-32 fw-700  mt-30">
						<image class="w-10 h-40 mr-15" style="background-color: #1FCA7C;"></image>
						<text>报修信息</text>
					</view>
					<view class="flex-column br-12 fs-28 mtb-30 pad-30" style="background: #EBF5F0;">
						<text style="text-align: left;">利达国宾中心利达国宾中心1栋2单元205室卫生
							间漏水，请物业及时查看</text>
					</view>
					<scroll-view scroll-x="true" scroll-with-animation="true">
						<view class="flex">
							<view class="w-140 h-140 mr-15" v-for="(itemImg, index2) in 10" :key="index2">
								<image class="w-140 h-140" style="background: #1FCA7C;"></image>
							</view>
						</view>
					</scroll-view>
					<view class="flex mt-20 fs-24 v-center">
						<view class="fw-700 fs-28">报修时间:</view>
						<view class="fs-24 ml-10">2025-03-10 10:01:45</view>
					</view>
					<view class="flex-column br-12 fs-28 mt-30" style="background: #EBF5F0;">
						<view class="flex pad-30">
							<text class="fw-700 w-200" style="text-align: left;">负责人：</text>
							<text>张三</text>
						</view>
						<view class="flex pad-30">
							<text class="fw-700 w-200" style="text-align: left;">手机号：</text>
							<text>利达国宾中心1栋2单元205室</text>
						</view>
						<view class="flex pad-30">
							<text class="fw-700 w-200" style="text-align: left;">完成时间：</text>
							<text>17778767876</text>
						</view>
					</view>

				</view>


			</scroll-view>
		</view>
		<view class="h-140 pt-20">
			<view class="full-btn" v-if="false">
				去支付
			</view>
			<view class="full-btn" style="color: #FF682D;">
				取消报修
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: '居家报修',
				type: 0,
				reason: '',
				submitShow: false,
				images: '',
			};
		},
		onLoad(e) {
			this.type = e.type
			if (e.type == 0) {
				this.title = "居家报修"
			} else {
				this.title = "公区报事"
			}
		},
		methods: {
			onSubmit() {
				this.$wskj.to("/pagesMain/pages/tjsq?type=" + this.type)
				// if (!this.reason) {
				// 	return this.$u.toast('请输入内容')
				// }
				// if (!this.images) {
				// 	return this.$u.toast('请至少上传一张照片')
				// }
				// if (this.reason.length < 10) {
				// 	return this.$u.toast('文字描述最低10个字')
				// }
				// this.submitShow = true
			},
			// 提交
			onConfirmSubmit() {
				// const params = {
				// 	url: '/api/user/yijian',
				// 	loadingTip: '',
				// 	data: {
				// 		content: this.reason,
				// 		images: this.images
				// 	}
				// }
				// // console.log(params);
				// this.$request(params).then(res => {
				// 	// console.log(res)
				// 	this.submitShow = false
				// 	if (res.code === 1) {
				// 		this.$u.toast(res.msg || '提交成功')

				// 		this.reason = ''
				// 		this.images = ''
				// 	} else {
				// 		this.$u.toast(res.msg || '提交失败')
				// 	}
				// }).catch(err => {
				// 	this.submitShow = false
				// 	this.$u.toast(err.msg || '提交失败')
				// })
			}
		},
	};
</script>

<style scoped>
	.center {
		height: 100vh;
		display: flex;
		flex-direction: column;
		background: white;
	}
</style>