<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" style="text-align: left;">服务规则</text>
					<text class="fs-30">以下是具体的规则说明哦~</text>
				</view>
				<image class="h-225 w-225" src="/pagesMain/static/icon_fwgz.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">
					<u-parse :content="content"></u-parse>

				</view>


			</scroll-view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: '居家报修',
				type: 0,
				reason: '',
				submitShow: false,
				images: '',
				content: ''
			};
		},
		onLoad(e) {
			this.content = decodeURIComponent("<p>露从今夜白，月是故乡明</p>")
		},
		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>