<template>
  <view class="franchise-page">
    <!-- 顶部横幅 -->
    <view class="banner gradient-bg">
      <text class="banner-title">习正陪伴 全国招商加盟</text>
      <text class="banner-subtitle">携手共创教育事业新篇章</text>
      <text class="banner-emoji">🤝</text>
    </view>
    
    <!-- 快速申请 -->
    <view class="quick-apply">
      <button class="apply-btn" @click="goApply">
        <text class="btn-icon">📝</text>
        <text>立即申请加盟</text>
      </button>
    </view>
    
    <!-- 加盟优势 -->
    <view class="section">
      <view class="section-header">
        <text class="section-title">🌟 加盟优势</text>
      </view>
      <view class="advantage-grid">
        <view class="advantage-item" v-for="item in advantages" :key="item.title">
          <text class="advantage-icon">{{ item.icon }}</text>
          <text class="advantage-title">{{ item.title }}</text>
          <text class="advantage-desc">{{ item.desc }}</text>
        </view>
      </view>
    </view>
    
    <!-- 加盟条件 -->
    <view class="section">
      <view class="section-header">
        <text class="section-title">📋 加盟条件</text>
      </view>
      <view class="policy-content">
        <view class="policy-item" v-for="(item, index) in conditions" :key="index">
          <text class="policy-number">{{ index + 1 }}</text>
          <text class="policy-text">{{ item }}</text>
        </view>
      </view>
    </view>
    
    <!-- 支持政策 -->
    <view class="section">
      <view class="section-header">
        <text class="section-title">🎁 支持政策</text>
      </view>
      <view class="support-list">
        <view class="support-item" v-for="item in supports" :key="item.title">
          <view class="support-icon">{{ item.icon }}</view>
          <view class="support-content">
            <text class="support-title">{{ item.title }}</text>
            <text class="support-desc">{{ item.desc }}</text>
          </view>
        </view>
      </view>
    </view>
    
    <!-- 费用说明 -->
    <view class="section">
      <view class="section-header">
        <text class="section-title">💰 费用说明</text>
      </view>
      <view class="fee-list">
        <view class="fee-item" v-for="item in fees" :key="item.name">
          <view class="fee-name">{{ item.name }}</view>
          <view class="fee-amount">{{ item.amount }}</view>
          <view class="fee-desc">{{ item.desc }}</view>
        </view>
      </view>
    </view>
    
    <!-- 加盟流程 -->
    <view class="section">
      <view class="section-header">
        <text class="section-title">📍 加盟流程</text>
      </view>
      <view class="process-list">
        <view class="process-item" v-for="(item, index) in processes" :key="index">
          <view class="process-number">{{ index + 1 }}</view>
          <view class="process-content">
            <text class="process-title">{{ item.title }}</text>
            <text class="process-desc">{{ item.desc }}</text>
          </view>
          <view class="process-arrow" v-if="index < processes.length - 1">↓</view>
        </view>
      </view>
    </view>
    
    <!-- 成功案例 -->
    <view class="section">
      <view class="section-header">
        <text class="section-title">🏆 成功案例</text>
      </view>
      <view class="case-list">
        <view class="case-item" v-for="item in cases" :key="item.name">
          <image class="case-image" :src="item.image" mode="aspectFill"></image>
          <view class="case-info">
            <text class="case-name">{{ item.name }}</text>
            <text class="case-location">{{ item.location }}</text>
            <text class="case-desc">{{ item.desc }}</text>
          </view>
        </view>
      </view>
    </view>
    
    <!-- 底部申请按钮 -->
    <view class="bottom-bar">
      <button class="bottom-apply-btn" @click="goApply">立即申请加盟</button>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      advantages: [
        { icon: '🎯', title: '品牌优势', desc: '知名教育品牌，市场认可度高' },
        { icon: '📚', title: '课程体系', desc: '标准化课程，易于复制推广' },
        { icon: '💻', title: '技术支持', desc: '完善的小程序系统支持' },
        { icon: '👥', title: '培训支持', desc: '全方位运营培训指导' },
        { icon: '📈', title: '市场支持', desc: '提供市场推广方案' },
        { icon: '🤝', title: '持续服务', desc: '长期运营指导支持' }
      ],
      conditions: [
        '认同习正陪伴的教育理念和品牌文化',
        '具有合法的经营资质',
        '有一定的资金实力和风险承受能力',
        '有教育行业经验者优先',
        '具备良好的商业信誉和职业操守'
      ],
      supports: [
        { icon: '🏷️', title: '品牌授权', desc: '提供品牌使用权和VI系统' },
        { icon: '📖', title: '培训支持', desc: '提供完整的运营培训和教师培训' },
        { icon: '🎯', title: '运营支持', desc: '提供运营手册和持续运营指导' },
        { icon: '📢', title: '市场支持', desc: '提供市场推广方案和物料支持' },
        { icon: '💻', title: '技术支持', desc: '提供小程序系统和技术支持' },
        { icon: '📚', title: '课程支持', desc: '提供标准化课程体系和教学资源' }
      ],
      fees: [
        { name: '加盟费', amount: '5-20万元', desc: '根据城市级别和区域不同' },
        { name: '保证金', amount: '2-5万元', desc: '合同期满无违约可退还' },
        { name: '管理费', amount: '年营业额3-5%', desc: '用于品牌维护和支持服务' },
        { name: '装修费用', amount: '500-1000元/㎡', desc: '根据实际场地面积' },
        { name: '设备采购', amount: '5-10万元', desc: '教学设备和办公设备' },
        { name: '首批物料', amount: '2-5万元', desc: '教材、宣传物料等' }
      ],
      processes: [
        { title: '提交申请', desc: '填写加盟申请表' },
        { title: '资质审核', desc: '总部审核申请资料' },
        { title: '实地考察', desc: '双方实地考察洽谈' },
        { title: '签订合同', desc: '签订加盟合作协议' },
        { title: '选址装修', desc: '选择场地并进行装修' },
        { title: '人员培训', desc: '招聘人员并进行培训' },
        { title: '开业筹备', desc: '准备开业相关事宜' },
        { title: '正式运营', desc: '开业并持续运营支持' }
      ],
      cases: [
        {
          name: '杭州上城校区',
          location: '浙江省杭州市',
          image: '/static/images/case1.jpg',
          desc: '开业半年，学员突破200人，月营业额达50万'
        },
        {
          name: '杭州富阳校区',
          location: '浙江省杭州市',
          image: '/static/images/case2.jpg',
          desc: '开业一年，学员突破300人，成为当地知名品牌'
        }
      ]
    }
  },
  
  methods: {
    goApply() {
      uni.navigateTo({
        url: '/pages/franchise/apply'
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.franchise-page {
  min-height: 100vh;
  background: #f0f9f7;
  padding-bottom: 120rpx;
}

.gradient-bg {
  background: linear-gradient(135deg, #7dd3c0 0%, #5fb8a8 100%);
}

.banner {
  padding: 60rpx 40rpx;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.banner-title {
  display: block;
  font-size: 44rpx;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 20rpx;
}

.banner-subtitle {
  display: block;
  font-size: 28rpx;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 40rpx;
}

.banner-image {
  width: 100%;
  height: 300rpx;
}

.quick-apply {
  padding: 30rpx;
  margin-top: -40rpx;
}

.apply-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15rpx;
  padding: 32rpx;
  background: #ffffff;
  color: #7dd3c0;
  border-radius: 50rpx;
  font-size: 32rpx;
  font-weight: bold;
  border: none;
  box-shadow: 0 8rpx 24rpx rgba(125, 211, 192, 0.3);
}

.btn-icon {
  font-size: 36rpx;
}

.section {
  background: #ffffff;
  margin: 20rpx;
  border-radius: 20rpx;
  padding: 30rpx;
}

.section-header {
  margin-bottom: 30rpx;
}

.section-title {
  font-size: 36rpx;
  font-weight: bold;
  color: #333333;
}

.advantage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20rpx;
}

.advantage-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30rpx 20rpx;
  background: #f0f9f7;
  border-radius: 16rpx;
}

.advantage-icon {
  font-size: 60rpx;
  margin-bottom: 15rpx;
}

.advantage-title {
  font-size: 26rpx;
  font-weight: bold;
  color: #333333;
  margin-bottom: 10rpx;
}

.advantage-desc {
  font-size: 22rpx;
  color: #999999;
  text-align: center;
}

.policy-content {
  padding: 20rpx;
}

.policy-item {
  display: flex;
  align-items: flex-start;
  gap: 20rpx;
  padding: 20rpx 0;
  border-bottom: 1rpx solid #f0f0f0;
  
  &:last-child {
    border-bottom: none;
  }
}

.policy-number {
  flex-shrink: 0;
  width: 48rpx;
  height: 48rpx;
  line-height: 48rpx;
  text-align: center;
  background: #7dd3c0;
  color: #ffffff;
  border-radius: 50%;
  font-size: 24rpx;
  font-weight: bold;
}

.policy-text {
  flex: 1;
  font-size: 28rpx;
  color: #666666;
  line-height: 48rpx;
}

.support-list {
  display: flex;
  flex-direction: column;
  gap: 20rpx;
}

.support-item {
  display: flex;
  align-items: flex-start;
  gap: 20rpx;
  padding: 20rpx;
  background: #f0f9f7;
  border-radius: 16rpx;
}

.support-icon {
  flex-shrink: 0;
  width: 80rpx;
  height: 80rpx;
  line-height: 80rpx;
  text-align: center;
  font-size: 40rpx;
  background: #ffffff;
  border-radius: 50%;
}

.support-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10rpx;
}

.support-title {
  font-size: 30rpx;
  font-weight: bold;
  color: #333333;
}

.support-desc {
  font-size: 26rpx;
  color: #666666;
}

.fee-list {
  display: flex;
  flex-direction: column;
  gap: 20rpx;
}

.fee-item {
  padding: 30rpx;
  background: #f0f9f7;
  border-radius: 16rpx;
}

.fee-name {
  font-size: 30rpx;
  font-weight: bold;
  color: #333333;
  margin-bottom: 10rpx;
}

.fee-amount {
  font-size: 36rpx;
  font-weight: bold;
  color: #ff6b6b;
  margin-bottom: 10rpx;
}

.fee-desc {
  font-size: 24rpx;
  color: #999999;
}

.process-list {
  display: flex;
  flex-direction: column;
}

.process-item {
  display: flex;
  align-items: flex-start;
  gap: 20rpx;
  padding: 20rpx 0;
}

.process-number {
  flex-shrink: 0;
  width: 60rpx;
  height: 60rpx;
  line-height: 60rpx;
  text-align: center;
  background: linear-gradient(135deg, #7dd3c0 0%, #5fb8a8 100%);
  color: #ffffff;
  border-radius: 50%;
  font-size: 28rpx;
  font-weight: bold;
}

.process-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10rpx;
}

.process-title {
  font-size: 30rpx;
  font-weight: bold;
  color: #333333;
}

.process-desc {
  font-size: 26rpx;
  color: #666666;
}

.process-arrow {
  width: 100%;
  text-align: center;
  font-size: 40rpx;
  color: #7dd3c0;
  margin: 10rpx 0;
}

.case-list {
  display: flex;
  flex-direction: column;
  gap: 20rpx;
}

.case-item {
  display: flex;
  gap: 20rpx;
  padding: 20rpx;
  background: #f0f9f7;
  border-radius: 16rpx;
}

.case-image {
  flex-shrink: 0;
  width: 200rpx;
  height: 150rpx;
  border-radius: 12rpx;
}

.case-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10rpx;
}

.case-name {
  font-size: 30rpx;
  font-weight: bold;
  color: #333333;
}

.case-location {
  font-size: 24rpx;
  color: #999999;
}

.case-desc {
  font-size: 26rpx;
  color: #666666;
}

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20rpx 30rpx;
  background: #ffffff;
  box-shadow: 0 -4rpx 16rpx rgba(0, 0, 0, 0.1);
}

.bottom-apply-btn {
  width: 100%;
  padding: 28rpx;
  background: linear-gradient(135deg, #7dd3c0 0%, #5fb8a8 100%);
  color: #ffffff;
  border-radius: 50rpx;
  font-size: 32rpx;
  font-weight: bold;
  border: none;
}
</style>
