<template>
	<view class="container">
		<!-- 顶部导航栏 -->
		<view class="header">
			<view class="back-btn" @click="goBack">
				<text class="back-icon">←</text>
			</view>
			<text class="header-title">关于我们虞</text>
			<view class="header-right"></view>
		</view>
		
		<scroll-view class="scroll-content" scroll-y>
			<!-- 应用信息 -->
			<view class="app-info-section">
				<view class="app-icon-wrapper">
					<view class="app-icon">
						<text class="app-icon-text">📖</text>
					</view>
				</view>
				<text class="app-name">云阅读</text>
				<text class="app-version">version 1.0.0</text>
			</view>
			
			<!-- 联系信息 -->
			<view class="contact-section">
				<text class="contact-item">客服微信: 1574250342</text>
				<text class="contact-item">在线时间: 8:30am-5:30pm</text>
			</view>
			
			<!-- 法律链接 -->
			<view class="legal-section">
				<text class="legal-link" @click="goToUserAgreement">用户协议</text>
				<text class="legal-separator">|</text>
				<text class="legal-link" @click="goToPrivacyPolicy">隐私政策</text>
			</view>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		methods: {
			goBack() {
				uni.navigateBack()
			},
			goToUserAgreement() {
				uni.showToast({
					title: '用户协议',
					icon: 'none'
				})
				// 可以跳转到用户协议页面
				// uni.navigateTo({
				// 	url: '/pages/user-agreement/user-agreement'
				// })
			},
			goToPrivacyPolicy() {
				uni.showToast({
					title: '隐私政策',
					icon: 'none'
				})
				// 可以跳转到隐私政策页面
				// uni.navigateTo({
				// 	url: '/pages/privacy-policy/privacy-policy'
				// })
			}
		}
	}
</script>

<style scoped>
	.container {
		width: 100%;
		height: 100vh;
		min-height: 100vh;
		background-color: #FFFFFF;
		display: flex;
		padding-top: 30px;
		box-sizing: border-box;
		flex-direction: column;
		box-sizing: border-box;
		overflow: hidden;
	}
	
	.header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 20rpx 30rpx;
		padding-top: calc(20rpx + env(safe-area-inset-top));
		background-color: #FFFFFF;
		border-bottom: 1rpx solid #F0F0F0;
		position: relative;
		flex-shrink: 0;
		box-sizing: border-box;
	}
	
	.back-btn {
		width: 60rpx;
		height: 60rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		z-index: 10;
	}
	
	.back-icon {
		font-size: 40rpx;
		color: #333333;
		font-weight: bold;
	}
	
	.header-title {
		position: absolute;
		left: 50%;
		transform: translateX(-50%);
		font-size: 36rpx;
		font-weight: bold;
		color: #333333;
	}
	
	.header-right {
		width: 60rpx;
	}
	
	.scroll-content {
		flex: 1;
		width: 100%;
		height: 0;
		overflow: hidden;
		padding-bottom: calc(env(safe-area-inset-bottom));
		background-color: #FFFFFF;
		box-sizing: border-box;
	}
	
	.app-info-section {
		display: flex;
		flex-direction: column;
		align-items: center;
		padding: 80rpx 30rpx 60rpx;
	}
	
	.app-icon-wrapper {
		margin-bottom: 30rpx;
	}
	
	.app-icon {
		width: 160rpx;
		height: 160rpx;
		background-color: #4FC3F7;
		border-radius: 24rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		box-shadow: 0 4rpx 12rpx rgba(79, 195, 247, 0.3);
	}
	
	.app-icon-text {
		font-size: 80rpx;
	}
	
	.app-name {
		font-size: 40rpx;
		font-weight: bold;
		color: #333333;
		margin-bottom: 15rpx;
	}
	
	.app-version {
		font-size: 26rpx;
		color: #999999;
	}
	
	.contact-section {
		padding: 40rpx 30rpx;
		display: flex;
		flex-direction: column;
		gap: 20rpx;
	}
	
	.contact-item {
		font-size: 28rpx;
		color: #999999;
		line-height: 1.6;
	}
	
	.legal-section {
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 60rpx 30rpx;
		gap: 20rpx;
	}
	
	.legal-link {
		font-size: 28rpx;
		color: #999999;
		text-decoration: underline;
	}
	
	.legal-separator {
		font-size: 28rpx;
		color: #CCCCCC;
	}
</style>


