<template>
	<view class="intro-page common">
    <view class="top-class"></view>
    <view class="title">
      <view class="logo-container">
        <image class="logo-text" @click="openDetail" src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/xhc/common/logo.png"  />
      </view>
      <view class="title-1">
        <view class="title-image-2"></view>
      </view>
    </view>
    <view class="head">
      <u-row class="row-class"  justify="flex-end">
        <u-col span="4">
          <image class="logo-rules-2" @click="openDetail" src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/xhc/common/rules.png"  />
        </u-col>
      </u-row>
    </view>

		<view class="content-2">
      <view class="content-title">
        意见反馈
      </view>
			<view class="content_text">
        <view class="intro-content">
        <view style ="margin-top: 30rpx"> 小和醇槟榔消费者反馈表 </view>
        <view> 亲爱的消费者： </view>
        <view> 感谢您选择小和醇槟榔！为了能给您带来更优质的产品和服务体验，我们诚挚地邀请您填写这份反馈表。您的宝贵意见对我们至关重要，我们会认真对待每一条反馈。若您的建议被采纳，将有机会获得超吉炫精心准备的礼品哦！
        </view>
        </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" color="#F8D994"></u--input>
						</u-form-item>

						<u-form-item label="联系电话:" prop="userInfo.tel" ref="item1">
							<u--input v-model="model1.userInfo.tel" border="none" color="#F8D994"></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" color="#F8D994"></u--input>
						</u-form-item>

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

					</u--form>
				</view>
			</view>

		</view>
    <view class="return_view" style="justify-content: space-around;">
      <view class="return-button" @click="saveData">保存</view>
      <view class="return-button" @click="goBack">返回</view>
    </view>
		<u-toast ref="uToast"></u-toast>

	</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("xhc");
    },
    onFilterChange(val) {
      this.baseOnFilterChange(val);
    },
  }
}
</script>
<style lang="scss" scoped>
	@import url('../../../static/scss/common_xhc.css');

	.row-class {
		height: 80rpx;
	}
	.cardTop{
		background-image:
			url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/yjfk.png");
	}

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

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


	::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: #F8D994 !important;
	}

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

	::v-deep .u-textarea {
		background-color: rgba(0, 0, 0, 0) !important;
		
	}
	::v-deep .u-textarea__field{
		color:#fff !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 #FCEFCB;
		color: #FCEFCB ;
		font-size: 28rpx;
		transition: all 0.2s;
		margin-left: 10rpx;
	}

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

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

	.content {
		height: 69vh;
		overflow: auto;
    padding: 32rpx 24rpx 24rpx 24rpx;
    margin: 10vh 32rpx 0;
    border-radius: 48px;
    background: #FDE2B1;
    border: 6px solid #FB911b;
  }

	.savaBtn {
		margin-top: 10px;
		font-weight: 600;
	}

	.intro-content {
		font-weight: 500;
		font-size: 28rpx;
		color: #F8D994;

	}
</style>