<template>
	<view class="intro-page common">
		<view class="top-class"></view>
		<view class="title">
			意见反馈
		</view>
		<view class="head">
			<u-row class="row-class">
				<u-col span="4">
					<image class="logo-img" src="/static/images/common/logo.png" mode="aspectFit" />
				</u-col>
				<u-col span="4">
					<!-- <image class="commodity-img" src="/static/images/common/commodity.png" mode="aspectFit" /> -->
				</u-col>
				<u-col span="4">

				</u-col>
			</u-row>
		</view>

		<view class="theme-text">
			<image src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/text.png"
				class="textImage"></image>
		</view>

		<view class="intro-card">
			<view class="intro-view">
				<view class="intro-label">
					<view class="label-title">
						意见反馈
					</view>
				</view>
				<view class="content">
					<view class="intro-content">
						欢迎光临!各位梅山古镇的顾客朋友们，为了提供更优质的产品和更好的服务给你们，向各位征集对本公司的评价、期望、意见和建议，非常期待你们的反馈。我们将会报以更优质的服务。谢谢您的协助和厚爱。评价，建议一经公司评选和采纳，会有丰厚奖品赠送哦，赶快来参加吧！
					</view>
					<view class="from">
						<view class="filter-btn-group">
							<view class="row-text">留言类型：</view>
							<view v-for="(item, idx) in filterOptions" :key="idx"
								:class="['filter-btn', filterStatus === item.value ? 'active' : '']"
								@click="onFilterChange(item.value)">
								{{ item.label }}
							</view>
						</view>
						<u--form labelPosition="left" :model="model1" :rules="rules" ref="uForm">
							<u-form-item label="留言人姓名:" prop="userInfo.name" ref="item1">
								<u--input v-model="model1.userInfo.name" border="none"></u--input>
							</u-form-item>

							<u-form-item label="联系电话:" prop="userInfo.tel" ref="item1">
								<u--input v-model="model1.userInfo.tel" border="none"></u--input>
							</u-form-item>

							<u-form-item label="E-mail:" prop="userInfo.mail" ref="item1">
								<u--input v-model="model1.userInfo.mail" border="none"></u--input>
							</u-form-item>

							<u-form-item label="留言:" ref="item1">
								<u--textarea v-model="model1.userInfo.liuyan" border="none"></u--textarea>
							</u-form-item>

						</u--form>
					</view>

				</view>

			</view>

		</view>
		<u-toast ref="uToast"></u-toast>
		<!-- 返回按钮 -->
		<view class="footer-btn">
      <view @click="saveData" class="return-button" style="margin-right: 180rpx;">保存</view>
			<view @click="goBack" class="return-button">返回</view>
		</view>
	</view>
</template>

<script>
import {
  feed
} from '@/api/scan'
import feedbackMixin from '@/mixins/feedbackMixin.js'

export default {
  mixins: [feedbackMixin],
  methods: {
    saveData() {
      // 调用 mixin 中的方法，传入特定的 API 函数
      this.baseSaveData(feed, (data) => {
        // 可以在这里添加特定的成功回调处理
      });
    },
    goBack() {
      this.baseGoBack();
    },
    openDetail() {
      this.baseOpenDetail("lgz");
    },
    onFilterChange(val) {
      this.baseOnFilterChange(val);
    },
  }
}
</script>
<style lang="scss" scoped>
	@import url('../../../static/scss/common.css');

	.row-class {
		height: 80rpx;
	}

	.logo-img {
		background-size: cover;
		/* 确保背景图片自适应填充整个容器 */
		background-position: center;
		/* 背景图片居中显示 */
		background-repeat: no-repeat;
		/* 防止背景图重复 */
		height: 42rpx;
		width: 62%;
	}

	.commodity-img {
		background-size: cover;
		/* 确保背景图片自适应填充整个容器 */
		background-position: center;
		/* 背景图片居中显示 */
		background-repeat: no-repeat;
		/* 防止背景图重复 */
		height: 35rpx;
		width: 100%;
	}

	.theme-text {
		height: 10vh;
		text-align: center;
		line-height: 11vh;

		.textImage {
			height: 80rpx;
			width: 400rpx;
		}
	}

	.intro-card {
		margin: 0 32rpx;
		padding: 32rpx 24rpx 24rpx 24rpx;
		background: rgba(131, 100, 71, 0.5);
		border-radius: 10rpx;

		.intro-view {
			border: 1px solid #341B10;
			padding: 10px;
			margin-top: 20rpx;
			position: relative;

			.intro-label {
				background-image:
					url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/label.png");
				/* 使用绝对路径 */
				background-size: contain;
				background-repeat: no-repeat;
				width: 220rpx;
				height: 120rpx;
				position: absolute;
				margin-top: -70rpx;
				align-content: center;

				.label-title {
					font-weight: bold;
					font-size: 30rpx;
					color: #341B10;
					text-align: center;
					margin-left: 10px;
					height: 120rpx;
					line-height: 110rpx;
				}
			}

			.intro-content {
				font-size: 26rpx;
				color: #5c4322;
				line-height: 1.8;
				text-align: justify;
				margin-top: 20rpx;
			}
		}
	}

	::v-deep .u-form-item__body__left {
		width: 160rpx !important;


	}

	::v-deep .u-form-item__body__left__content__label {
		font-weight: bold;
		font-size: 26rpx !important;
		color: #FFFFFF !important;
	}

	::v-deep .u-form-item__body__right {
		border: 1px solid #9B0000 !important;
	}

	::v-deep .u-textarea {
		background-color: rgba(0, 0, 0, 0) !important;
	}

	::v-deep .u-form-item__body {
		display: flex;
		flex-direction: row;
		padding: 0 0 !important;
		padding-top: 10rpx !important;
	}

	::v-deep .u-form-item__body__right__message {
		margin-left: 160rpx !important;
	}

	.filter-btn-group {
		display: flex;
		justify-content: flex-start;
		align-items: center;
		gap: 24rpx;
		margin: 10rpx 0 10rpx 0;
	}

	.filter-btn {
		padding: 4rpx 20rpx;
		border: 2rpx solid #b22222;
		color: #b22222;
		font-size: 28rpx;
		transition: all 0.2s;
		margin-left: 10rpx;
	}

	.filter-btn.active {
		background: #b22222;
		color: #fff;
		border: 2rpx solid #b22222;
	}

	.row-text {
		font-weight: bold;
		font-size: 26rpx;
		color: #FFFFFF;
	}

	.content {
    max-height: 60vh;
		overflow: auto;
	}

	.savaBtn {
		margin-top: 10px;
		font-weight: 600;
	}
</style>