<template>
	<view>
		<navigation :showBack="true" class="navbg">
			<text class="big_title">
				{{this.$t('index').faq}}
			</text>
		</navigation>
		<view class="main">
			<!-- 	<u-collapse>
					<u-collapse-item :title="item.adTitle" v-for="(item, index) in recordInfo" :key="index">
					<view class="num">
						{{index+1}}
					</view>
						<view class="btex" v-html="item.adContentHtml">
							
						</view>
					</u-collapse-item>
				</u-collapse> -->
			<!-- -->
			<scroll-view :scroll-y="true" class="main_con" style="max-height: 1280rpx;" lower-threshold="50">
				<view class="item" v-for="(item, index) in itemList" :key="index"
					:class="{'on': index==myIndex, 'bg': index==myIndex}">
					<view class="div1">

						<view class="btx">
							{{item.head}}
						</view>
						<image src="../../../static/tongyonh/plus.png" mode="aspectFit" class="teximg"
							v-if="index!=myIndex" @click="toClass(index)"></image>
						<image src="../../../static/tongyonh/xmark.png" mode="aspectFit" class="teximg"
							v-if="index==myIndex" @click.stop="noClass"></image>
						<view class="div">
							{{item.body}}
						</view>
					</view>

				</view>

			</scroll-view>





		</view>
	</view>
</template>

<script>
	import utils from '@/utils'
	import md5 from 'js-md5'
	import store from '@/store'
	import token from '@/utils/TokenUtil'
	import cont from "@/components/navigation/navigation.vue"

	export default {
		data() {
			return {
				myIndex: -1,
				recordInfo: [],
				form: {
					pageNum: 1,
					pageSize: 10,
					auAdPositionType: 'user_questions',
					terminalType: 'user_client',
				},
				itemList: [{
						head: this.$t('index').t1,
						body: this.$t('index').b1,
						open: true,
						disabled: true
					},
					{
						head: this.$t('index').t2,
						body: this.$t('index').b2,
						open: false,
					},

					{
						head: this.$t('index').t3,
						body: this.$t('index').b3,
						open: false,
					},
					{
						head: this.$t('index').t4,
						body: this.$t('index').b4,
						open: false,
					},
					{
						head: this.$t('index').t5,
						open: false,
						body: this.$t('index').b5,
					},
					{
						head: this.$t('index').t6,
						open: false,
						body: this.$t('index').b6,
					},
					{
						head: this.$t('index').t7,
						open: false,
						body: this.$t('index').b7,
					},
				],
			}
		},
		computed: {
			i18n() {
				return this.$t('index')
			},
		},
		onLoad() {
			// this.getHomeSlideFunc()
		},

		methods: {
			noClass() {
				console.log(12121)
				this.myIndex = -1
				console.log(this.myIndex)
			},
			toClass(i) {
				this.myIndex = i
			},
			async getHomeSlideFunc() {
				const response = await this.$api.getAuAdList(this.form)
				this.recordInfo = response.rows
				console.log(response, 777777777)
			},
		},
	}
</script>

<style>
	@import './index.css';
</style>
