<template>
	<view class="container">
		<view class="tui-flex">
			<view class="tui-cube-box">
				<view class="tui-cube tui-cube-1">我❤</view>
				<view class="tui-cube tui-cube-2">
					{{ schoolname[0] ? schoolname[0] : '' }}{{ schoolname[1] ? schoolname[1] : '' }}
				</view>
				<view class="tui-cube tui-cube-3">
					{{ schoolname[2] ? schoolname[2] : '' }}{{ schoolname[3] ? schoolname[3] : '' }}
				</view>
				<view class="tui-cube tui-cube-4">
					{{ schoolname[4] ? schoolname[4] : '' }}{{ schoolname[5] ? schoolname[5] : '' }}
				</view>
				<view class="tui-cube tui-cube-5">
					{{ schoolname[6] ? schoolname[6] : '' }}{{ schoolname[7] ? schoolname[7] : '' }}
				</view>
				<view class="tui-cube tui-cube-6">{{ lastSchoolname ? lastSchoolname : '' }}</view>
			</view>

		</view>
		<view class="tui-content-box">
			<view class="tui-content">{{ aboutusData }}</view>
			<view class="tui-content tui-content-email">联系人：{{ name }}</view>
			<view class="tui-content tui-content-email">联系方式：{{ contact }}</view>
		</view>

		<view class="footer">
			<view class="footer-text">
				{{ copyright[0] }}
			</view>
			<view class="footer-text">
				{{ copyright[1] }}
			</view>

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

<script>
export default {
	data() {
		return {
			copyright: '',
			name: "",
			contact: '',
			aboutusData: '',
			schoolname: '',
			lastSchoolname: ''
		}
	},
	methods: {
		async getData() {
			let res = await getApp().globalData.request.post('common/appinfo/appbaseinfo');
			let appinfo = JSON.parse(res.data.base);
			// console.log('webinfo=', appinfo.about_us);
			this.aboutusData = appinfo.about_us;
			this.copyright = appinfo.website_copyright.split('++');
			this.name = appinfo.website_title;
			this.contact = appinfo.email;
			this.schoolname = appinfo.website_title.split('');
			this.schoolname.forEach((item, index) => {
				if (index > 7) {
					this.lastSchoolname += item;
				}
			})
			// console.log(this.lastSchoolname);
		}
	},
	onLoad() {
		this.getData();
	}
}
</script>

<style>
.footer {
	width: 100%;
	margin-top: 30rpx;
}

.footer-text {
	text-align: center;
	width: 100%;
	color: #a7a7a7;
	font-size: 24rpx;
	margin-bottom: 20rpx;
}

.container {
	padding: 0 50rpx 40rpx 50rpx;
	box-sizing: border-box;
}

.tui-flex {
	display: flex;
	align-items: center;
	justify-content: center;
	padding-top: 40px;
}

.tui-cube-box {
	width: 60px;
	height: 60px;
	position: relative;
	-webkit-transform-style: preserve-3d;
	transform-style: preserve-3d;
	animation: tui-go 4s linear infinite;
	z-index: 99;
}

@keyframes tui-go {
	0% {
		-webkit-transform: rotateX(0) rotateY(0);
		transform: rotateX(0) rotateY(0);
	}

	100% {
		-webkit-transform: rotateX(360deg) rotateY(360deg);
		transform: rotateX(360deg) rotateY(360deg);
	}
}

.tui-cube {
	width: 60px;
	height: 60px;
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 5px;
	box-sizing: border-box;
	font-size: 24rpx;
	color: #fff;
	text-align: center;
	/* word-break: break-all;
		word-wrap: break-word; */
}

.tui-cube-1 {
	background-color: #fff;
	-webkit-transform: rotateY(90deg) translateZ(-30px);
	transform: rotateY(90deg) translateZ(-30px);
	color: #333 !important;
}

.tui-cube-2 {
	background-color: #8a5966;
	-webkit-transform: rotateY(90deg) translateZ(30px);
	transform: rotateY(90deg) translateZ(30px);
}

.tui-cube-3 {
	background-color: #5c8dff;
	-webkit-transform: rotateX(90deg) translateZ(30px);
	transform: rotateX(90deg) translateZ(30px);
}

.tui-cube-4 {
	background-color: #ed3f14;
	-webkit-transform: rotateX(90deg) translateZ(-30px);
	transform: rotateX(90deg) translateZ(-30px);
}

.tui-cube-5 {
	background-color: #ff7900;
	-webkit-transform: translateZ(30px);
	transform: translateZ(30px);
}

.tui-cube-6 {
	background-color: #19be6b;
	-webkit-transform: translateZ(-30px);
	transform: translateZ(-30px);
}

.tui-content-box {
	width: 100%;
	margin-top: 50px;
	padding: 30rpx;
	box-sizing: border-box;
	background-color: #fff;
	border-radius: 10rpx;
	box-shadow: 0 0 10rpx #eee;
}

.tui-content {
	color: #333;
	font-size: 30rpx;
	line-height: 44rpx;
	padding: 10rpx 0;
	text-align: justify;
}

.tui-content-email {
	color: #5677fc !important;
}

.tui-footer {
	display: flex;
	align-items: center;
	padding-top: 30rpx;
}

.tui-applets {
	width: 80px;
	height: 80px;
	display: block;
}

.tui-footer-text {
	font-size: 24rpx;
	color: #999;
	padding-left: 20rpx;
	width: 300rpx;
}
</style>
