<template>
	<view class="page">
		<!-- #ifdef APP -->
		<statusBar></statusBar>
		<!-- #endif -->
		
		<!-- 导航栏 -->
		<uni-nav-bar 
			:fixed="true" 
			:statusBar="true" 
			title="销冠" 
			leftIcon="left" 
			@clickLeft="goBack"
			color="#333"
			backgroundColor="#FFFFFF">
		</uni-nav-bar>
		
		<view class="content">
			<!-- AI功能横幅 -->
			<view class="ai-banner">
				<text class="banner-text">AI让销售过程和团队管理更透明</text>
			</view>
			
			<!-- 标签页 -->
			<view class="tabs">
				<view 
					class="tab-item" 
					:class="{ active: activeTab === 'survey' }"
					@click="switchTab('survey')">
					<text>摸底</text>
				</view>
				<view 
					class="tab-item" 
					:class="{ active: activeTab === 'practice' }"
					@click="switchTab('practice')">
					<text>陪练</text>
				</view>
				<view 
					class="tab-item" 
					:class="{ active: activeTab === 'battle' }"
					@click="switchTab('battle')">
					<text>实战</text>
				</view>
				<view 
					class="tab-item" 
					:class="{ active: activeTab === 'quality' }"
					@click="switchTab('quality')">
					<text>质检</text>
				</view>
			</view>
			
			<!-- 摸底内容 -->
			<scroll-view 
				class="tab-content" 
				scroll-y 
				v-if="activeTab === 'survey'">
				<view class="champion-card">
					<text class="champion-title">摸底</text>
					<text class="champion-desc">这里是摸底相关的内容展示区域</text>
				</view>
			</scroll-view>
			
			<!-- 陪练内容 -->
			<scroll-view 
				class="tab-content" 
				scroll-y 
				v-if="activeTab === 'practice'">
				<view class="champion-card">
					<text class="champion-title">陪练</text>
					<text class="champion-desc">这里是陪练相关的内容展示区域</text>
				</view>
			</scroll-view>
			
			<!-- 实战内容 -->
			<scroll-view 
				class="tab-content" 
				scroll-y 
				v-if="activeTab === 'battle'">
				<view class="champion-card">
					<text class="champion-title">实战</text>
					<text class="champion-desc">这里是实战相关的内容展示区域</text>
				</view>
			</scroll-view>
			
			<!-- 质检内容 -->
			<scroll-view 
				class="tab-content" 
				scroll-y 
				v-if="activeTab === 'quality'">
				<view class="champion-card">
					<text class="champion-title">质检</text>
					<text class="champion-desc">这里是质检相关的内容展示区域</text>
				</view>
			</scroll-view>
		</view>
	</view>
</template>

<script>
	// #ifdef APP
	import statusBar from "@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar";
	// #endif
	export default {
		// #ifdef APP
		components: {
			statusBar
		},
		// #endif
		data() {
			return {
				activeTab: 'survey'
			}
		},
		onLoad() {
		},
		methods: {
			goBack() {
				uni.navigateBack();
			},
			switchTab(tab) {
				this.activeTab = tab;
			}
		}
	}
</script>

<style>
	page {
		background-color: #F5F5F5;
	}
	
	.page {
		min-height: 100vh;
		background-color: #F5F5F5;
	}
	
	.content {
		padding-top: 88rpx;
	}
	
	/* AI功能横幅 */
	.ai-banner {
		background-color: #E3F2FD;
		padding: 24rpx 32rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	
	.banner-text {
		font-size: 28rpx;
		color: #1976D2;
		flex: 1;
	}
	
	/* 标签页 */
	.tabs {
		display: flex;
		background-color: #FFFFFF;
		border-bottom: 1px solid #E0E0E0;
		padding: 0 32rpx;
	}
	
	.tab-item {
		padding: 24rpx 32rpx;
		position: relative;
	}
	
	.tab-item text {
		font-size: 30rpx;
		color: #666;
	}
	
	.tab-item.active text {
		color: #333;
		font-weight: 500;
	}
	
	.tab-item.active::after {
		content: '';
		position: absolute;
		bottom: 0;
		left: 32rpx;
		right: 32rpx;
		height: 4rpx;
		background-color: #007AFF;
		border-radius: 2rpx;
	}
	
	/* 内容区域 */
	.tab-content {
		height: calc(100vh - 300rpx);
		background-color: #F5F5F5;
		padding: 24rpx 32rpx;
	}
	
	.champion-card {
		background-color: #FFFFFF;
		border-radius: 16rpx;
		padding: 32rpx;
		box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		min-height: 400rpx;
	}
	
	.champion-title {
		font-size: 36rpx;
		font-weight: bold;
		color: #333;
		margin-bottom: 20rpx;
	}
	
	.champion-desc {
		font-size: 28rpx;
		color: #999;
	}
</style>

