<template>
  <view class="about-container">
    <!-- 公司logo和版本信息 -->
    <view class="header">
      <image class="logo" src="/static/images/logo.png" mode="aspectFit"></image>
      <text class="app-name">农小禹</text>
      <text class="version">Version {{ version }}</text>
    </view>

    <!-- 公司简介 -->
    <view class="section">
      <view class="section-title">公司简介</view>
      <view class="content">
        农小禹是一家专注于智慧农业解决方案的科技公司，致力于通过数字化技术提升农业生产效率，
        实现农业现代化。我们提供从种植管理、设备监控到农产品销售的一站式服务，
        帮助农户实现科学种植、增产增收。
      </view>
    </view>

    <!-- 联系方式 -->
    <view class="section">
      <view class="section-title">联系我们</view>
      <view class="contact-list">
        <view class="contact-item" @click="copyText('www.nongxiaoyu.com')">
          <text class="label">官方网站</text>
          <text class="value">www.nongxiaoyu.com</text>
        </view>
        <view class="contact-item" @click="makePhoneCall">
          <text class="label">服务热线</text>
          <text class="value">400-xxx-xxxx</text>
        </view>
        <view class="contact-item" @click="copyText('service@nongxiaoyu.com')">
          <text class="label">电子邮箱</text>
          <text class="value">service@nongxiaoyu.com</text>
        </view>
        <view class="contact-item">
          <text class="label">公司地址</text>
          <text class="value">浙江省杭州市滨江区科技园区xxx号</text>
        </view>
      </view>
    </view>

    <!-- 版权信息 -->
    <view class="footer">
      <text>Copyright © 2024 农小禹科技有限公司</text>
      <text>All Rights Reserved</text>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      version: '1.0.0'
    };
  },
  
  methods: {
    // 复制文本
    copyText(text) {
      uni.setClipboardData({
        data: text,
        success: () => {
          uni.showToast({
            title: '已复制到剪贴板',
            icon: 'none'
          });
        }
      });
    },

    // 拨打电话
    makePhoneCall() {
      uni.makePhoneCall({
        phoneNumber: '400-xxx-xxxx',
        fail: () => {
          this.copyText('400-xxx-xxxx');
        }
      });
    }
  }
};
</script>

<style lang="scss">
.about-container {
  min-height: 100vh;
  background-color: #f5f5f5;
  padding: 40rpx 30rpx;
  box-sizing: border-box;
}

.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60rpx 0;
  background-color: #ffffff;
  border-radius: 16rpx;
  margin-bottom: 20rpx;

  .logo {
    width: 160rpx;
    height: 160rpx;
    margin-bottom: 20rpx;
  }

  .app-name {
    font-size: 36rpx;
    font-weight: bold;
    color: #333;
    margin-bottom: 10rpx;
  }

  .version {
    font-size: 24rpx;
    color: #999;
  }
}

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

  .section-title {
    font-size: 32rpx;
    font-weight: bold;
    color: #333;
    margin-bottom: 20rpx;
  }

  .content {
    font-size: 28rpx;
    color: #666;
    line-height: 1.6;
  }

  .contact-list {
    .contact-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 20rpx 0;
      border-bottom: 1rpx solid #f0f0f0;

      &:last-child {
        border-bottom: none;
      }

      .label {
        font-size: 28rpx;
        color: #333;
      }

      .value {
        font-size: 28rpx;
        color: #666;
      }
    }
  }
}

.footer {
  text-align: center;
  padding: 40rpx 0;

  text {
    display: block;
    font-size: 24rpx;
    color: #999;
    line-height: 1.5;
  }
}
</style> 