<template>
	<page-meta>
		<navigation-bar :title="$tt('about.about')" background-color="#F1F3F9" front-color="#000000"></navigation-bar>
	</page-meta>
	<view class="user-about">
		<view class="list-group">
			<view style="padding: 80rpx">
				<u--image :showLoading="true" src="https://xaznkj.cn/app/fastbee1_blue.png" width="130px" height="45px"
					customStyle="margin:auto"></u--image>
				<u--text :text="$tt('about.open')" size="14" type="info"
					customStyle="margin:auto; margin-top:24rpx;"></u--text>
				<u--text :text="$tt('about.message')" size="14" type="info"
					customStyle="margin:auto; margin-top:8px;"></u--text>
			</view>

			<view style="margin-top: 24rpx">
				<!-- #ifndef APP-PLUS -->
				<view class="item">
					<view class="left">
						<u-icon class="iconfont" name="qq-circle-fill" size="22" color="#3378FE"></u-icon>
						<text class="text">{{$tt('about.authorQQ')}}</text>
					</view>
				</view>
				<view class="item">
					<view class="left">
						<u-icon class="iconfont" name="weixin-circle-fill" size="22" color="#3378FE"></u-icon>
						<text class="text">{{$tt('about.authorWechat')}}</text>
					</view>
				</view>
				<view class="item">
					<view class="left">
						<u-icon class="iconfont" name="chat" size="22" color="#3378FE"></u-icon>
						<text class="text">{{$tt('about.group')}}</text>
					</view>
				</view>
				<!-- #endif -->
				<view class="item" @click="handleGotoHome">
					<view class="left">
						<u-icon class="iconfont" name="home" size="22" color="#3378FE"></u-icon>
						<text class="text">{{$tt('about.webSite')}}</text>
					</view>
					<view class="right"><u-icon class="iconfont" name="arrow-right" size="12" color="#D8D8D8"></u-icon>
					</view>
				</view>
				<!-- #ifndef APP-PLUS -->
				<view class="item" @click="handleGotoGithub">
					<view class="left">
						<u-icon class="iconfont" name="github-circle-fill" size="22" color="#3378FE"></u-icon>
						<text class="text">{{$tt('about.sourceCode')}}</text>
					</view>
					<view class="right"><u-icon class="iconfont" name="arrow-right" size="12" color="#D8D8D8"></u-icon>
					</view>
				</view>
				<!-- #endif -->
				<view class="item" @click="handleGotoHp">
					<view class="left">
						<u-icon class="iconfont" name="/static/user/hp_logo.png" size="21" color="#3378FE"></u-icon>
						<text class="text">{{$tt('login.HuapuIoT')}}</text>
					</view>
					<view class="right"><u-icon class="iconfont" name="arrow-right" size="12" color="#D8D8D8"></u-icon>
					</view>
				</view>
			</view>
		</view>

		<view class="footer-wrap">
			<u--text size="11" type="primary" align="center" decoration="underline" text="滇ICP备2023000466号-4A"
				margin="0 0 10px" @click="handleGotoFiling"></u--text>
			<u--text size="10" type="info" align="center"
				text="Copyright © 2021-2025 FastBee All Rights Reserved."></u--text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {};
		},
		created() {},
		methods: {
			// 跳转到fastbee官网
			handleGotoHome() {
				// #ifdef MP-WEIXIN
				uni.navigateTo({
					url: '/pages/common/webview/index?url=https://fastbee.cn'
				});
				// #endif
				// #ifdef H5
				window.open('https://fastbee.cn', '_blank');
				// #endif
				// #ifdef APP-PLUS
				plus.runtime.openURL('https://fastbee.cn');
				// #endif
			},
			// 跳转到源码
			handleGotoGithub() {
				// #ifdef MP-WEIXIN
				uni.setClipboardData({
					data: 'https://gitee.com/beecue/fastbee',
					success: () => {
						uni.showToast({
							title: this.$tt('about.copyTip'),
							icon: 'none'
						});
					}
				});
				// #endif
				// #ifdef H5
				window.open('https://gitee.com/beecue/fastbee', '_blank');
				// #endif
				// #ifdef APP-PLUS
				plus.runtime.openURL('https://gitee.com/beecue/fastbee');
				// #endif
			},
			// 跳转到华普
			handleGotoHp() {
				// #ifdef MP-WEIXIN
				uni.setClipboardData({
					data: 'http://www.hpiot.cn',
					success: () => {
						uni.showToast({
							title: this.$tt('about.copyTip'),
							icon: 'none'
						});
					}
				});
				// #endif
				// #ifdef H5
				window.open('http://www.hpiot.cn', '_blank');
				// #endif
				// #ifdef APP-PLUS
				plus.runtime.openURL('http://www.hpiot.cn');
				// #endif
			},
			// 跳转到app备案
			handleGotoFiling() {
				// #ifdef MP-WEIXIN
				uni.setClipboardData({
					data: 'https://beian.miit.gov.cn',
					success: () => {
						uni.showToast({
							title: this.$tt('about.copyTip'),
							icon: 'none'
						});
					}
				});
				// #endif
				// #ifdef H5
				window.open('https://beian.miit.gov.cn', '_blank');
				// #endif
				// #ifdef APP-PLUS
				plus.runtime.openURL('https://beian.miit.gov.cn');
				// #endif
			}
		}
	};
</script>

<style lang="scss" scoped>
	.user-about {
		display: inline-block;
		width: 100%;
		height: 100vh;
		background: $uni-bg-color-grey;


		.list-group {
			border-radius: 10px;
			background-color: $uni-bg-color;
			padding: 14rpx 40rpx;
			margin: 24rpx;

			.item {
				display: flex;
				justify-content: space-between;
				align-items: center;
				font-size: 30rpx;
				color: #555;
				box-sizing: border-box;
				height: 100rpx;
				border-bottom: 1rpx solid #f8f8f8;

				.left {
					display: flex;
					align-items: center;

					.iconfont {
						font-size: 38rpx;
					}

					.text {
						margin-left: 32rpx;
						font-size: 28rpx;
					}

				}

				.right {
					.iconfont {
						font-size: 26rpx;
					}
				}
			}

			.item:last-child {
				border: none;

			}
		}

		.footer-wrap {
			position: fixed;
			bottom: 20px;
			left: 0;
			right: 0;
		}
	}
</style>