<template>
	<view class="center">
		<view class="img">
			<image src="../../static/img/logo.png" mode=""></image>
		</view>
		<view class="test_title">
			关于我们
		</view>
		<view class="aboutBox">
			<view class="aboutBox-title" @click="qiehuan(0)">
				公司介绍
			</view>
			<view class="aboutBox-title" @click="qiehuan(1)">
				产品介绍
			</view>
			<view class="aboutBox-title" @click="qiehuan(2)">
				联系我们
			</view>

		</view>
		<swiper :current="currentIndex" :duration="1000" style="height: 1000rpx;">
			<swiper-item>
				<!-- v-html="gsjj.content" -->
				<view class="swiper-item" v-html="gsjj.content">

				</view>
			</swiper-item>
			<swiper-item>
				<view class="swiper-item" v-html="products.content">
				</view>
			</swiper-item>
			<swiper-item>
				<view class="swiper-item swiperRight">

					<view class="swiperRight-img">
						<image src="../../static/img/map.png" mode=""></image>
					</view>
					<view class="text">
						<text>咨询热线：xxxxxxxxxx</text>
						<text>报修电话：xxxxxxxxxx</text>
					</view>
				</view>

			</swiper-item>
		</swiper>

		<aboutUs class="aboutUs"></aboutUs>
	</view>
</template>
<script>
	import {
		changeTaber,
	} from '@/utils/tarberChange.js'
	import {
		articleDetail,
		articlelist,
		productlist,
		productDetail
	} from '@/api/index.js'
	import aboutUs from '@/components/introduce/introduce.vue'
	export default {
		components: {
			aboutUs
		},
		data() {
			return {
				indexList: [],
				topNavWidth: '12%', //设置导航默认宽度
				classIndex: 0, //当前进行中的活动
				itemWidht: 0, //顶部分类宽度
				loadingType: 'more', //加载更多状态
				actionClassInd: 0,
				page: 1,
				limit: 10,
				currentIndex: 0,
				gsjj: {},
				products: {}
			}
		},
		onLoad() {
			// this.loadData();
			this.$nextTick(function(){
				changeTaber(1)
			})
			this.getGsjj(2)
			this.getproducts(3)
		},
		
		methods: {
			async loadData() {
				const obj = this;
			},
			tabClass(item, index) {
				this.classIndex = index;
				this.actionClassId = index;
				let ls = this.indexList[this.actionClassInd]
			},
			qiehuan(index) {
				console.log(index)
				this.currentIndex = index * 1;
			},
			getGsjj(id) {
				articleDetail({}, id).then(res => {
					console.log(res, "111111")
					this.gsjj = res.data
				}).catch(err => {
					this.gsjj = err.data

					console.log(err, 'cuoww')
				})
			},
			getproducts(id) {
				productDetail({}, id).then(res => {
					console.log(res, "111111")
					this.products = res.data
				}).catch(err => {
					this.products = err.data

					console.log(err, 'cuoww')
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		height: 100%;
	}

	.img {
		margin: 17rpx 0 17rpx 41rpx;
		width: 208rpx;
		height: 52rpx;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.test_title {
		display: flex;
		justify-content: center;
		align-items: center;
		width: 100%;
		height: 60rpx;
		font-size: 22rpx;
		font-family: Adobe Heiti Std;
		font-weight: normal;
		color: #FFFFFF;
		background-color: #0165B5;
	}

	// .class-box {
	// 	background: #FFFFFF;
	// 	white-space: nowrap;
	// 	height: 78rpx;

	// .item {
	// 	text-align: center;
	// 	display: inline-block;
	// 	color: $font-color-base;
	// 	margin: 26rpx 34rpx 15rpx 29rpx;
	// 	background-color: #ffffff;
	// 	line-height: 1;

	// 	.time {
	// 		font-family: PingFang SC;
	// 		font-weight: bold;
	// 		font-size: 30rpx;
	// 		padding-bottom: 19rpx;

	// 		&.action {
	// 			color: #ff0000;
	// 			border-bottom: 4rpx solid #FF0000;
	// 		}
	// 	}
	// }

	.aboutBox {
		display: flex;
		justify-content: space-between;
		width: 100%;
		height: 60rpx;

		.aboutBox-title {
			display: flex;
			justify-content: center;
			align-items: center;
			width: 33.3%;
			background: #127FD5;
			font-size: 22rpx;
			font-family: Adobe Heiti Std;
			font-weight: normal;
			color: #FFFFFF;
			line-height: 67rpx;
		}
	}

	.swiper-item {}

	.swiperRight {
		margin-top: 140rpx;
		display: flex;
		flex-direction: column;

		align-items: center;

		.swiperRight-img {

			width: 560rpx;
			height: 266rpx;

			image {
				width: 100%;
				height: 100%;
			}
		}


	}

	.text {
		margin-top: 80rpx;
		display: flex;
		flex-direction: column;
		font-size: 10rpx;
		font-family: Adobe Heiti Std;
		font-weight: normal;
		color: #000000;
		line-height: 40rpx;
	}

	.aboutUs {
		width: 100%;
		position: fixed;
		left: 0;
		bottom: 0;
		margin-bottom: 100rpx;
	}
</style>
